How to Update Firmware

Writing by GUI

  1. Launch STM32CubeProg and connect it to the microcontroller of the product
    1. Select “UART” from the Interface field in the upper right corner.
    2. Select the appropriate COM port.
    3. Select 115200 for “Baudrate” and Even for “Parity”.
    4. Press the “Connect” button.


      The product is recognized and “Connected” is displayed in the upper right corner.


  2. Erase the firmware
    1. Open the top left menu bar and select “Erasing & programming”.


    2. Press the “Full chip erase” button on the “Erase flash memory” tab.
      Press “OK” when the confirmation screen appears.


  3. Writing firmware to the product
    1. Press the “Browse” button and select the downloaded firmware (extension: .bin).
    2. Make sure “Verify programming” is checked (if not, check it).
    3. “Start Program…” button to start writing the firmware.


    4. After writing and verifying (this may take a minute or so, depending on the environment), a message window will appear saying “File download complete” and “Download verified successfully”, then press “OK”.

  4. Disconnect the microcontroller
    1. Press the “Disconnect” button in the upper right corner.

Writing by CUI

The following commands can be executed as root to write in the same way as the above GUI writing. Please rewrite the firmware writing software STM32_Programmer.sh(Linux) / STM32_Programmer_CLI.exe(Windows), the directory of the firmware XXX.bin, and the USB port number according to your environment.

Example for Linux

/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer.sh --connect port=/dev/ttyUSB0 br=115200 --erase all --write /home/USERNAME/mc-uep100_v1-0-0.bin 0x08000000 --verify

Example for Windows

"C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" --connect port=COM2 br=115200 --erase all --write "C:\FIRM_PATH\encoder-counter_1-0-0.bin" 0x08000000 --verify