Skip to main content
Associate
August 20, 2026
Question

STM32H573 – Detecting whether the device is running in the ST System Bootloader

  • August 20, 2026
  • 2 replies
  • 20 views

Hi,

I am working with an STM32H573 and would like to reliably detect when the device is running in the built-in ST System Bootloader.

Is there any supported mechanism to determine that the MCU has entered the System Bootloader?

For example, is there any status information, register, persistent flag, GPIO behavior, or other mechanism that can be used to distinguish the System Bootloader from the normal user application?

The goal is to provide an external indication when the device is in this state. A status LED would be one possible example, but I am mainly interested in whether there is a general and reliable way to detect the System Bootloader state.

In our setup, Secure Manager is enabled, so entering the System Bootloader may also happen as part of the secure boot / recovery flow.

Is there any recommended approach for this on STM32H573 devices?

Thanks!

2 replies

Bob S
Super User
August 20, 2026

Sure - pick a pin that the bootloader doesn’t use (see AN2606) and the H573 doesn’t config out of reset (see the GPIO register “reset values” in the reference manual).  When the bootloader is running the pin will remain in its reset configuration (usually tri-stated or analog input).  When your code is running you can drive it high or low, or toggle an LED, or do whatever.

Karl Yamashita
Principal
August 20, 2026

If you’re using USB you can send a console command “STM32_Programmer_CLI.exe -l usb” and Cube programmer should return something similar to this...

      -------------------------------------------------------------------
STM32CubeProgrammer v2.22.0
-------------------------------------------------------------------

===== DFU Interface =====

Total number of available STM32 device in DFU mode: 1

Device Index : USB1
USB Bus Number : 001
USB Address Number : 002
Product ID : STM32 BOOTLOADER
Serial number : FFFFFFFEFFFF
Firmware version : 0x011a
Device ID : 0x0448

If using UART, send a 0x7F to device. If you are in DFU mode, the bootloader will return 0x79.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source