cancel
Showing results for 
Search instead for 
Did you mean: 

Power cycling breaks debugging STM32H7B3i-DK board with Keil MDK V5.30

onio
Senior

Hi all,

I am experiencing problems when trying to debug the STM32H7B3i-DK board with Keil MDK.

Intermittently I can successfully connect to the target and debug the board by "single stepping and setting break-point etc" using the debugger.

The behavior that I have observed is as following. After a successful debug connection(i.e ability to step through code etc) if I subsequently powered down the board and try powering back up again the debugger would connect but debug session would no longer work but start throwing the following error

 0693W000003PTniQAG.png

And the only way to recover from this condition is going through the following steps.

  • power down board
  • move switch sw1 to "SYS MEM"
  • power up board
  • User STMCubeProgrammer to perform "Fully chip erase"
  • Power up the board

According to the schematic diagram BOOT0 pin is connected to either FLASH(GND) or SYS MEM(3.3V) using the SW1 switch.

I am using the following setup.

Board - STM32H7B3i-DK

OS - Windows 10

Dev tool: Keil MDK V5.30

Driver: STSW-LINK009

Any suggestions on how to solve this would appreciated

5 REPLIES 5

The H7 parts can be very difficult, need to watch very carefully the VOS and LDO/SMPS settings programmed into the devices.

Watch for issues where you reconfigure the debugger pins, or enter low power modes, where the pins and attached logic are turned off internally.

As noted, Recovery can generally be made by cycling power with BOOT0 HIGH, and erasing the user code.

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

Hi Clive1,

Thanks for your response. Where can i find these settings that you mention "VOS and LDO/SMPS"? In order to simply and isolate the issue. I created a new project using STM32CubeMX to configure pins. See attached STCubeGenerated.ioc.

I am not sure I understand what you mean by "Watch for issues where you reconfigure the debugger pins, or enter low power modes, where the pins and attached logic are turned off internally." Can you kindly elaborate more please. As I am using STM32CubeMX for configuring the pins.

Also looking at the RTE configuration do you know why I get the RED block when I enable serial wire debug. For

0693W000003PUUNQA4.png

Do you have a STM32H7B3i-EVAL board or a STM32H7B3i-DK (DISCO) board? It looks like you selected the EVAL board for the Board Support which will not work if you have a '-DK'.

onio
Senior

Yes I am using STM32H7B3i-DK (DISCO) . I would change that and report back.

onio
Senior

[SOLVED]

I have sorted out my issues for now as I am now able to run a simple Blinky program without any issues with debugger or connections. I solved by turning off all the User Configuration flags which enables security feature on the chip using STMCubeProgrammer and also ensured that the correct External Loader is selected as I found out with the help of @JMors.1​  that this option is not selected by default which is correct.

As I understand it, the flags that I turned off were responsible for controlling the Independent Watchdog which initiate an erase of the flash if no kicked before it expires. Just for completeness the flags are also responsible for other things such as voltage monitoring etc.

For my simple test program I don't need to have this feature turn on as I am working with debugger which would require start/stopping code etc.

Many thanks to @Community member​ and most especially @JMors.1​ for the relentless help given yesterday which started from another thread.