Skip to main content
sima2
Associate III
September 15, 2010
Question

How do I set lower SysTick interrupt priority?

  • September 15, 2010
  • 1 reply
  • 671 views
Posted on September 15, 2010 at 21:12

How do I set lower SysTick interrupt priority?

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    May 17, 2011
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..