Skip to content

Installation

neoxic edited this page Apr 9, 2024 · 8 revisions

General steps

  • See Targets to determine the target names for your ESC and download the latest release here.
  • If installing on a blank ESC, flash the bootloader using a debugger/programmer or via DFU mode.
  • Flash the firmware with ESCape32 Update Utility using a USB-TTL adapter or Betaflight passthrough.
  • See Configuration on how to change configuration settings.

Tips:

  1. For AM32 ESCs, it is possible to install the bootloader via regular firmware update. Click here for details.
  2. ESCape32 Wi-Fi Link can be used for flashing the firmware.

Step-by-step tutorial

The following tutorial describes the installation procedure for STM32 MCUs using an ST-LINK programmer on Windows. The PowerWriter PWLINK2 programmer is a good alternative choice for a wide variety of MCUs including STM32, AT32, and GD32. Installation using another programmer (or via DFU mode) and/or operating system is similar although will require different software tools. Please join our Discord server for more information on flashing.

Tools needed:

  1. ST-LINK programmer
  2. USB-TTL adapter

Please note that the bootloader needs to be installed only once. If you have it installed, proceed to Step 5.

Step 1

Download and install ST-LINK Utility or STM32CubeProgrammer.

Step 2

Connect the programmer to the ESC:

MCU Programmer
PA13 SWDIO (white)
PA14 SWDCLK (blue)
GND GND (black)

Make sure connection mode is set to Normal and reset mode is set to Software System Reset in ST-LINK Utility. If you are still unable to connect to the target, try swapping the SWDIO/SWDCLK wires on the programmer to rule out the possibility that you got them wrong on the pads.

Step 3

Disable read-out and flash protection:

Step 4

Flash the bootloader:

Tip: At this stage, you can also flash the firmware at address 0x8001000 in order to skip the remaining steps.

Power cycle the ESC and check voltage on the signal line. It should read around 3.3V.

Step 5

Plug in the USB-TTL adapter and determine its COM port number:

Although not strictly required (see below), the following simple circuit is needed to convert two RX/TX pins on the USB-TTL adapter into one-wire two-way connection with the ESC (except for boards with AUX input):

For one-way connection, connect the ESC to the TX and GND pins:

For connection via Betaflight, use KISS ESC passthrough mode:

  1. Open Betaflight Configurator.

  2. Go to Motors, set ESC/Motor protocol to DISABLED, and click Save and Reboot.

  3. Make sure ESCSERIAL resource is assigned to an inactive pin with a timer.

  4. Go to CLI and type one of the following to enter passthrough mode:

     escprog ki 0  # Connect to ESC 1
     escprog ki 1  # Connect to ESC 2
     escprog ki 2  # Connect to ESC 3
     escprog ki 3  # Connect to ESC 4
    
  5. Close Betaflight Configurator. (IMPORTANT!!!)

  6. Use Betaflight's serial device (COM port) for one-way connection.

Step 6

Run the update utility to upload the firmware to the ESC. For example:

escape32-update -d /dev/ttyS8 firmware.bin

In the above example, COM9 is specified as /dev/ttyS8, i.e. COM1 → /dev/ttyS0, COM2 → /dev/ttyS1, etc.

In case of one-way connection, run the update utility with the option -f to force the update. For example:

escape32-update -d /dev/ttyS8 -f firmware.bin