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 the STEPFOC firmware is available
2. You are doing custom code development
3. You are using SimpleFOC firmware
You will need the programming adapter

ADAPTER2

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)

STEPFOC JTAG

FLASHING3

Flashing using visual studio code

Download Visual Studio Code.

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

VSUPLOAD

Download the STM32 ST-LINK utility.

HEX and binaries

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

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

stlink2

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

stlink1

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

stlink conn

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

stlink prog


Found a mistake on this page? Edit it on GitHub ยท Report it