About Tongsheng TSDZ2 mid drive motors

  1. Motor controller
    1. log
  2. LCD - VLCD5
  3. Motor
  4. Torque sensor and PAS

Datasheets and application notes

  1. STM8S105S4T6

Development tools


  1. 2018.04.18 - original firmware and debug session using OpenOCD
  2. 2018.04.19 - First code runs: Hello world
  3. Math operations CPU time



Memory sizes:
- flash: 16kbytes
- RAM: 2kbytes
- EEPROM: 1kbytes

Note: although the flash memory should has a limit of 16kbytes, in practice was tested that it can hold at least 32kbytes. This a known thing with some ST microcontrollers like STM32F103C6T6.

Linked file: STM8S10xx.pdf

Linked file: STM8_reference_manual.pdf

Linked file: STM8_bootloader.pdf

Linked file: AN2658-Using_the_analog_to_digital_converter_of_the_STM8S_microcontroller.pdf

Linked file: STM8Sxx - BLDC motor control software.pdf