STLink Ninebot ESX ESC: Difference between revisions
No edit summary |
|||
Line 155: | Line 155: | ||
[[File:STM32STLinkUtilitySuccessfulProgramming139FullDump.png|thumb|center|400px|Completely finished and successful programming.]] | [[File:STM32STLinkUtilitySuccessfulProgramming139FullDump.png|thumb|center|400px|Completely finished and successful programming.]] | ||
[[Category: Scooters]][[Category: Ninebot]][[Category: ESX]] | [[Category: Scooters]][[Category: Ninebot]][[Category: ESX]][[Category: STLink]] |
Revision as of 02:05, 21 July 2023
In the case of a bricked ESC/Controller/Control Board, STLinking can save the master control board from needing to be replaced in some instances.
This is often the only way to save a board that has been bricked when the wrong firmware was flashed or an update failed.
This guide shows how to STLink the Controller/Master Controlboard/ESC for the following scooters:
Retail Specific
Rental Specific
Accessing the Debug Pins
Removing the Pole
Remove the 4x Security Torx T25 screws or Hex Screws that hold the handlebar in place on the pole.
Remove the 4x Security Torx T30 screws or Hex screws that hold the pole to the base.
Accessing the ESC
Next, if you have one, remove the external battery.
Two screws hold the battery on the bracket.
These are either security hex or regular hex.
This will expose 3 more screws.
Take care removing these screws as they strip very easily.
The bracket may be slightly stuck but once these 3 screws are out it can be removed.
If you do not have a bracket then you will have three screws holding the battery in place within the pole.
You will also have a charging port cover to remove.
Remove the top cover to reveal two screws holding the cover on.
Finally, one more screw holds the ESC in place on the pole.
Next comes arguably the most annoying part of the disassembly, removing the waterproofing grommets.
On the top and the bottom is two grommets that are twisted in place.
Press down hard with a large flathead screwdriver and twist counter-clockwise until the slots line up with the metal ridge within the pole.
In some cases, pushing the rubber inner part through the plastic retainer ring will make it easier to remove.
Attempt to keep the wires pushed through the rubber part.
Once both are separated the whole mechanism slides easily out of the pole unless the pole has been damaged or bent.
Disassembling the ESC
The internal battery unplugs fairly easily but the BMS connector may need needle-nose pliers to remove the connector.
3 longer hex screws hold the heat sink in place.
2 shorter hex screws hold the charging port in place.
2 shorter hex screws hold the external battery port in place.
Once all screws have been removed, you can pull the ESC to remove it port end first.
Download Software
Download STM32 STLink Utility from the ST website.
Scroll down and click "Get Software" and enter your email to receive a download link.
Install it and open it.
Flashing
Connect the STLink to the Master Control Board
Connect pins to 5v/VCC, GND, SWDIO, and SWCLK as shown below.
You can solder to these for a better connection or hold DuPont connectors as shown in the image.
Here I did a poor solder job but it still works.
STM32 STLink Utility
Download the 1.3.9 full dump .bin from ScooterHacking.
You can only flash full dump files or the ESC will not function.
Always check that you are downloading files from trusted sources(aka ScooterHacking) to avoid flashing malicious firmware.
Open STM32 STLink Utility and attempt to connect to the esc with the button shown below.
You should be warned that readout protection is enabled if it is connected successfully.
Next, press CTRL + B to open the chip settings.
Select "Disabled" under "Read out protection".
Next, click the open icon on the far right as shown.
Select the esc_fulldump139.bin file you downloaded earlier.
Click Target->Program & Verify or press CTRL + P.
Confirm one last time that the file you are flashing is the full dump and then press "Start".
The program will now program the chip with the full dump.
Once it finishes check the console to make sure it was successful.