2025-04-07 4:43 PM
Hi -
We are having difficulty programming STM32H7 via serial ports PB14-PB15 as USART1. We are setup as described in AN2606, section 56.1 and we're using STM32CubeProgrammer for downloads. The connection is established, but the first bootloader command (get ID) is nack'ed (picture below).
connect, then fail "get-id"
This same procedure works perfectly using PA9-PA10 (also an2606, 56.1). PB14-PB15 fails.
Summarizing our procedure, we first setup the configuration in STM32CubeMX defining PB14-PB15 as USART1 pins (confirmed PA9-PA10 are in reset mode). Then, the configuration is built into a small 'blinky' program and downloaded via ST-Link to the board (nucleo-h755zi), then board reset, pull boot0 high, and attempt a serial download. Probably not needed, but we also added nrst high just to debug/be-safe.
We have noticed that serial downloads are sensitive to baud rates and have found best/most-consistent results at 9600.
What are we missing or overlooking?
Thank you!
2025-04-07 5:50 PM
Two updates:
First, both PB14 (expected pin) and PA9 respond with nacks:
picture 2
Second, the comment above about the uC being sensitive to baud rate was incorrect, ... the Saleae capture is sensitive to baud rate. The picture above is 38400 and connected (then failed with a nack) just fine. :)
2025-04-08 2:03 PM
Hey @Mike_ST , @Andrew Neil - I was reading through @EliazLB uart posts and I was hoping that you might also have some insight into why I'm getting nacks on PB14 when using PB15-PB14 in USART1 mode for serial download/programming. I also occasionally get "under Read Out Protection or Target is held under reset". Just to be safe, I pulled the reset pin high in hardware.
Maybe a setting somewhere in CubeProgrammer? Or, a setting in CubeMx?
This is on a Nucleo-H755zi-q board with STM32H755ZIT3U.
Thank you!!!
2025-04-08 3:49 PM
Oh geesh! Fixed! In addition to paying careful attention to the settings in AN2606, you will need to stop and restart STMCubeProgrammer frequently (at least between testing setups). Pilot error, <insert red-faced-emoji here>, PB14-PB15 is working correctly now.
Note, in AN2606, STM32H755 (section 56) lists table 2 bootloader activation pattern 10 where BOOT_ADD0 is 0x1FF0 and says 'optionbyte'. In Programmer, in the registers tab, this is read-only and ours was set to 0x0800. If you are having issues, this may be a red-herring, as ours is working correctly now with it still set to 0x0800. :)