STM32H723: Can't connect to bootloader via UART / at all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-04 7:14 AM
I am trying to use the built-in bootloader to flash a new firmware onto my MCU (STM32H723). Unfortunately, I cannot get any reaction from the MCU when trying to connect to it, and I am struggling to diagnose which step is going wrong.
Short version of my steps:
- I pull BOOT0 high & NRST low (before this point, the MCU is running the normal firmware code)
- I release NRST, the MCU starts up again (attaching the ST-Link debugger, I confirmed that the code being execute is around 0x1FF00000, i.e. the MCU is somewhere in the bootloader code)
- I try to connect to the MCU using the STM32CubeProgrammer, set to UART (MCU pins PA9/PA10), baud 9600 (tried everything up to 115200), even parity, 8 data bits, 1 stop bit, flow control off. Whatever settings I try, I always get:
Port configuration: parity = even, baudrate = 9600, data-bit = 8, stop-bit = 1.0, flow-control = off
Timeout error occured while waiting for acknowledgement.
Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again... ​
I am struggling to figure out what's going wrong: Reading the bootloader documentation (AN2606), I get the impression that all the peripherals should by default be disabled, and only once it detects the "activation sequence" on one of them will that one be enabled. So I tried to check with the debugger to see which peripherals are enabled (to maybe figure out which other peripheral is erroneously selected instead of UART): For some reason, most of the relevant peripherals (UART1,2,3 I2C1,2,3, etc) are all simultaneously enabled.
What could I be doing wrong? How can I diagnose this?
More details:
- The MCU is connected to the PC as follows: FT232HQ chip -> Optical isolator (for UART & BOOT0 & NRST) -> MCU (pins BOOT0, NRST, PA9, PA10)
- I pretty sure I am controlling the BOOT0 & NRST pins correctly, given that the MCU is executing code in the 0x1FF00000 range when BOOT0 is high, and 0x08000000 when BOOT0 is not high
- Using a logic analyzer, I can see the 0x7F byte being sent from the PC on the RX pin of the MCU, so the UART communication towards the MCU seems fine. I cannot see anything on the TX pin, so the MCU doesn't seem to ever react.
Solved! Go to Solution.
- Labels:
-
Bootloader
-
STM32H7 series
-
UART-USART
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-06 7:04 AM - edited ‎2025-02-06 7:04 AM
Ok, it looks like I didn't try enough (literally): After trying several more times, I can now get it to work with a ~50% success rate. The full sequenc that works:
- BOOT0 high & NRST low
- Wait 1s
- NRST high
- Wait 1s
- BOOT0 low
- Connect using Baud rate 115200 (9600 works as well), even parity, 8 data bits, 1 stop bit, flow control off
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-06 7:04 AM - edited ‎2025-02-06 7:04 AM
Ok, it looks like I didn't try enough (literally): After trying several more times, I can now get it to work with a ~50% success rate. The full sequenc that works:
- BOOT0 high & NRST low
- Wait 1s
- NRST high
- Wait 1s
- BOOT0 low
- Connect using Baud rate 115200 (9600 works as well), even parity, 8 data bits, 1 stop bit, flow control off
