Skip to main content
Senior
August 10, 2025
Question

Programming a virgin STM32G0B1

  • August 10, 2025
  • 2 replies
  • 550 views

I'm trying to program a virgin SYM32G0B1 with the code I've developed and successfully run on the NUCLEO-G0B1RE/NUG0B1RE$AU2 development board. I'm using the STM32CibeProgrammer 2.20.0 software and an FTDI cable (TTL-232RG-VIP-WE with the Vcc line connected to the 3.3 Vdc rail) connected to LPUART1 on port PC0/PC1. I have the BOOT0 signal (PA14) tied to ground.

Having no success with my new hardware, I decided to try the development kit as a sanity check, so changed JP2 to use E5V and connected a 5-volt supply. The dev board runs just fine with that. I connected the FTDI cable to PC0/PC1 on CN10, and shorted PA14 on CN7 to ground. Unfortunately, I also cannot program that MCU. The programmer's log shows:

16:41:26 : RTS low
16:41:26 : DTR Low
16:41:26 : Serial Port COM6 is successfully opened.
16:41:26 : Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
16:41:30 : Timeout error occured while waiting for acknowledgement.
16:41:30 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...

I've verified the FTDI cable works (short TX to RX and look for echoed characters) and swapped Tx with Rx, just in case that was the culprit.

 

I'm sure I must have overlooked something, but what?

2 replies

TDK
Super User
August 11, 2025

PC0/PC1 are not pins that are supported by the bootloader. Check AN2606 to see supported pins. PA9/PA10, PA2/PA3, and PC10/PC11 are supported.

https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

 

In order to boot into the bootloader, BOOT0 should be HIGH on power-on, not low. AN2606 has details on that as well.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Senior
August 11, 2025

I just discovered I couldn't use an LPUART port myself, so I switched to PA2/PA3 and tied BOOT0 high, followed by a power cycle. Advanced Serial Port Monitor, in Spy mode, does show some activity, notably one or two 0x7f's.Same for PA9/PA10 and PC10/PC11.

Tesla DeLorean
Guru
August 11, 2025

Needs to use EVEN parity

You get ONE shot at sending the 0x7F training pattern, and it should respond with an 0x79

If you don't get that, the pattern has not be accepted correctly, and you must reset and try again.

You can't have any traffic or noise on any other the UART RX pins supported by the loader, per AN2606. So things like GPS/GNSS squawking at start-up will be a problem.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Senior
August 16, 2025

I start by doing a complete chip erase using ST-LINK. I looked to see if I could reset the flash option bits to factory settings, but that option is not available for my device (0x467). The three BOOT bits are all set, I then disconnected ST-LINK and connected to my serial port (COM6) using RealTerm, using EVEN parity, 115200 baud, and 1 stop bit. I have BOOT0 tied high, Rx from my serial port (COM6) goes to PA2, and Tx to PA3. Next, I reset the MCU by momentarily grounding !NRST, then send 0xFE from RealTerm.

No response.