2024-01-09 01:36 PM
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
What do you think I am missing? Linux lsusb, and dmesg show nothing at all.
Thanks!
Solved! Go to Solution.
2024-01-09 01:47 PM
The system USB DFU bootloader is only available on the FS USB.
2024-01-09 01:47 PM
The system USB DFU bootloader is only available on the FS USB.
2024-01-09 06:48 PM
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!
2024-01-09 08:40 PM
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?
2024-01-10 06:18 AM
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.
2024-01-11 03:22 AM
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