-
-
Notifications
You must be signed in to change notification settings - Fork 345
Unbrick your radio
In case you ever need to recover from a bodged flashing, the following steps will lead you back to working radio by cleanly re-flashing the bootloader and the firmware in one go.
John at RCVideoReviews has created a nice video, visually explaining the steps of this Wiki-page:
- Download and install a copy of STM32CubeProgrammer, the official flashing tool by ST, the manufacturer of the microcontrollers in EdgeTX radios. Get it here: https://www.st.com/en/development-tools/stm32cubeprog.html
During the installation of STM32CubeProgrammer, make sure your radio is not connected to your computer.
The benefit of using STM32CubeProgrammer, instead of numerous other tools, is that it comes with reliably working Device Firmware Upgrade (DFU) drivers, required to perform the recovery of the radio. This has shown to be especially critical on Microsoft Windows operating systems. DFU is a hardware feature of the STM32 chips (the main microcontrollers in EdgeTX radios) that cannot be altered, erased or otherwise tampered with, thus it is always there and will allow you to easily recover from flashing mishaps.
You might be requested to make an account at ST to be able to download STM32CubeProgrammer.
-
Next, grab yourself a correct EdgeTX binary file to flash your radio with. You can use for example EdgeTX Flasher or directly browse to EdgeTX GitHub page to fetch a binary of your choice. Save the binary on your local drive in a location you can easily find it.
-
Connect your radio via USB to your PC while your radio is turned off. In case your radio has multiple USB ports, make sure you are using the data USB port and not the charging port. For example, on popular RadioMaster TX16S, you should use the top USB-C port next to the antenna. Make sure your USB cable is equipped also with data pins. Some more simpler USB cables only have power pins for charging, but the data pins for communication are not wired up. Such cables won't unfortunately work for radio recovery.
-
Start STM32CubeProgrammer. Your radio should be detected on the right side of the screen under
USB configuration
as aUSB
with a number, typicallyUSB1
. Open the drop-down menu next toPort
to see if you seeUSB1
listed there and can select it. Below is an image how it should look like (you can click on the images to open them bigger):
If the Port drop-down box lists No DFU
, then please re-check your cabling and try with another USB port on your PC. When reconnecting your radio to the computer, make sure the radio is still turned off.
If you hear a bling sound from your system, when connecting an USB device, such as an USB stick, then the same sound should be emitted, when you connect your radio in DFU mode to your computer.
- Click the green
Connect
button on top right. You might be greeted with some seemingly random content, do not get alarmed - this is all perfectly fine and just showing some of the first bytes of memory that are currently saved on the microcontroller. Most importantly, the lower right corner should now list under fieldCPU
eitherCortex-M3
orCortex-M4
(according to your radio):
- Next we load the EdgeTX binary into STM32CubeProgrammer. For this, first let's open the left menu fully, by clicking the button with three white horizontal bars on top left. After clicking it, the menu should open and the 3 bars become vertical bars:
Click Erasing & programming
(a green icon, with a down arrow and a flat rectangular shaped device under it).
- Next, click blue
Browse
button behind File path field and navigate and open the previously downloaded EdgeTX binary for your radio. LeaveVerify programming
selected and make sureRun after programming
is not selected:
The instructions here ask to uncheck the Run after programming
in order to avoid a warning dialog that would otherwise pop up at the end of flashing, when the code in the radio's microcontroller starts and the radio abruptly self-disconnects from STM32CubeProgrammer.
- Click the blue button
Start Programm...
in the middle of the STM32CubeProgrammer.
First you should see some messages about erasing sectors and the green progress bar will go back and forth between left and right. This should be followed by a Download in Progress
notification with green progress bar at the bottom of the STM32CubeProgrammer growing from left to right:
Especially on bigger color radios with chunky microcontrollers, the flashing can take some minutes. Please be patient and wait for the STM32CubeProgrammer to do it's thing.
- When flashing has completed, you should be greeted with
File download complete
pop-up:
followed briefly thereafter with Download verified successfully
pop-up:
In case you are only seeing the latter pop-up, then it is likely just covering the File download complete
pop-up, that is underneath it. Click OK
on both pop-ups to dismiss them.
-
Click the green
Disconnect
button on top right of STM32CubeProgrammer. -
Eject the radio from your operating system, similarly as you would safely disconnect an USB stick (typically the radio is listed in DFU mode as
STM32 BOOTLOADER
).
You can now remove the USB cable from your radio and power it up.
You should be greeted with EdgeTX running on your radio again.
Getting started with Git
- Workflow for GitHub noobs
Building and debugging EdgeTX
- In a webbrowser with Gitpod
- Windows 10 (MSYS2)
- Docker with Windows 10
- Ubuntu in a WSL2 under Win10
- Ubuntu 20.04
- MacOS 10.15
- MacOS 14.1
Modifications:
- Flysky Hall Sticks Mod
- Flysky FRM303 Mod for TX16S
- Flysky PL18 & PL18EV Hardware Mod for Complete EdgeTX Support
- Flysky NB4+ Hardware Mod for Complete EdgeTX Support
- Flashing EdgeTX to Flysky PL18 or Paladin-EV
How to unbrick your radio with STM32CubeProgrammer
DMA mappings of radios:
- RadioMaster TX16S
- FlySky NV14
Interrupt usage of radios:
- RadioMaster TX16S
Implementation notes:
- YAML Parser/Generator
- Mixer synchronisation
Deprecated:
- Windows 10 (Visual C++)