cancel
Showing results for 
Search instead for 
Did you mean: 

USB DFU STM32G474

jha92
Associate

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

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief

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 "Accept as Solution".

View solution in original post

3 REPLIES 3
AScha.3
Chief

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 "Accept as Solution".
TDK
Guru

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".

 

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