Skip to main content
Associate III
July 14, 2025
Question

How to monitor SCB registers with VS code during debugging?

  • July 14, 2025
  • 8 replies
  • 1268 views

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 

8 replies

Nawres GHARBI
Technical Moderator
July 16, 2025

Hi @mani9989 

just to understand, you need support on PlatformIO ?

mani9989Author
Associate III
July 16, 2025

Hello @Nawres GHARBI ,

I wanted to readout the SCB information when a trap occurs. 

BR
Mani 

Nawres GHARBI
Technical Moderator
July 16, 2025

you can use the fault status register view in the debug pane of VSCode

 

NawresGHARBI_0-1752670743589.png

 

mani9989Author
Associate III
July 16, 2025

mani9989_0-1752677740244.png


i dont see the fault registers 

 

Nawres GHARBI
Technical Moderator
July 17, 2025

which version of the extension are you running ?

mani9989Author
Associate III
July 17, 2025

These are the svd files we are using. 
STM32H533.svd

 

I have the attached the same.

 

Best Regards,

Manikanta 

Nawres GHARBI
Technical Moderator
July 17, 2025

could you share which version of the STM32Cube extension for VSCode you are using ?

mani9989Author
Associate III
July 17, 2025

hello @Nawres GHARBI 
i am using the platform io framework . 

Best Reagrds,

Manikanta 

Nawres GHARBI
Technical Moderator
July 18, 2025

so I invite you to use our extension where you will find more features

mani9989Author
Associate III
August 1, 2025

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

Associate III
October 3, 2025

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
March 9, 2026

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.