Re:stack pointer access?
Hello all... I just got the problem solved with help from Luminary's tech support:
In my ISR i used the inline assembler:
__asm("MOV r0, sp"); __asm("BL StackAccess");
to pass the Stack Pointer to a function:
void StackAccess(unsigned long *sptr) { printf(" pc = 0x%08Xn", sptr[6]); }
which prints out the value of the PC (offset from the current stack pointer by 24).
I thought this was very helpful and wanted to share with all.
Thanks!
login or register to reply
|