This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS570LC4357: Understanding of the system configuration register For MPU

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hi,

Can anyone please help me in understanding the assembly code in the MPU for a particular region.

How configuring the cache type in the HALCOGEN for the MPU Region's generate the code for writing the System Configuration Register?

what exactly the instruction        "mcr   p15, #0,    r0, c6, c1, #4"  does? by writing this which register's field are getting updated?

Regards,

Shivam Kakad

  • Hello Shivam,

    The MRC and MCR commands are used to send commands to coprocessors. MRC is used to read coprocessor (CP15 etc) registers and put it into main core registers (R0, R1, ...). MCR is to move the value from ARM core registers to Coproecssor register. 

    mcr p15, #0, r0, c6, c1, #4     is to read MPU region access control register

    p15: co-processor CP15

    #0: CP15 specific opcode1

    r0: arm core register, you can use any arm register here (r0,r1, ...). This register is updated with the returned value from coprocessor registers.

    c6, c1:  MPU memory region programming registers. MPU Region Number Register

    #4: co-processor opcode2

    Please refer to ARM TRM.

  • Thanks Wang, for you quick response.

    It helped me a lot.

    Regards,

    Shivam