SPLat is now providing HEX files instead of DFU files for firmware updates of 32-bit controllers.
Some of our clients receive DFU files for programming 32-bit devices. Doing this required loading a program called DFUseDemo. This tool has some limitations and has not been supported by STmicro (our CPU vendor) for some time.
For Production, we have now switched to using HEX files and STM32 Cube Programmer. As a result of driver incompatibility, we can no longer generate DFU files.
Obviously, to download a HEX file you could use SPLash. Note that SPLash only programs HEX files for 8-bit or 32-bit controllers over the TTL COM port, as the USB port becomes unavailable to it. Further, apart from wrapping an installer around it, SPLash has not been updated for a long while, and STM32 Cube Programmer is a more up-to-date tool. Note that STM32 Cube is available for Mac and Linux targets as well as Windows.
Here's how to use the tool:
- Uninstall DFUseDemo. (This might be optional, but ST recommends it.)
- Download and install STM32 Cube Programmer.
- Install the PGM link on the board.
(Somewhere on the board, there is a two-pin header marked "PGM". If this is shorted when the board starts up, the board will enter Programming mode.)
- Connect the USB plug to the board.
- Power the board ON.
- Start STM32 Cube Programmer.
- Click on the "Open File" button:
- Select the required HEX file.
- Click the "Read Unprotect (MCU)" checkbox. (This step is optional if the firmware is already an "unprotected" version.)
- Click the "Download" button.
- Wait for the download to complete.
- Power the board off.
- Remove the PGM link.
If you have multiple boards to program, you can refresh the connection for the next board using the "refresh button": s
If your 32-bit board has no USB port, you can still use this program. Simply connect a PCUSB cable between your PC and the "TTLCOM" port and change the "USB" drop-down to "UART". Make sure the "Port" setting shows the correct port, then hit "Connect". From there, everything described above applies.