Flashing bin file for blinky demo for Blue Led gets "stuck" on first power cycle?

Hi all,

I was able to flash my GIGA R1 board with this simple blinky demo Troubleshooting basic stm32h7xx_hal blinky example on an Ardunio GIGA Wifi R1 board (it has a Cortex M4/M7 chip STM32H747XI, same as the Portenta H7) · GitHub

The main "trick" was to configure the linker to use the entire flash 0x08000000 (this essentially removes the mbed core bootloader).

However, the issue I face is as follows:

  1. Start ensuring the mbed bootloader is operational on the board. Replace as needed.
  2. Ensure memory.x uses 0x08000000 for the Flash address.
  3. Compile the blinky demo (see gist).
  4. Create the bin file /opt/homebrew/bin/arm-none-eabi-objcopy -v -O binary target/thumbv7em-none-eabihf/release/stm32_blink target/thumbv7em-none-eabihf/release/stm32_blink.bin
  5. Start the board in DFU mode and burn. Ensure sudo dfu-util -l shows the correct device address as Found DFU: [0483:df11] ver=0200, devnum=1, cfg=1, intf=0, path="1-1", alt=0, name="@Internal Flash /0x08000000/16*128Kg"
  6. Burn it with sudo dfu-util -a 0 -d 0483:df11 -s 0x08000000 -D *.bin

The first time I do this, I can click the RST button on the Giga R1 board, and the BLUE led will start to flash.

However, the problem I'm running into is when I power-cycle the board for the first time after flashing the board. Whatever I try, I simply cannot get the LED to flash again. Power-cycling the board essentially appears like the board is dead.

The only way to recover is to repeat the above steps, i.e. return to DFU mode, replace with the mbed_giga bootloader, re-enter DFU mode and flash the bin file.

Of course, this will cause the BLUE led to flash but only before we power-cycle it for the first time.

Any ideas? Have I missed anything obvious?

Thanks!

The solution was to fix my code, I needed to use the LDO. This is done by setting:

    let mut pwrcfg = pwr.ldo().freeze();

Consider this issue as resolved, thanks.

1 Like