cancel
Showing results for 
Search instead for 
Did you mean: 

Clarification on Debug Register Configuration in STM32H755

wukong
Associate

Hi,

I'm working with the NUCLEO-H755ZI-Q, which features dual cores (Cortex-M4 & Cortex-M7). I’m trying to understand whether these two cores have separate debug registers, such as DHCSR (Debug Halting Control and Status Register).

I have reviewed RM0399 and the Armv7-M Architecture Reference Manual, but I couldn't find a definitive answer. To investigate further, I attempted to access DHCSR (0xE000EDF0) on AP0 and AP3 using STM32CubeProgrammer, and I observed that both cores displayed the same value. However, when running a project in STM32CubeIDE, where I separately access DHCSR on M4 and M7, I see different values for each core.

This discrepancy has left me confused about the debug register configuration on STM32H755. Do Cortex-M4 and Cortex-M7 maintain independent debug registers, or are they shared?

Any insights or official documentation references would be greatly appreciated!

5 REPLIES 5
TDK
Guru

Each core has its own debug registers. The DHCSR register and other debug registers are part of the Cortex core.

If you feel a post has answered your question, please click "Accept as Solution".

Thank you for your help! Is there any manual or example that supports this?

wukong
Associate

Assuming that each core maintains its own set of debug registers, how do the M4 and M7 cores get different values ​​when accessing the same physical address 0xE000EDF0?

TDK
Guru

Not sure anything spells it out explicitly.

You can see the ARM documentation to see that DHCSR is part of the M7 and M4 cores, just like a bunch of other things like registers, VTOR, etc. There are two cores on the chip. I think it's up to you to connect the dots.

> Assuming that each core maintains its own set of debug registers, how do the M4 and M7 cores get different values ​​when accessing the same physical address 0xE000EDF0?

When you debug the chip, you connect to an access point which is connected to a core. Here, either AP0 (M7) or AP3 (M4). When you ask for data at an address, it gets what is mapped at that address for that core. They share much of the same mapping (like SRAM) but not everything. Core registers are core-specific.

 

SCB->CPUID on M7 core (AP0):

TDK_1-1742212898494.png

 

SCB->CPUID on M4 core (AP3):

TDK_0-1742212840856.png

 

If you feel a post has answered your question, please click "Accept as Solution".

The two core have independent address spaces. They dual-port some common RAM and FLASH regions, and access to the peripherals.

The debug registers are unique to each Cortex-Mx core.

ARM has technical manuals. ST has the Programming Manuals (PM) which cover the debug registers to an extent.

Perhaps also check the Reference Manual (RM) to better understand the internal connectivity and the bus relationships with the cores, memory and peripherals .

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..