How do you change the priority level of an interrupt?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do you change the priority level of an interrupt?

Jump to solution
693 Views
davepfaltzgraff
Senior Contributor I

I am trying to use the xSemaphoreGiveFromISR() routine under FreeRTOS. From what I can tell from the FreeRTOS documentation is that I need to change the hardware priority level to something other than the default in order for this to work.

 

How can I do this? (Where can I find the appropriate documentation?)

 

Thanks.

Labels (1)
0 Kudos
1 Solution
463 Views
davepfaltzgraff
Senior Contributor I

Digging through the core_cm4.h file, I found that

NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)

does what I need. I set the priority level to 7 (anything other than the default of 0) and now I am able to correctly execute the xSemaphoreGiveFromISR() routine.

View solution in original post

2 Replies
464 Views
davepfaltzgraff
Senior Contributor I

Digging through the core_cm4.h file, I found that

NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)

does what I need. I set the priority level to 7 (anything other than the default of 0) and now I am able to correctly execute the xSemaphoreGiveFromISR() routine.

463 Views
joebirch
Contributor III

David

I had this problem too, thanks for the tip

Joe

0 Kudos