I am working on LPC2106 microcontroller with Keil development tool.My problem is upon a function execution the controll is getting transferred back but Link Register is not getting next instruction/function's address.Instead LR is loaded with previous instruction's address resulting into either data abort mode or stuck up.
The compiler verison is 2.56 and all code are written in C language. This problem can be easily seen in disassembly window under simulation test.
Can anyone guide me fix the problem?
Thanks in advance