bmarcot / vega

vega -- The Unix-like Operating System for micro-controllers (ARM Cortex-M4)
6 stars 1 forks source link

cmsis: SysTick_Config sets exception level to highest priority #16

Closed bmarcot closed 7 years ago

bmarcot commented 8 years ago

In files _corecmX.h in the ARM CMSIS:

This line NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL) in SysTick_Config() is suspicious. Basically it enables Nested Interrupts because all other interrupts have a priority set to 0.

In the kernel init function, call NVIC_SetPriority(SysTick_IRQn,0) right after calling SysTick_Config().

bmarcot commented 8 years ago

The issue may become Invalid because there is plan to not using SysTick at all (but platform timers instead).