This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2378 - RTX protect interrupts handler

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.