Skip to main content
areify
Associate III
January 16, 2019
Question

How to correctly config interrupts priority (using HAL)?

  • January 16, 2019
  • 0 replies
  • 629 views

Hi there.

I'm trying to set up my NVIC but I'm not able to understand how they work.

I'm using two timers, GPIO and UART. I used the function HAL_NVIC_SetPriority and set the next priorities:

TIM 1 -> (Preempt: 0, sub: 0)

TIM2 -> (Preempt: 1, sub: 0)

UART -> (Preempt: 2, sub: 0)

GPIO -> (Preempt: 3, sub: 0)

I don't know if this is correct, but it's working properly. My problem comes when, using 3 channels of TIM1 at same time, I have nested interrupts. This made my interrupts not to jump at specified time.

My question is simple... how can I set the priority of the output compare interrupts of my timer?

I think that I'm not understanding this format of priority (preempt, sub) as well I need...

Thank you in advance

This topic has been closed for replies.