How do you change the priority level of an interrupt?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How do you change the priority level of an interrupt?

ソリューションへジャンプ
905件の閲覧回数
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 解決策
675件の閲覧回数
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 返答(返信)
676件の閲覧回数
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.

675件の閲覧回数
joebirch
Contributor III

David

I had this problem too, thanks for the tip

Joe

0 件の賞賛
返信