0

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)?

Hamdim
  • 19
  • 6

1 Answers1

1

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.

  • isn't the address space from 0xDFFF FFFF to 0xFFFF FFFF for Vendor Specific memory and Private Peripheral Bus(shouldn't the registers in these address and everything is addressable and the compiler change the names of these registers to some addresses?) – – Hamdim Aug 23 '22 at 12:26
  • Yes, that is the Vendor_SYS region. No, the compiler does not change the name of any memory-mapped registers. Your code must define these register addresses, for example: #define SYST_CSR 0xE000E010 //SysTick Control and Status Register – ScottAzureRTOS Aug 24 '22 at 15:36