Trigger interrupt via software

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

Trigger interrupt via software

2,212件の閲覧回数
grzegorzkonopko
Contributor III

Hi

I am looking in to documentation and can not find how to: trigger interrupt via software. What I would like to achieve is trigger peripheral interrupt (like UART) in order to start execution interrupt service routine in way as standard hardware interupt triggered it.

Is is possible in kinetis?

Best Regards

/Greg

1 返信

1,429件の閲覧回数
isaacavila
NXP Employee
NXP Employee

Hello,

Yes, It is possible to do this on Kinetis, you have to write to NVIC's registers, in KDS IDE you can put a pending interrupt with the instruction NVIC_SetPendingIRQ(IRQn_Type IRQn) where IRQn is your Interrupt vector.

ISPR.jpg

This is specify in the ARM documentation (www.arm.com), you can check the Technical Reference Manual for Cortex-M4 or Cortex-M0+, I don’t know what device you are using.

Note that as you are using a “NVIC set pending” there is not flag and you just have to clear the pending in the NVIC registers.

Hope this helps!

Regards,
Isaac