Skip to main content
Associate
March 18, 2024
Solved

USB DFU STM32G474

  • March 18, 2024
  • 3 replies
  • 3070 views

Hello,

I'm using NUCLEO-G474RE kit with soldered USB on PINs:

PA11 - USB Data minus

PA12 - USB Data plus

VIN - VBUS

In the User configuration I have:

nSWBOOT = Checked

nBOOT0 = Checked

nBOOT1 = Checked

jha92_1-1710772303832.png

There is programmed program with blinking LED so I know it is running.

 

The BOOT0 on board is connected after reset or power up.

jha92_0-1710772182564.png

Unfortunately the bootloader never start and the board is blinking with my program instead. Can you please help what could be wrong so the bootloader doesnt start?

Does the bootloader recognize if there is USB connected automatically?

 

Thank you.

 

Jan

 

 

 

 

 

This topic has been closed for replies.
Best answer by AScha.3

Hi,

> Does the bootloader recognize if there is USB connected automatically?

If pin boot0 is hi at start/reset , bootloader tries all possible inputs (see rm ).

If boot0 lo  , flash/user program is started.

AScha3_0-1710774045663.png

So set pin PB8 with a pullup to VDD hi , seems on the board is no pullup.

Or use a jumper cable from JP7 to VDD on the pin header for boot0 .

3 replies

AScha.3
AScha.3Best answer
Super User
March 18, 2024

Hi,

> Does the bootloader recognize if there is USB connected automatically?

If pin boot0 is hi at start/reset , bootloader tries all possible inputs (see rm ).

If boot0 lo  , flash/user program is started.

AScha3_0-1710774045663.png

So set pin PB8 with a pullup to VDD hi , seems on the board is no pullup.

Or use a jumper cable from JP7 to VDD on the pin header for boot0 .

If you feel a post has answered your question, please click on " Best Answer ".
TDK
March 18, 2024

You're not in the mode that you highlighted. You want nSWBOOT0=0.

with nSWBOOT0=1 and BOOT0=0, you are booting to main flash (regardless of nBOOT0 and nBOOT1 settings).

> Does the bootloader recognize if there is USB connected automatically?

Yes, it will auto detect and connect.

"If you feel a post has answered your question, please click ""Accept as Solution""."
jha92Author
Associate
March 18, 2024

 

Here is the configuration I'm using now, but same result:

jha92_1-1710773851175.png

To make it more clear JP7 is connecting the BOOT.

jha92_0-1710774117925.png