This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to enable acces to some registers in ARM cortex a9

Note: This was originally posted on 9th November 2011 at http://forums.arm.com

Hi,

I am trying to execute the following code, which hangs when it tries to execute the second instruction:
....
mrc  p15, 0, r1, c15, c0, 1
mcr  p15, 0, r1, c15, c0, 1
....
Could you please tell me the reason why it hangs and how it can be fixed? Is there a way how I can enable access to the registers?

Thanks
Parents
  • Note: This was originally posted on 9th November 2011 at http://forums.arm.com


    Hi SGS,
    I could advise you to have a look at the operating modes.
    Switching to Supervisor mode would allow access to special registers.
    Have you had a look at the Cortex-A Programmers' Guide from ARM?
    Kindly,
    Alban


    I have tried the following code, which I have placed in the startup function of the OS:

    ldr  r0, =0x13; Supervisor mode
    msr  cpsr_cx, r0
    mrc  p15, 0, r1, c15, c0, 1; This line is fine
    mcr  p15, 0, r1, c15, c0, 1 ; and this one hangs

    No clue here...
Reply
  • Note: This was originally posted on 9th November 2011 at http://forums.arm.com


    Hi SGS,
    I could advise you to have a look at the operating modes.
    Switching to Supervisor mode would allow access to special registers.
    Have you had a look at the Cortex-A Programmers' Guide from ARM?
    Kindly,
    Alban


    I have tried the following code, which I have placed in the startup function of the OS:

    ldr  r0, =0x13; Supervisor mode
    msr  cpsr_cx, r0
    mrc  p15, 0, r1, c15, c0, 1; This line is fine
    mcr  p15, 0, r1, c15, c0, 1 ; and this one hangs

    No clue here...
Children
No data