A tool for programming STM32 based devices using Chrome and the WebUSB API. Check it out here.
You will need to connect your STM32 device using USB, while within the bootloader mode. This is usually done by holding the BOOT pin high during reset or power on.
Next, enter the URL of your update file, the total flash size, page size, and hit connect. You should see your device listed.
As soon as you click connect, the DFU process will begin:
- Erasing all pages for the flash size specified
- Programming 2048 bytes at a time from the
.bin
file given - Resetting the device and running the newly programmed application
For details on how the USB DFU works. Look at the usbDfuDevice.js
file. You can easily integrated it into your own web app. See how it's done inside index.html
To understand how the USB DFU protocol, or WebUSB API works in detail, check out these links: