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

Corrupted value in register after interrupt on LPC2368

Note: This was originally posted on 21st July 2009 at http://forums.arm.com

Hello,

I've hit a wall guys...

My problem is as follows:

1. all the processes run normally
2. then external interrupt occures
3. I handle it with eint3 handler (external interrupt 3)
4. after returning form eint3 handler sometimes - not always -
r4 register containes corrupted value. Insted of containing value
which was in before the eint3 interrupt it contains - as it seems -
the value of stack pointer of user mode

Any ideas?

for clearifing my point
void main(void)
{
   while(1)
   {
     /*some code*/
     results_process(); --> eint3handler()
                                     {
                                       /*some code*/
                                platform_powerdown()-->application_powerdown();
                                       /*end of eint3 handler*/
                                     }
   /*register r4 gets corrupted sometimes*/
   }

}


I use RVCT 2.2
All the code is written in THUMB mode, except for eint3_handler which is in ARM mode.


best regards

uros
0