File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 50
50
51
51
void SystemInit ( void )
52
52
{
53
+
53
54
//***************** SAMD51 ************************//
54
55
#if defined(__SAMD51__ )
55
56
NVMCTRL -> CTRLA .reg |= NVMCTRL_CTRLA_RWS (0 );
@@ -97,6 +98,10 @@ void SystemInit( void )
97
98
* 4) Enable DFLL48M clock
98
99
*/
99
100
101
+ while ( GCLK -> SYNCBUSY .reg & GCLK_SYNCBUSY_GENCTRL0 ){
102
+ /* Wait for synchronization */
103
+ }
104
+
100
105
/* DFLL Configuration in Open Loop mode */
101
106
102
107
OSCCTRL -> DFLLCTRLA .reg = 0 ;
@@ -203,6 +208,8 @@ void SystemInit( void )
203
208
/*---------------------------------------------------------------------
204
209
* Set up main clock
205
210
*/
211
+
212
+
206
213
GCLK -> GENCTRL [GENERIC_CLOCK_GENERATOR_MAIN ].reg = GCLK_GENCTRL_SRC (MAIN_CLOCK_SOURCE ) |
207
214
GCLK_GENCTRL_IDC |
208
215
//GCLK_GENCTRL_OE |
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ compiler.warning_flags.all=-Wall -Wextra
33
33
34
34
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
35
35
compiler.c.cmd=arm-none-eabi-gcc
36
- compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -O0 {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
36
+ compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
37
37
compiler.c.elf.cmd=arm-none-eabi-gcc
38
38
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
39
39
compiler.S.cmd=arm-none-eabi-gcc
You can’t perform that action at this time.
0 commit comments