How to enter USR mode from SVC mode?

Note: This was originally posted on 1st August 2011 at http://forums.arm.com

I changed CPSR to 0x1D0(which means USR mode )in SVC mode in cortex-a8 platform(freescale imx51), but a perfetch_error occured, the PC hung at 0x0c.  Could anybody help me figure this issue out, please?
OR anybody has some code some hwo to enter USR mode from SVC mode?

Best Regards
Jerry
Parents
  • Note: This was originally posted on 2nd August 2011 at http://forums.arm.com

    Hi Jerry,

    Hum, it is strange, because Cortex-A8 and R4 seem to share the same architecture !? What is your compiler ? (for me, it works with both RVCT 4.0 and CCS v4)

    did you also try
    msr cpsr, r1
    ?

    cpsr_c is a sub mask for writing only specific bits... maybe not available for cortex-A8

    Regards

    Christophe
Reply
  • Note: This was originally posted on 2nd August 2011 at http://forums.arm.com

    Hi Jerry,

    Hum, it is strange, because Cortex-A8 and R4 seem to share the same architecture !? What is your compiler ? (for me, it works with both RVCT 4.0 and CCS v4)

    did you also try
    msr cpsr, r1
    ?

    cpsr_c is a sub mask for writing only specific bits... maybe not available for cortex-A8

    Regards

    Christophe
Children
No data
More questions in this forum