cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F723 DFU Mode - Questions

Russeree
Associate II

I have a few questions about the DFU mode on the STM32F723. My goal is to enable users to flash a binary file to the MCU via a USB connection. My implementation is that i placed a 22uF capacitor on the boot0 pin then tied another IO pin (EO) in this case to boot0. 

To enable DFU mode, currently I pull E0 high for a second to charge the capacitor, then switch the pin to an input to make it high impedance. Next Deinit the USB HS Handle. After that do an NVIC Reset. My issue is that after resetting I don't see any new USB DFU device. Even though my USB CDC/HID Composite device is working at USB HS speeds using the onboard USB 2.0HS PHY.

Here is my Schematic

Russeree_0-1704836128752.png

What do you think I am missing? Linux lsusb, and dmesg show nothing at all. 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

The system USB DFU bootloader is only available on the FS USB.

TDK_0-1704836819825.png

https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

 

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

View solution in original post

5 REPLIES 5
TDK
Guru

The system USB DFU bootloader is only available on the FS USB.

TDK_0-1704836819825.png

https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

 

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

Wow... Absolutely an amazing catch. Yeah I didn't realize that there were 2 distinct PHY output pins for USB OTG Full Speed and USB High Speed. 

I guess my next step is to write some sort of alternative DFU compatible state for my device that enables the use of the USB HS PHY because of the fact that I didn't include a second USB port for DFU mode :p

Thank you again!

Sorry to double post, but before I go down this rabbit hole, is it possible to flash the EEPROM at runtime? Could I just write a small DFU compatible program? Run it then flash over the top of the existing memory and reset with the NVIC?

It is theoretically possible to write a user DFU bootloader, run it from RAM (instead of FLASH), and interface with that bootloader to re-flash the chip.

In the event you need a user bootloader, it's a lot more common and practical to have a separate bootloader from your main program. That way you don't need to erase the bootloader to update the program.

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

Thanks so much you inspired me to build it! And it does support USB 2.0 High Speed. I open sourced it too! 

https://github.com/russeree/nyan-keys-dfu-bootloader/tree/master