how to use St-link on dashboard

Restoring the Xiaomi Dashboard / Controller with ST-LINK is an operation that allows you to unlock all those “bricked” dashboards due to incorrect BLE installations due to unsuitable or unexpected files during flashing, as well as controllers (control units) affected by bad flash and therefore bricked. In fact, a bricked Xiaomi dashboard (I speak for both of M365 Standard with 4 LEDs and PRO with display with speedometer) could be jammed and with a locked key, and everything could be unsolvable despite the fateful disconnection of the battery for at least 3 hours so to be induced in RESET of the system.

ST-LINK is not only used to restore Xiaomi dashboards, but has other peculiarities that make it a useful tool to always have at hand. Let’s see a global list of its possible uses, which will then be explored further below:

1. Unlocking bricked 4 LED dashboard (locked)
2. Unlock bricked PRO dashboard (locked)
3. Original BLE installation, and then modifiable, on clone dashboard
4. BLE downgrade on dashboards that do not allow you to install custom firmware due to the latest update from Xiaomi
5. Original BLE installation on PRO clone dashboard, in order to make it compatible with the BLE 074 which allows you to view the red speedometer
6. Bricked CONTROLLER release
7. Activation of new CONTROLLER (not pre-activated) after its replacement

What is ST-LINK?

ST – LINK / V2 is an in-circuit debugger / programmer for the STM8 and STM32 families of microcontrollers. The single wire interface module (SWIM) and serial wire (SWD) and JTAG debugging interfaces are used to communicate with any STM8 or STM32 microcontroller placed on an application board. It looks like a USB stick with some output cables. Everything read in this way can be scary but the operation we are going to see is very simple.


The Xiaomi dashboard / Controller recovery procedure with ST-LINK has begun to take hold not only to recover these displays no longer working due to incorrect flashing, but to install on clone dashboards (available anywhere, from amazon to aliexpress, most are non-original clones) the official Xiaomi BLEs , in order to make them perfectly identical to the originals. In fact, the clone dashboards (which can be purchased at about half price compared to the original ones) are completely identical, but they have non-original BLEs (just do a Check Ver on M365 DownG, you will notice a 4 or 5-digit BLE with often a symbol – (less) at the beginning).

Such non-original BLEs are equally functional but do not allow the flash of other original or modded BLEs. For example, on a standard 4 LED clone dashboard it will not be possible to mount the BLE 073 which allows y ou to activate the third SPORT mode and install M365 PRO firmware, or the PRO clone dashboard (very used by M365 Standard owners, a typical upgrade that they do a lot of users) that do not allow you to install the famous BLE 074 (or CamiBLE) which allows you to view the speedometer in red.

A last but not least use of ST-LINK is to unlock the dashboard which, through the latest Xiaomi 171 update, no longer allow you to change firmware or to downgrade the BLE. In fact, with the latest updates Xiaomi has managed to block the downgrade from the App via bluetooth, so you have to resort to flash via ST-LINK. It also allows you to unlock locked or factory-new controllers (for example purchased from Aliexpress) where a firmware has not been pre-flashed and therefore must be activated.

ST-LINK is therefore a method to install via hardware (via USB and cables, therefore no longer via bluetooth) an original BLE (072 on M365, 090 on M365 PRO) on a bricked dashboard, clone or updated to the latest version .

It should be specified that ST-LINK is also useful in the case of bricking / replacing the controller (for example for burning or for a transition to V 2.1) as many of these must be activated with a flash via ST LINK, already pre-activated products cost on average a 10-20% more (I’ll talk about this in another guide!).


ST-LINK AND PRACTICE

Let’s start with the famous ST-LINK key. It is a relatively inexpensive component. It is also always useful to have one available for any flash errors, irreversible updates, for replacing the dashboard (a typical case is that during a shower, water enters from the central power button, irreparably damaging the display) or in case of damage to the controller of the scooter.

