2024-11-24 04:38 AM
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.
Solved! Go to Solution.
2024-11-24 10:31 AM
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:
The BOOT via UART is working the first time only because the flash is empty.
2024-11-24 05:14 AM - edited 2024-11-24 05:16 AM
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.
2024-11-24 05:42 AM
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.
2024-11-24 07:48 AM
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.
2024-11-24 10:04 AM
VDD 3.23V directly on stm. PA14 shorted to ground but no effect, but low state isnt flash mode option?
2024-11-24 10:31 AM
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:
The BOOT via UART is working the first time only because the flash is empty.
2024-11-24 10:48 AM
2024-11-24 11:47 AM - edited 2024-11-24 12:02 PM
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?
2024-11-24 11:29 PM
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
2024-11-25 09:49 AM
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!