How to set priority for systick?

Status
Not open for further replies.

Green

New member
Hi guys
I am recently doing a project by using Teensy3.0 to run code in a 1ms isr with PIT0. Since I am really familiar with STM32, and the priority is the lowest for systick_isr in STM32 and something like NVIC_SET_PRIORITY(n,p) won't be able to set the priority for the device has a smaller number than dma0 on the vector table. However, also there is no core_CM4.h included in the arduino folder, I know we can use NVIC_SetPriority(SysTick_IRQn, 0); included in core_cm4.h to set the priority for systick to highest possible. Because I want the Micros() and Millis() keep running when PIT0_isr is running, so I need systick has higher priority than PITO.
MY question is what is the default systick priority in teensy3.0 and can I just included core_cm4.h then call NVIC_SetPriority(SysTick_IRQn, 0); to raise the priority to highest? is there any other way to set the priority for systick? thank you.

btw, is the default NVIC_priority grouping is group 4? since we can set priorities from 0-15, I assume they are all preemption priority.
 
Last edited:
I found the default priority for systick is 0 since I used micros() to make a delay inside of PIT0_isr when the priority for pit0 is lower than 0, which proved that priority for systick is 0. But what if I want to lower the priority for systick, how I can set it. I included core_cm4.h and called function inside but I couldn't past the compile.
 
Thanks for tracking down that documentation.
I have an application (OSC time stamps) that needs a rock-solid time count stored in more bits (i.e. for PTP resolution). It is good to know where to start from.
 
Status
Not open for further replies.
Back
Top