cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set lower SysTick interrupt priority?

sima2
Associate III
Posted on September 15, 2010 at 21:12

How do I set lower SysTick interrupt priority?

1 REPLY 1
Posted on May 17, 2011 at 14:07

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);

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..