Skip to main content
Explorer II
July 14, 2025
Question

How to monitor SCB registers with VS code during debugging?

  • July 14, 2025
  • 7 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 

    This topic has been closed for replies.

    7 replies

    Technical Moderator
    July 16, 2025

    Hi @mani9989 

    just to understand, you need support on PlatformIO ?

    mani9989Author
    Explorer II
    July 16, 2025

    Hello @Nawres GHARBI ,

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

    BR
    Mani 

    Technical Moderator
    July 16, 2025

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

     

    NawresGHARBI_0-1752670743589.png

     

    mani9989Author
    Explorer II
    July 16, 2025

    mani9989_0-1752677740244.png


    i dont see the fault registers 

     

    Technical Moderator
    July 17, 2025

    which version of the extension are you running ?

    mani9989Author
    Explorer II
    July 17, 2025

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

     

    I have the attached the same.

     

    Best Regards,

    Manikanta 

    Technical Moderator
    July 17, 2025

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

    mani9989Author
    Explorer II
    July 17, 2025

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

    Best Reagrds,

    Manikanta 

    Technical Moderator
    July 18, 2025

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

    mani9989Author
    Explorer II
    August 1, 2025

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

    Graduate
    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.