We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi !
I have coded 2 interrupts handlers for "time syncronisation app" : _ one is called by TIMER1 expiration to increment sec/msec variables updateClk() _ an other one is called on TTL signal to set sec/msec to arbitrary value (sync) syncClk()
From this link I've seen that these two handlers may execute in parallel which may cause data corruption : www.keil.com/.../rlarm_ar_inter_funct.htm
What I cannot find is : 1) how to check if interrupts nesting is enabled or not and how to disable it. 2) If I can't disable interrupts nesting I though about adding code to disable specific interrupt but does it mean that I would lose the hardware event. For example when executing syncClk() :
I disable TIMER1 MR0 match interrupt update sec/msec var enable TIMER1 MR0 match interrupt
If MR0 MATCH event occured during this process will the interrupt occures when I restore it ? Or do I simply lose it ?
Thanks for response.
I got the answer in the "getting started with RL-ARM". Interrupts are not nested on ARM7/9 architecture, they are for cortex. So I don't need disabling interrupts to avoid data corruption.
I'm still having some doubt about 'interrupt nesting'. From these links :
http://www.keil.com/support/docs/3135.htm http://www.keil.com/support/docs/3353.htm
I understand that LPC23XX can handle interrupt nesting if you implement you're 'it handlers' in a specific way. The "default" code that use 'VICVectAddr' does not allow interrupt handling.
When using RTX, the OS Tick implementation does not allow interrupt nesting. However I don't understand why we associate in some threads "interrupt nesting" and "RTX" as the OS tick has the highest priority and shall never be pre-empted.