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
Solved! Go to Solution.
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.
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!
-----------------------------------------------------------------------------------------------------------------------
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
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.
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.
Hope this helps,
Regards,
Santiago