Debugging STM32 sleep mode

Sysprogs forums Forums VisualGDB Debugging STM32 sleep mode

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35152
    GeneM
    Participant

    I’m working on adding stop, sleep and standby power modes to a STM32H7A3 project.  I’ve bricked the MCU a couple of times. I can usually unbrick it with either a bunch of resets or with STM32CubeProgrammer but I’m hoping to find a better solution.  I found the Debugging STM32L0 Firmware with Sleep Mode with OpenOCD tutorial.  However, it’s from 2016 and the Debug Settings in my VisualGDB Project Properties don’t look like the ones in the tutorial.  I can’t find the Manual Setup mode button or the Interace Startup Script dropdown in this or other property setting tabs.  Is there a way to setup the debugger to wakeup the H7A3 from stop, sleep, or standby mode?

    Thanks

    #35162
    support
    Keymaster

    Hi,

    The only change in the settings since the tutorial is that instead of selecting the “manual mode” and editing each script manually, you can now open the “advanced” view and edit the OpenOCD command line directly. The rest of the tutorial should still apply.

    #35163
    GeneM
    Participant

    I’ve attached a screenshot of my Debug setting with Advanced settings showing.  I don’t see anything that looks like the “reset_config trst_and_srst srst_nogate connect_assert_srst” line that the tutorial references.  I did find the stm32h7x_dual_bank.cfg file the Advanced setting->Command Line refers to in C:\Users\magene\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd\share\openocd\scripts\target.  That file refers to stm32H7x.cfg file which I found in the same directory.  I found the reset_config line in the stm32H7x.cfg file:

    # use hardware reset
    #
    # The STM32H7 does not support connect_assert_srst mode because the AXI is
    # unavailable while SRST is asserted, and that is used to access the DBGMCU
    # component at 0x5C001000 in the examine-end event handler.
    #
    # It is possible to access the DBGMCU component at 0xE00E1000 via AP2 instead
    # of the default AP0, and that works with SRST asserted; however, nonzero AP
    # usage does not work with HLA, so is not done by default. That change could be
    # made in a local configuration file if connect_assert_srst mode is needed for
    # a specific application and a non-HLA adapter is in use.
    reset_config srst_nogate

    Is that the file and line I should modify to

    reset_config trst_and_srst srst_nogate connect_assert_srst

    per the tutorial?

    Thanks

    Attachments:
    You must be logged in to view attached files.
    #35165
    support
    Keymaster

    Hi,

    That’s because the tutorial is for STM32L0 and you are using STM32H7. These are different devices with different OpenOCD scripts that work slightly differently.

    If you are not sure which line to edit, you can try asking on the STM32 forums or OpenOCD mailing lists, but VisualGDB cannot figure out the necessary edits automatically.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.