Explorar el Código

Merge pull request #1176 from jgressmann/bugfix/samd21-systick

samd21: enable SysTick only if running w/o OS
Ha Thach hace 4 años
padre
commit
b4a0f0b273
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      hw/bsp/samd21/family.c

+ 2 - 0
hw/bsp/samd21/family.c

@@ -75,7 +75,9 @@ void board_init(void)
   // Update SystemCoreClock since it is hard coded with asf4 and not correct
   // Update SystemCoreClock since it is hard coded with asf4 and not correct
   // Init 1ms tick timer (samd SystemCoreClock may not correct)
   // Init 1ms tick timer (samd SystemCoreClock may not correct)
   SystemCoreClock = CONF_CPU_FREQUENCY;
   SystemCoreClock = CONF_CPU_FREQUENCY;
+#if CFG_TUSB_OS  == OPT_OS_NONE
   SysTick_Config(CONF_CPU_FREQUENCY / 1000);
   SysTick_Config(CONF_CPU_FREQUENCY / 1000);
+#endif
 
 
   // Led init
   // Led init
 #ifdef LED_PIN
 #ifdef LED_PIN