cancel
Showing results for 
Search instead for 
Did you mean: 

How to monitor SCB registers with VS code during debugging?

mani9989
Associate III

Hello Team, 

Since SCB and other core registers are not included in the SVD file for STM32H5, could you please advise on the best way to access or monitor SCB registers (e.g., VTOR, AIRCR, ICSR) during debugging in VS Code with PlatformIO?

Specifically, I'm looking for guidance on:

  1. How to inspect SCB register values during a debug session (e.g., trap cause, exception entry).

  2. Recommended approach to capture trap/exception information like:

    • HardFault status (HFSR)

    • Configurable Fault Status (CFSR)

    • Bus Fault (BFAR)

    • MemManage Fault (MMFAR)

  3. Any suggestions for manual mapping or watch expressions in the debugger that would allow me to monitor these registers, since they’re not shown in the peripheral view.

Any tips or best practices for bare-metal Cortex-M33 debugging without full SVD support would be greatly appreciated.

Best regards,
Manikanta 

12 REPLIES 12
mani9989
Associate III

Can you direct me to the documentation of the vs extension. 

mark03
Associate III

I'd like to add my request to show all of the fault registers in the "STM32CUBE FAULT STATUS REGISTERS" view.  Right now, I don't see a way to inspect the fault address, for example when I get a MemFault with the MMARVALID bit set, I can't see any way to actually look at MMFAR, which rather defeats the purpose of having the MPU configured.

EDIT:  I was able to inspect MMFAR by setting a Watch with its memory address (since it's a memory-mapped register).  But this is far from ideal.  It would be nice if all of the fault-related registers showed up in the FAULT STATUS REGISTERS window.

Florent V
ST Employee

Hi @mani9989,

FYI a new release of the extensions containing a fix for this issue has just been published.

The cortex core register are now available directly in the STM32Cube Registers tree view:

Cortex-core-registers.png

Kind Regards,

/Flo

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.