mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-03-22 01:31:21 +03:00
add usarts to 303
This commit is contained in:
@@ -109,7 +109,7 @@ TRUE_INLINE int StartHSE(){ // system bus 72MHz from PLL
|
||||
#define WAITWHILE(x) do{StartUpCounter = 0; while((x) && (++StartUpCounter < 0xffffff)){nop();}; if(x) return 0;}while(0)
|
||||
RCC->CR = (RCC->CR & ~RCC_CR_PLLON) | RCC_CR_HSEON; // disable PLL to reconfigure, enable HSE
|
||||
WAITWHILE(!(RCC->CR & RCC_CR_HSERDY));
|
||||
// Enable Prefetch Buffer. Flash 2 wait states for 48..72MHz
|
||||
// Enable Prefetch Buffer. Flash 4 wait states for 48..72MHz
|
||||
FLASH->ACR = (FLASH->ACR & ~(FLASH_ACR_LATENCY)) |
|
||||
FLASH_ACR_LATENCY_2 | FLASH_ACR_PRFTBE;
|
||||
// HCLK = SYSCLK (AHB prescaler = 1), PCLK1 = HCLK (APB1 prescaler = 1), PCLK2 = HCLK (APB2 prescaler = 1)
|
||||
|
||||
@@ -49,6 +49,10 @@ SECTIONS {
|
||||
_stext = .;
|
||||
*(.text*)
|
||||
*(.rodata*)
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
} >rom
|
||||
@@ -61,7 +65,7 @@ SECTIONS {
|
||||
.ARM : {
|
||||
*(.ARM.exidx*)
|
||||
} >rom
|
||||
|
||||
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
@@ -74,11 +78,22 @@ SECTIONS {
|
||||
.myvars :
|
||||
{
|
||||
. = ALIGN(2048);
|
||||
__varsstart = ABSOLUTE(.);
|
||||
KEEP(*(.myvars))
|
||||
} > rom
|
||||
|
||||
_ldata = LOADADDR(.data);
|
||||
|
||||
.ccmram :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sccmram = .;
|
||||
*(.ccmram)
|
||||
*(.ccmram*)
|
||||
. = ALIGN(4);
|
||||
_eccmram = .;
|
||||
} >ccmram AT> rom
|
||||
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
|
||||
Reference in New Issue
Block a user