Skip to main content
Associate
October 26, 2023
Solved

USB DFU configuration / use

  • October 26, 2023
  • 7 replies
  • 6114 views

Hi,

I used a F105RCT6 in a custom board, i want to use the DFU mod.

When I generate the project with cubemx I select USB DEVICE and DFU mid, i change the clock configuration corectly. 

I generate the FW, and i flash him.

The DFU is running, i open cubeprogrammer, i can read the mcu but i can't flash him... or i flash but the fw is don't running, i'm don't understand... 

For me, just the dowload is block.

Help me :)

This topic has been closed for replies.
Best answer by Shirley.Ye

Please check your reference manual for the flash chapter. Generally we do not support write-while-read function for flash, so you need to use IAP(bootloader) to program the internal flash 

ShirleyYe_0-1698632510290.png

 

7 replies

TDK
October 26, 2023

Can you use the built in bootloader USB DFU instead?

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate
October 26, 2023

I can't :\ 

To give you the global context :

My objective is to use the usb port in Virtual COM mode, and to go in DFU mode with a specific command on the this virtual port. 

 

My firmware is running good, i send a specific command and is going in DFU mode, i can read that's nice, but i can't erase and write ( i juste can read ) 

 

I hope I was quite precise

TDK
October 26, 2023

> My objective is to use the usb port in Virtual COM mode, and to go in DFU mode with a specific command on the this virtual port. 

You can jump to the bootloader at will. Doing so will cause the board to be re-enumerated as a USB DFU device.

https://community.st.com/t5/stm32-mcus/how-to-jump-to-system-bootloader-from-application-code-on-stm32/ta-p/49424

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate
October 27, 2023

i don't resolve my problem :(

I think the problem is : i doesn't have CPU information loaded in dfu mod (see picture )

Capture d'écran 2023-10-27 100706.png

 

TDK
October 27, 2023

What's the problem? Looks like DFU is running fine.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Shirley.Ye
Shirley.YeBest answer
ST Employee
October 30, 2023

Please check your reference manual for the flash chapter. Generally we do not support write-while-read function for flash, so you need to use IAP(bootloader) to program the internal flash 

ShirleyYe_0-1698632510290.png

 

Associate
November 2, 2023

Do you know how I can use the bootloader to update in USB mod ?