Debug the special purpose CONTROL register in STM32H7

248 Views Asked by At

I am using STM32H7, I find in assembly a special-purpose register called "CONTROL", which I assume it is 3 bits long according to this doc.

MSR     CONTROL, r4

After debugging and the ARMv7m documentation, I think "CONTROL" register is just a logical register, which is part of the ACTLR register, where the FPCA bit is the DISFPCA bit in ACTLR, am I right?
I checked the value of the ACTLR after an MSR instruction but no changes at all, What is the CONTROL register and how can I debug it?
What is the address of the CONTROL register and the General Purpose Registers (e.g r4)?

1

There are 1 best solutions below

2
On BEST ANSWER

You are incorrect. The CONTROL register is a unique, special-purpose register. It does not have an address. SP (R13), LR (R14), and PC (R15) registers do not have addresses. The general-purpose registers (R0-R12) also do not have addresses.

The FPCA bit is in the CONTROL register. DISFPCA is a bit in the ACTLR register. ACTLR is a memory-mapped register, MSR will not work with it. I suggest you download the Cortex-M4 or M7 Technical Reference Manual from ARM for more details about these registers.