This is fixed in AFS 1.4. RMTarget, as supplied in AFS 1.2 and AFS 1.3, uses a sequence of instructions that accesses banked registers after a forced user-mode STM. To fix this, you must add a NOP as follows: 1) In the Sources/rm_asm.s file, locate the following code in the rm_PollRunningToStoppped function:
STMIA lr, {a1,a3,r5-r14}^ ; Save user-mode r3-r14. ADD a1, lr, #12*4 ; a1 points to r[15]
2) Insert a NOP instruction as follows:
STMIA lr, {a1,a3,r5-r14}^ ; Save user-mode r3-r14. NOP ; need a 1 instruction gap before reading lr ADD a1, lr, #12*4 ; a1 points to r[15]
(DE 63660)
|