Proper BASEPRI on Kinetis when interrupt priorities are used

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

Proper BASEPRI on Kinetis when interrupt priorities are used

ソリューションへジャンプ
964件の閲覧回数
konrada_anton
Contributor III

Hello all,

 

In my K60-based MQX system, I need interrupts of different priorities. So far, I've used _bsp_int_init to assign priorities to the  interrupt vectors I want to have high priority, leaving ordinary interrupts untouched. When I look at the NVIC_IPRxx registers in the CodeWarrior 10 debugger, I see priority 0xC0 everywhere, except for my high-priority interrupts, some of which are at 0x80, some very urgent ones at 0x60. So far, so good.

 

On entering an ISR installed using _int_install_isr, I read BASEPRI as 0xC0, and PRIMASK as 0, i.e. every interrupt with priority 0x80 or 0x60 is welcome to interrupt this ISR. Hence, my 0x60 urgent ISR can be interrupted by a less-urgent 0x80 ISR, even if the first C instruction in its body is _int_disable().

 

Are my observations and conclusions correct? Is there a way I can achieve prioritized interrupts without using kernel ISRs everywhere?

 

0 件の賞賛
1 解決策
449件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Konrada,

First I'm not expert on the Kinetis NVIC yet.

The _int_install_isr() is actually registering your ISR function to a table that the kernel ISR will reference.  If you want your ISR to be highest you might want to implement a _int_install_kernel_isr() call.

Look at this post for further information on this topic:

https://community.freescale.com/message/92916#92916

Hope this helps.

Regards,

David

 

元の投稿で解決策を見る

0 件の賞賛
1 返信
450件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Konrada,

First I'm not expert on the Kinetis NVIC yet.

The _int_install_isr() is actually registering your ISR function to a table that the kernel ISR will reference.  If you want your ISR to be highest you might want to implement a _int_install_kernel_isr() call.

Look at this post for further information on this topic:

https://community.freescale.com/message/92916#92916

Hope this helps.

Regards,

David

 

0 件の賞賛