Hi,Dear Friends,
When the program returns from the Interrupt service program,the PC pointer must be poped from stack.But I found that the PC pointer is error,the stack content which is PC pointer saved is DE7F,but when poped from the stack,the PC pointer is FE7F.Could you help explain why?
Thanks.
Ningyinggen
Hi,
How about you post your ISR code then.
Hello Ningyinggen,
You might try increasing the size of the stack. When the stack is too small, more often the stack will over-write static variables. However, it is also possible that a write to a static variable, within an ISR, can corrupt the stack under these circumstances.
If the unspecified device that you are using has a very small amount of RAM, another possibility is to allocate global/static variables to zero page RAM. This would allow you to increase the stack size. With a small device, it is also inadvisable to attempt to implement floating point operations. Nested interrupts should also be avoided. These require copious quantities of stack.
Regards,
Mac