NVIC interrupt

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

NVIC interrupt

Jump to solution
800 Views
Nouchi
Senior Contributor II

Hello,

Is it possible to force, by setting a bit somewhere, an interrupt on a NVIC_Reserved vector?

I see people asking, why he want to do that?.

Because, I use an ISR outside MQX at high frequency rate, and I need to set an lwevent when process is done, so I need to trigger by software an other interrupt (declared in MQX) performing the _lwevent_set.

It's a little bit tricky, but it respect real-time rules, and I already use this trick with coldfire V2.

I need to know how to access NVIC register.

I admit, NVIC is a big black box for me, if someone can give me some clues.

Thanks,

Emmanuel

0 Kudos
1 Solution
503 Views
yasuhikokoumoto
Senior Contributor I

Hi Emmanuel,

basically all interrupt sources are held in ISPRx and ICPRx registers and they are not automatically cleared until ICPRx write to the corresponding bits.
Also you can cause all interrupt by setting to the ISPRx desired bit.
I don't know the MQX OS. So I don't have an answer for the second question.
Doesn't the system call exit which can change the vector?
If VTOR had not been changed, you can make unused vectors common vector when building the flash code image.

Best regards,

Yasuhiko Koumoto.

View solution in original post

0 Kudos
4 Replies
503 Views
soledad
NXP Employee
NXP Employee

Hi Nouchi,

Please check the below thread,

The question about timer task.

I hope this helps,


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
503 Views
Nouchi
Senior Contributor II

Thanks Sol,

My problem is not to bypass MQX interrupts, I already done this several times. I just want to know how to force "hardware interrupt" with NVIC.

I guess it can be done by setting bit in ISPRx registers, then the question is : The pending bit should be reset by ISR with ICPRx registers or is auto-cleared ?

And my second question is , should I choose an unused vector or shared a vector with a unused peripheral?

Thanks,

Emmanuel

0 Kudos
504 Views
yasuhikokoumoto
Senior Contributor I

Hi Emmanuel,

basically all interrupt sources are held in ISPRx and ICPRx registers and they are not automatically cleared until ICPRx write to the corresponding bits.
Also you can cause all interrupt by setting to the ISPRx desired bit.
I don't know the MQX OS. So I don't have an answer for the second question.
Doesn't the system call exit which can change the vector?
If VTOR had not been changed, you can make unused vectors common vector when building the flash code image.

Best regards,

Yasuhiko Koumoto.

0 Kudos
503 Views
santiago_gonzal
NXP Employee
NXP Employee

Hello Emmanuel,

You can use the "Software trigger interrupt request" that basically sets the bit of any interrupt you select. Once you've done that, you need to treat the interrupt in the same way you do with any other interrupt of a Cortex M core, so you need to clear the flag yourself.

2015-01-30 10_14_09.png

Hope this helps,

Regards,

Santiago

0 Kudos