Skip to main content
Associate
November 24, 2024
Solved

STM32G071CBU6 DFU and UART Bricking issue

  • November 24, 2024
  • 3 replies
  • 2638 views

Just startet my small modbus therrmocouple project and im facing the issue with STM32G071CBU6.

       First of all im not abble to connect via DFU usb, device isnt recognize i try reinstal stmCubeProgrammer, didnt change anything. Then try install drivers too device manualy, windows claims that best drivers are installed.

       Second, im abble to connect via UART and put bin inside but the problem is im abble to do it only once (tried 2 IC's), after that programms run OK but device isn't visible via UART anymore. What's weird is that chip doesn't react to BOOT0 (PA14) state change's. Low is boot from flash, high from bootloader. No matter if its high or low, or even floating programm is running. The only way to erase chip is connecting via STLink, than UART works again untill next bin being write. Anybody face simmiliar issue?

Schematic in attached.

stm32 dfu issue.png

Best answer by MHoll.2

The STM32G0x1 series has the BOOT0 Pin disabled by default. To use the "legacy" Boot mode via BOOT0 You have to write thenBOOT_SEL Bit to 0. see Capter 2.5 of RM0444:

MHoll2_0-1732473053353.png

The BOOT via UART is working the first time only because the flash is empty.

3 replies

gbm
Principal
November 24, 2024

Start by removing R13 - it should not be there. Reduce the 100k resistor on Boot0 to no more than 10k - the internal pullup is ca. 50k, so 100k to GND does not set logic low. There are few other problems with the schematic, but this one looks quite serious.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Associate
November 24, 2024


So i do the changes you mention but unfortunately that didnt change anything. Only difference now is no reaction to usb becouse of lack R13.

gbm
Principal
November 24, 2024

Which means that USB is not activated - the internal D+ resistor is not enabled. Try to connect PA14 to GND directly to invoke the bootloader. Check the USB D lines connection. Check the Vdd value and Vdd and GND connections.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Associate
November 24, 2024

VDD 3.23V directly on stm. PA14 shorted to ground but no effect, but low state isnt flash mode option?

MHoll.2
MHoll.2Best answer
Senior III
November 24, 2024

The STM32G0x1 series has the BOOT0 Pin disabled by default. To use the "legacy" Boot mode via BOOT0 You have to write thenBOOT_SEL Bit to 0. see Capter 2.5 of RM0444:

MHoll2_0-1732473053353.png

The BOOT via UART is working the first time only because the flash is empty.