PCB Firmware Flash - TSDZ2-ESP32/TSDZ2-ESP32-Wiki GitHub Wiki

You need to do this operation just once, before to install the PCB in the Motor.

The flash operation is done using a USB to serial adapter (FTDI adapter) connected to the ESP32 PCB Header.


N.B. To avoid damaging the board, follow these two instructions

  1. The FTDI MUST be configured for 3.3 Volt operations (NOT 5 Volt!)
  2. Never connect the FTDI VCC pin when the ESP32 is powered from the Bike Controller. In this case connect only the RXD,TXD and GND signals!

  • Connect the PCB RXD Header pin to the FTDI TXD signal
  • Connect the PCB TXD Header pin to the FTDI RXD signal
  • Connect the PCB GND Header pin to the FTDI GND signal
  • Connect the PCB 3V3 Header pin to the FTDI VCC signal
  • The PCB IO0 Header Pin should be shorted to GND before Power On in order to activate the Download mode

For the connections use the dupont wires normally provided with the FTDI adapter.

  1. Download and unzip the file esptool.zip. This will create the directory esptool containing all the resources needed to flash the image.

  2. Download the image files from bin/ESP32 wiki folder. Enter in the directory esptool and copy in the "FW" directory the four images files:

    • bootloader.bin
    • ota_data_initial.bin
    • partition-table.bin
    • TSDZ2-ESP32-Main.bin
  3. Connect the FTDI adapter to the PC.

  4. Finally launch the command "flash.bat".

N.B. When the flash is done. Disconnect the FTDI and then remove the IO0 Jumper in order to boot the ESP32 in normal mode.

If the board is powered through the FTDI you could now use the Android Application to do the BT pairing, connect to the board and perform the initial configuration.

When the FTDI is connected, you could also view the debug messages coming from the ESP32 using a program like Putty. Configure Putty with the COM Port number of the FTDI adapter, 115200 Baud, 8 Bit, 1 stop bit and no parity.