TSDZ Controller Flash - TSDZ2-ESP32/TSDZ2-ESP32-Wiki GitHub Wiki

Download the last TSDZ2 project firmware from the following link STM8/bin and for the initial flash follow the instruction of the OpenSource-EBike-firmware/TSDZ2_wiki project

There is also on Youtube a useful video of the user Jbalat which explains how to do.

There is only one additional step to do in order to enable the OTA update from the Android app. Once this done, there will no longer be any need to connect the controller to the PC via the STLinkV2 to further update the Firmware. (Check the Android application wiki page to see how to perform OTA update)

The additional step is the STM8 bootloader activation since it is factory disabled and should be done with STVisualProgrammer and STLinkV2 like the initial Image programming.

  1. Select the "Option Byte" Tab in the STVisualProgrammer
  2. Read the actual values of the "Option Byte" Memory Area from the controller
  3. Change the field "BOOTLOADER ENABLE" to Bootloader Enabled like in the picture. (select the field with the mouse then use the up/down keyboard arrows to change the value since the options aren't displayed correctly)
  4. Program the "Option Byte" Tab.

Bootloadr Enable - Option Byte