Skip to main content
mar
Associate
February 5, 2010
Question

Usage exception on return from ext. SRAM

  • February 5, 2010
  • 2 replies
  • 606 views
Posted on February 05, 2010 at 10:40

Usage exception on return from ext. SRAM

    This topic has been closed for replies.

    2 replies

    joseph239955_st
    Visitor II
    May 17, 2011
    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
    marAuthor
    Associate
    May 17, 2011
    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.