The output cables (supplied, female – female) from the key can be temporarily tinned or you can use small improvised PIN-shaped extensions in order to convert the female of the ST LINK cable to a male, the important thing is that all provide good support during the flash phase. If you want a ready-made product you can rely on these female – male cables , one side is inserted in the key and the other in the display.

Subsequently it will be necessary to download this package which contains the DRIVERS for this dongle as well as the quick flash utilities of both Dashboard Standard and Dashboard PRO. This dongle works on PCs with Windows (I certify the test of various users on the Windows 7 platform, Windows 10 Enterprise x64 Ver 1809, Windows 10 Pro x32 ver 1809).

You can download ble365rec file on our download page

Then you need to unpack the entire archive and install the drivers for this to flash, you can find them in the file you just downloaded, folder DOC => STM32 ST-LINK Utility v4.4.0 setup.exe . Once the dongle is inserted, the installation will complete.

ST-LINK ON STANDARD DASHBOARD (4 LED)

To restore or flash on original dashboards / clone of the BLE it is necessary to connect the dongle as follows. Do not rely solely on the position of the PINs of the photo stick, they could change the positions of the PINs from stick to stick, the important thing is to read on the diagram printed on the dongle itself the position of SWDIO, GND, SWCLK and + 5V.

The positions of SWDIO, GND, SWCLK and + 5V instead remain unchanged from dashboard to dashboard, so you can rely on the photo. In the case of original Dashboards it is necessary to unsolder the capacitor C16 of the front part of the display, as you can see in the image below. This capacitor was placed only to avoid the flashing of the dashboards, it has no other use. In clone dashboards it is not present.

Also in the Standard display it is also necessary to unsolder a resistor called R1 which is located on the REAR side of the dashboard (see photo below, be careful because there is also an R1 in the front!). The connection PINs in the case of this display are quite hostile in finding the right contact for a correct passage of data, not for the tightness of the hole itself, but for the presence of resin on the contacts. It may be useful to heat the male PINs with a soldering iron in order to melt part of the resin that obstructs the contact between our PIN and the dashboard.

Once this is done, start the ble365rec.bat file in order to start the operation, once the flashing is finished you will see a screen like this:

Now you can disconnect the dashboard, it will now be flashed with the correct original Xiaomi firmware.

ST-LINK ON DASHBOARD PRO
To restore or flash on the locked dashboard / clone of the BLE it is necessary to connect the pen as follows. Here, too, do not rely solely on the position of the PINs of the photo stick, they could change the positions of the PINs from stick to stick, the important thing is to read the position of SWDIO, GND, SWCLK and + 5V on the diagram printed on the stick itself. Here too the positions of SWDIO, GND, SWCLK and + 5V remain unchanged from dashboard to dashboard, so you can rely on the photo.

The name of the PINs is also shown in the upper part of the dongle, as you can see in the photo. Connect the cables according to the diagram of your dongle.

In the case of original Dashboards it is necessary to unsolder the C2 capacitor as you can see in the image below. This capacitor was placed only to avoid the flashing of the dashboards, it has no other use. In the clone dashboards it is not present and also the connection of the PINs to create a contact will be easier, it will be obtained with a little pressure and rotation inside the hole, once inserted the contact will be immediately effective.

Once this is done, start the blePROrec.bat file in order to start the operation, once the flashing is finished you will see a screen like this:

Now you can disconnect the dashboard, it will now be flashed with the correct original Xiaomi firmware.

 

TIPS & TRICKS FOR DASHBOARD

If the flash does not occur correctly and you encounter errors in the procedure, the problem could lie in a discrepancy between the diagram printed on the dongle case and the actual contacts inside it. I therefore recommend opening it and checking by reading directly on the PCB of the board how the output PINs are positioned. As you can see, what it represents is written on each PIN.

If the screen still can’t detect your dashboard try removing R1 on the small Ninebot branded embedded board with the nRF on it. Not the R1 of the main board. Then should flash.

Pro 2, 1S and Essential pin connections as shown below: