diff options
| author | Damien George | 2014-03-12 22:08:19 +0000 |
|---|---|---|
| committer | Damien George | 2014-03-12 22:08:19 +0000 |
| commit | f555d5decacba64547c0c2a5cc1d4b150a9f21d2 (patch) | |
| tree | 3e591bb455a9b8c728cd680db3c3038238a7ed2d | |
| parent | 4ef1dbcbf600d621c827a5c7617cef82d4a2e222 (diff) | |
stmhal: Set SysTick priority to highest level.
| -rw-r--r-- | stmhal/main.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/stmhal/main.c b/stmhal/main.c index 33cf617ad..ec913c30c 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -243,6 +243,10 @@ static void SystemClock_Config(void) { for (;;) { } } + + // Make SysTick interrupt have the highest priority + // This is needed so that SysTick runs in all ISRs. + NVIC_SetPriority(SysTick_IRQn, 0); } int main(void) { @@ -283,18 +287,9 @@ int main(void) { } #if 0 - - // update the SystemCoreClock variable - SystemCoreClockUpdate(); - - // set interrupt priority config to use all 4 bits for pre-empting - NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); - - // enable the CCM RAM and the GPIO's - RCC->AHB1ENR |= RCC_AHB1ENR_CCMDATARAMEN | RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN; - _fatal_error("done"); #endif + #if 0 #if MICROPY_HW_HAS_SDCARD { |
