Not applicable
Oct 20, 2014
12:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 20, 2014
12:39 PM
Figured this issue out and thought I'd post here if anyone else runs into the problem. On Step AB boards and below, each interrupt is wrapped in an veneer function. This causes an interrupt to invoke the veneer and then the veneer invokes your function. In most cases, this is transparent, but if you're attempting to read EXC_RETURN values from lr (e.g., determine PSP or MSP), you're going to get strange behavior.
The work around that I used is below....
The work around that I used is below....
#if UC_STEP <= STEP_AB
ldmia sp, {r2, r3} /* r2 = unused, r3 = EXC_RETURN */
tst r3, #0x4
ITE NE
mrsne r1, psp
bxeq lr
#else
tst lr, #0x4
ITE NE
mrsne r1, psp
bxeq lr
#endif
- Tags:
- IFX
0 Replies