cancel
Showing results for 
Search instead for 
Did you mean: 

Usage exception on return from ext. SRAM

mar
Associate
Posted on February 05, 2010 at 10:40

Usage exception on return from ext. SRAM

2 REPLIES 2
joseph239955_st
Associate II
Posted on May 17, 2011 at 13:39

I guess the following line cause issue:

0x080004C4       mov      r14,pc         <---- r14 = 0x080004C8

This mean the LSB of LR is 0.  When it is used later

0x680000A4  Schedule..:push    {r14}

0x680000B0       pop      {pc}              <---- pc = 0x080004C8

The pop think that it try to switch to ARM state. So it fault in the next instruction execution.

Please check the value of the T bit in xPSR to confirm if this is the cause of the problem.

mar
Associate
Posted on May 17, 2011 at 13:39

Thank you for your answer.

Indeed, the problem is that the processor is not in Thumb mode when it executes the pop at 0x0x80004C8. The problem was the following pop

0x680000B0                      pop      {pc}                          <---- pc = 0x080004C8

This PC does not have B0 set as required.

Thank you very much for your help.