How do you change the priority level of an interrupt?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How do you change the priority level of an interrupt?

跳至解决方案
861 次查看
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.

标签 (1)
0 项奖励
回复
1 解答
631 次查看
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.

在原帖中查看解决方案

2 回复数
632 次查看
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.

631 次查看
joebirch
Contributor III

David

I had this problem too, thanks for the tip

Joe

0 项奖励
回复