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


    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...


    Ok, It seems that the CPU needs to be in secure state. But the problem is that OS boots in non-secure state. Is there anything that I can do to switch to secure state from non secure state. I need to write to the diagnostic register to fix some erratas. Now it seems a loot like a deadlock.
Reply
  • Note: This was originally posted on 9th November 2011 at http://forums.arm.com


    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...


    Ok, It seems that the CPU needs to be in secure state. But the problem is that OS boots in non-secure state. Is there anything that I can do to switch to secure state from non secure state. I need to write to the diagnostic register to fix some erratas. Now it seems a loot like a deadlock.
Children
No data