File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -94,10 +94,13 @@ void pll_conf_reg(uint32_t val)
9494 & (1 << PLLSTAT_BIT_OFFSET_PLLSTB )));
9595
9696 sysconf_reg_ptr -> CLKSEL = CLKSEL_PLL ;
97+
98+ /* AHB clk divisor = 1, Flash controller clock divider = 2 */
99+ sysconf_reg_ptr -> AHBCLKDIV = 0x201 ;
100+
97101 /* from AHB_CLK_DIVIDER, not from DVFSS&PMC */
98102 sysconf_reg_ptr -> AHBCLKDIV_SEL |= 1 ;
99- /* AHB clk divisor = 1 */
100- sysconf_reg_ptr -> AHBCLKDIV = 0x1 ;
103+
101104}
102105
103106int32_t pll_fout_config (uint32_t freq )
@@ -378,5 +381,8 @@ void pwm_timer_pause(uint32_t id, uint32_t pause)
378381
379382void eflash_clk_div (uint8_t div )
380383{
381- sysconf_reg_ptr -> AHBCLKDIV |= (div << 8 );
384+ uint32_t val = sysconf_reg_ptr -> AHBCLKDIV ;
385+ val &= (~(7 << 8 ));
386+ val |= (div << 8 );
387+ sysconf_reg_ptr -> AHBCLKDIV = val ;
382388}
Original file line number Diff line number Diff line change 33
44MEMORY
55{
6- #if (ICCM_SIZE != 0)
7- ICCM : ORIGIN = ICCM_START , LENGTH = ICCM_SIZE
6+ #if (REGION_ICCM_SIZE != 0)
7+ REGION_ICCM : ORIGIN = REGION_ICCM_START , LENGTH = REGION_ICCM_SIZE
88#endif
9- #if (DCCM_SIZE !=0)
10- DCCM : ORIGIN = DCCM_START , LENGTH = DCCM_SIZE
9+ #if (REGION_DCCM_SIZE !=0)
10+ REGION_DCCM : ORIGIN = REGION_DCCM_START , LENGTH = REGION_DCCM_SIZE
1111#endif
12- #if (EXT_ROM_SIZE != 0)
13- EXT_ROM : ORIGIN = EXT_ROM_START , LENGTH = EXT_ROM_SIZE
12+ #if (REGION_EXT_ROM_SIZE != 0)
13+ REGION_EXT_ROM : ORIGIN = REGION_EXT_ROM_START , LENGTH = REGION_EXT_ROM_SIZE
1414#endif
15- #if (EXT_RAM_SIZE != 0)
16- EXT_RAM : ORIGIN = EXT_RAM_START , LENGTH = EXT_RAM_SIZE
15+ #if (REGION_EXT_RAM_SIZE != 0)
16+ REGION_EXT_RAM : ORIGIN = REGION_EXT_RAM_START , LENGTH = REGION_EXT_RAM_SIZE
1717#endif
1818}
1919
You can’t perform that action at this time.
0 commit comments