Hello,
I’ve hit a wall guys…
My problem is as follows:
-
all the processes run normally
-
then external interrupt occures
-
I handle it with eint3 handler (external interrupt 3)
-
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