cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G071CBU6 DFU and UART Bricking issue

mistrz_zen
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
MHoll.2
Senior

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.

View solution in original post

9 REPLIES 9
gbm
Lead III

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


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
Lead III

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

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

MHoll.2
Senior

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.

Yess, thank you i was looking at the config but somehow didnt catch this, now only usb option taking my mind, working with others stms but never face this problem.

Also, im still in code debuge stage and im finding usefull serial monitor, in run mode i lost connection is something also to change? 

mistrz_zen_0-1732477609502.png

 

I don't think that the STM32G071 series has an USB controller, if You need USB (FS) you need to switch to the STM32G0B1 or STM32G0C1.

For the Debug via serial please open a new thread.

Martin

Yes you are right! Have to do deeper research in the future, problem in UART serial debugging solved with soft serial in code. Thank you for help!