Skip to content

Flashing firmware

You can check what is the latest firmware release in the github page of STEPFOC! To check what software release is on your driver use command #Info

Note

This video guide is for Spectral Micro BLDC driver but the steps for STEPFOC are exactly the same. You just need to use STEPFOC repository not SPECTRAL MICRO! When flashing new firmware make sure you disconnect power connection and uart connection.

Needed hardware
You can change all variables using UART and CAN so flashing firmware a lot is not necessary
You will usually flash it when:
1. New version of Spectral BLDC firmware is available
2. You are doing custom code developement
3. You are using SimpleFOC firmware
You will need programming adapter from here!

drawing

Connecting to PCB

Step 1 Step 2
Locate JTAG PINS Press programming adapter like shown in the picture (apply small amount of pressure on the pins to get a good contact)

drawing

drawing

Flashing using visual studio code

Download visual studio code: Link

  1. Open STEPFOC firmware folder in VS code. (You need to have platformio installed)
  2. Press uplaod in VS code (Bottom left corner in VS code)

drawing

Download STM32 ST-LINK utility Link

HEX and binaries

Using STM32 ST-LINK Utility you can flash only Binary or HEX files. These can be obtained from compiling source code of spectral BLDC firmware

Open STM32 ST-LINK utility Drag and drop the binary file inside.

drawing

Go to Target/settings and make sure they look like this.

drawing

Go to Target/connect. In case you get a error try to install stlink drivers from here!

drawing

Go to Target/program and verify. You should get pink output msg like below.

drawing