Flashing Tekko32 45A Single ESC - AlkaMotors/AM32-MultiRotor-ESC-firmware GitHub Wiki

Flash AM32 to Holybro Tekko32 45A Single-ESC
(Artery AT32F421) with ST-LINK V2

⚠️ This process is irreversible and the BLHeli32 firmware cannot be restored! ⚠️

The instructions on this page are for Artery AT32F421 MCUs. These MCUs use the uVision program instead of the STM32 Cube program to update the bootloader. Other ESCs, like the RDQ 3-6S 32bit dShot1200 30A ESC, also use the Artery AT32F421 MCU. However, these other ESCs may require the PB4 bootloader (instead of the default PA2), and they may require a different firmware build. Notes have been added to guide others through this process.

ℹ️ In case of display problems of the images, please load the website as desktop version
Tekko 32 45A Single ESC

Check if your ESC corresponds
to the described model:
Tekko32 45A Single-ESC, with
Artery AT32F421(K8U7) MCU

Fig. 1
Download ST-Link Utility:
https://www.st.com/en/
development-tools/
stsw-link004.html
Fig. 2
Install software & drivers
(you will be ask if drivers
should be
installed during process)
Plug in your ST-Link device Fig. 3

Open ST-Link Utility

Click ST-LINK ➡️ Firmware Update

Fig. 4
Click Device Connect, then Yes>>>>

to Upgrade Firmware
(the upgrade is probably not necessary,
but this way you can make sure that
the ST Link works correctly)


Unplug your ST Link
Fig. 5
Download AT32F421_AM32_Bootloader:
https://github.com/AlkaMotors/
AT32F421_AM32_Bootloader


Unzip file
Fig. 6

Download Keil MDK-Arm:
https://www.keil.com/download/product/

Install software & drivers
(you will be ask if drivers should
be installed during process)
Fig. 7
Go to the Bootloader folder and
Unzip ArteryTek.AT32F421…
(Just double click and you will be
asked to install "Keil Pack Unzip"
Confirm
Unzip the Pack by clicking Next>>
Close everything
Fig. 8

Tekko 32 45A Single ESC

Now it‘s time to connect to the ESC

Connect the pads to the
corresponding pins of the
ST-Link as shown in the photo.

You can solder thin wires to the
pads or make the contact with
pogo pins (which I prefer).

The cables should all have the
same length and should be
twisted together

‼️ Be very careful on the
SWCLK pad with this ESC!
Here is extremely little space to
the capacitors, to which V_Bat
is applied ‼️
Fig. 9

RDQ 3-6S 32bit dShot1200 30A ESC

Skip this if updating the Tekko

Connect the pads to the
corresponding pins of the
ST-Link as shown in the photo.

You can solder thin wires to the
pads or make the contact with
pogo pins (which I prefer).

The cables should all have the
same length and should be
twisted together

‼️ You must connect a Gnd wire! I made the ground
connection using the negative battery pad for the ESC.:bangbang:
RDQ_30A_ESC_labeled
Tekko 32 45A Single ESC

ℹ️ For me, the Pogo Pins
P75-B1 work very well.

Connect a battery plug to
the + and - pad on the ESC.

Fig. 10

Plug in your ST Link

Power the ESC

Go to the Bootloader folder and
open the AM32 Project file
(µVision will open)
Fig. 11
Right click Target 1,
click Options for Target 1'…
Fig. 12
Go to Debug-Tab (1)
Select ST Link Debugger from dropdown (2)
Click Settings (3)
Fig. 13
If everything is connected
correctly, you will see your target
under SW Device.

Confirm both windows with OK

If you see no target connected,
check your wiring between the ESC
and the ST Link /
check if the ESC is powered on

Fig. 14
Right click Target 1,
click Options for Target 1'…
➡️ Debug ➡️ Settings
➡️ Flash Download (1)
Select the Programming Algorithm (2)
Click Remove (3)
Click Add (4)
Fig. 15
Select the Flash Programming Algorithm
AT32F421 Flash user system data (1)
Click Add (2)
Confirm both windows with OK
Fig. 16
On the main screen select
Flash ➡️ Download
Fig. 17

Ignore the Error message and
confirm with OK

Right click Target 1,
click Options for Target 1'…
➡️ Debug ➡️ Settings
➡️ Flash Download
Fig. 18
Select the Programming Algorithm (1)
Click Remove (2)
Click Add (3)
Fig. 19

Select the Flash Programming Algorithm
AT32F421 Int. Flash (1)
Click Add (2)
Confirm both windows with OK

ℹ️ Bootloader is set to PA2 by
default, so you don’t have to
change something here
Fig. 20
Skip this if updating the Tekko32.
The RDQ 3-6S 32bit dShot1200 30A ESC requires the PB4
bootloader. To change from the PA2 to the PB4 bootloader,
Double click on "main.c: (1)
Edit the program ~lines 22/23. Uncomment the one you want;
comment-out the other. (2)
Open the Project Menu (3)
Click "Build Target" (4).
Changing program PB4 or PA2_Build

On the main screen select
Flash ➡️ Download

Bootloader done!

Close µVision window
Unplug ESC
Unplug ST Link and remove
connection to the ESC
(SWDIO, SWCLK, GND)
Fig. 21

Download the ESC Config Tool:
https://drive.google.com/file/d
/1qw2f7nM6OZftIE5GTgMPWB5zXCELxYG9/view

Unzip to a folder

Tekko 32 45A Single ESC

Download and save the firmware (1)
AM32_WRAITH32_F421:
https://github.com/AlkaMotors/
AM32-MultiRotor-ESC-firmware/releases

Fig. 22
RDQ 3-6S 32bit dShot1200 30A ESC

Download and save the firmware (1)
AM32_TEKKO32_F421_1.93.hex:
https://github.com/AlkaMotors/
AM32-MultiRotor-ESC-firmware/releases

Why these files with names of other ESCs?

It is confusing... each ESC designer/manufacturer
has their unique design. These designs vary by parts
(like the MCU, FETs), but also by what pins are used
on the MCU and for what purpose. The boot loader pin is
one example of variation, but there are many other pins
on the MCU that are used differently from one
designer to the next. The AM32 firmware naming convention is
still evolving... they know it is confusing.
Currently, some less common ESCs are re-using compatible
firmware files for hardware designs that match.

Firmware for RDQ_v2

Connect your ESC to a
Betaflight flightcontroller:


  • Connect PWM pad of the ESC
    to a motor pad on the FC

  • Connect GND pad from the ESC
    to GND next to the motor pads

  • Connect the FC to
    your computer via USB
  • Do NOT power your ESC

    Start the ESC Config Tool:
    SerialPortConnector

    Fig. 23

    Select the right COM Port
    and hit Connect

    Power your ESC
    Fig. 24

    Goto Flash-Tab (1) and select the
    motor your ESC is attached to (2)
    Click Load Firmware (3) and
    select the downloaded firmware file
    Click Flash Firmware (4)

    All done! 🏁

    Fig. 25
    ⚠️ **GitHub.com Fallback** ⚠️