2010-09-15 12:12 PM
How do I set lower SysTick interrupt priority?
2011-05-17 05:07 AM
You need to configure the NVIC to have multiple levels of preemption and park the Timer 5 in a lower preemption level. Within a preemption group, higher subpriority levels have lower importance and will be serviced last as the M3 tail-chains from one pending interrupt, at the preemption level, to the next.
Replace EXTI9_5_IRQChannel with your timer 5 channel. /* Configure one bit for preemption priority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1); /* Enable the EXTI9_5 Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); /* Set SysTick interrupt vector Preemption Priority to 1 */ NVIC_SystemHandlerPriorityConfig(SystemHandler_SysTick, 1, 0);