1. Install STM32CubeProgrammer
STM32CubeProgrammer is an all-in-one multi OS software tool for programming STM32 Products. You can download it
here. Then you can use this command to start installation process:
Note 1: You should install Java, if you have seen error messages like this.
2. Force Hexabitz modules to boot into the factory bootloader.
There are two ways to load and update firmware on Hexabitz modules. When the module is already running a firmware, you need to force it to boot into the factory bootloader. You can do that with either one of these two methods:
- Using the
updateCLI Command. Once you execute this command, the MCU will leave the running application and jump to factory bootloader. If you are connected to the programming port, you will need to close this port in PuTTY (or any other terminal emulator) before you can use it to connect to the factory bootloader.
- Applying 3.3V on module B (Boot0) pad while power cycling. The easiest way to achieve this is to connect a female-to-male jumper wire to one of the power ports (edge ports) top connector, and then touch the B pad while power cycling the MCU.
3. Update module firmware using STM32CubeProgrammer
Now you can open STM32CubeProgrammer then switch the Connection Type to UART then edit the Serial Line to match the COM port you want to and edit the speed to match the Baud rate to 57600. You should change Parity to EVEN to be compatible with ST Bootloader settings.
When you receive an error message that relates to serial port permissibility. The port permission in the Ubuntu system can be checked with this command:
You won't have access to the ports unless you are superuser so change the permissions from the terminal by this command:
In case chmod 777, the letters are actually a "wrap" for the numbers, they do the same thing.
1 = +x = execute
2 = +w = write
4 = +r = read
3 = 1 + 2 = +xw = execute + write
5 = 1 + 4 = +xr = execute + read
6 = 4 + 2 = +wr = write + read
7 = 1 + 2 + 4 = +xwr = execute + write + read
After you achieve a successful connection. You can read the Hexabitz module memory.
In addition, you can download the latest module firmware from the Resources tab on our web page. Then, you can update the module by flashing the HEX file using Openfile Button and Download Button.
A new window will appear and notify you when the update is successful.