TSDZ2 Motor Firmware Programming


 

 TSDZ2 Motor Firmware Programming

   It has been quite a while since we released our original article 'TSDZ2 Programming - From Scratch' and quite a lot has changed since then. We wanted to provide new instructions to keep the process as simple and painless as possible.

When it comes to re-programming your motor, there are two main choices:

  One is to install a stock TSDZ2 motor firmware profile. We have an archive of them all. Note that if you flash a 36v motor with a 48v or 52v firmware profile, it will spin slightly faster and support higher cadence RPM.

  Two is to install TSDZ2 Open Source Firmware - which is an amazing development that while still in progress, already greatly improves motor function while expanding the customizeable settings. We could go on about it, but that is a whole 'nother article, so we will just get right to the re-programming info. Chances are if you are here, you already know what we are on about anyway!

     The programming process is slightly different for the two methods, so first we will provide the set up instructions which are the same, and then we will fork the steps to provide the programming method for the Stock Firmware, and Open Source Firmware separately.

SETUP INSTRUCTIONS

Step 1 - Download and Install 'ST Visual Programmer' and Ensure you have Updated Drivers

Step 1a - Download and Install ST Visual Programmer / STVP-STM32 from STMicroelectronics (must provide email, but it is free)

Step 1b - Download the Most Recent Drivers for Your Operating System / ST Visual Programmer

 

Step 2 - Open and Configure 'ST Visual Programmer'

Step 2a - Open 'ST Visual Programmer' Open ST VIsual Programmer

Open ST Visual Programmer

Step 2b - Open the 'Configure ST Visual Programmer' Menu

Open the 'Configure ST Visual Programmer' Menu

Step 2c - Set the configuration as follows: Hardware: ST-LINK || Port: USB || Programming Mode: SWIM || Device: STM8S105x6 (as seen in the screenshot below). Click the ‘OK’ button to save the configuration settings - and you are now ready to program your TSDZ2! Once you set the configurations, you can skip this step in the future, you will already be good to go once you open the program.

Proper Configuration Settings for ST Visual Programmer / TSDZ2 Firmware Programming

 

Step 3 - Connect the TSDZ2 Motor to Programming Cable to Computer

Step 3 - Make sure your TSDZ2 is unplugged and powered off. First plug in your TSDZ2 Programming Cable USB end into the Computer USB Port (with 6 foot extension in place if needed) and then plug the 6 pin female end into the TSDZ2 Motor Speed Sensor Port (temporarily unplug the speed sensor if the motor is already mounted on your bike). Now you are ready to program your TSDZ2!

 

Connect your Program Cable to your Computer, and then to the TSDZ2

--------------------------------------------------

Stock TSDZ2 Firmware (STF) Programming

Step STF-1 - Download the desired version of the TSDZ2 STF (TSDZ2 STOCK FIRMWARE ARCHIVE) - Remember that you need to Download BOTH 'Program Memory' AND 'Data Memory' Firmware .s19 files. Do not mix the firmware voltage files, make sure you use both the same voltage. You can use a 48v or a 52v firmware file on a 36v Motor for slightly increase cadence/rpm support.

 

Step STF-2 - Assuming you have completed the configuration, and have the program open, with all cables connected etc., select the 'Option Byte' tab, and then choose 'Current tab' from the Read Menu to read and fill the option byte values from your TSDZ2.

!!- This will ensure everything is properly connected, before you proceed, and this is also a required step so this information is filled for later in the process. (If successful, you will see a '28' fill the third set of '00' - the rest stay '00') -!!

Select the 'Option Byte' Tab

Select 'Current Tab' from the Read Menu to read and fill the option byte values from your TSDZ2

 

Step STF-3 - Go to the 'Program Memory' Tab (which is default when you open ST Visual Programmer) - go to the menu option File/Open - and choose the desired STF 'Program Memory' .s19 file - you will see the values on the screen populate.

Make sure you are in the 'Program Memory' Tab (which is default when you open ST Visual Programmer) and go to File/Open.

Open the desired STF 'Program Memory' .s19 file - you will see the values on the screen populate

Program Memory Tab Populated

 

Step STF-4 - Go to the 'Data Memory' tab, and Open the STF 'Data Memory' .s19 file - the same process as with 'Program Memory', (and make sure to match your voltage/file you chose) - you will see the values on the screen populate.

Open the matching STF 'Data Memory' .s19 file to the 'Program Memory' file you chose - you will see the values on the screen populate.

Data Memory Tab Populated

 

Step STF-5 - Select 'All Tabs (on active sectors if any)' from the Program Menu to write/program the firmware to the motor. 

!! - Make sure you already READ the 'Option Byte' from your motor, and then have OPENED BOTH 'Program Memory' AND 'Data Memory' Firmware .s19 files into the corresponding tabs - and then Program/Write to ALL TABS - !!

Select 'All Tabs (on active sectors if any)' from the Program Menu to write/program the firmware to the motor

That's it for the TSDZ2 Motor STF Programming - You are good to go, just make sure you have an appropriate battery/voltage to match the firmware you just programmed!

 

--------------------------------------------------

 

Open Source Firmware (OSF) Programming

Step OSF-1 - Download the latest version of the TSDZ2 OSF (TSDZ2 OPEN SOURCE FIRMWARE ARCHIVE) - Remember to open the OSF .hex file into the 'Program Memory' tab, and ONLY WRITE TO THE CURRENT TAB!

Step OSF-2 - Make sure you are in the 'Program Memory' Tab (which is default when you open ST Visual Programmer) and go to File/Open.

Staying in the 'Program Memory' Tab, Go to File/Open from the Header Menu

Step OSF-3 - Open the Most Recent .hex OSF file (i.e. TSDZ2-v0.19.0). If you do not see it, make sure the 'file type' is set to .hex - you will see the values on the screen populate.

Open the most recent .hex OSF file (i.e.. TSDZ2-v0.19.0)

Step OSF-4 - Select 'Current Tab' from the Program Menu to write/program the firmware to the motor. Make sure you open the OSF .hex file into the 'Program Memory' tab, and only write/program to the current tab!

Select 'Program Current Tab' Only from the Program Menu

That's it for the TSDZ2 Motor OSF Programming! 

Note: You must also program your compatible Display with TSDZ2 Open Source Firmware as well. (i.e. 850C DISPLAY - TSDZ2 OPEN SOURCE FIRMWARE - PLUG AND PLAY BOOTLOADER UPDATE TUTORIAL)

 

--------------------------------------------------

 

Files Needed:

ST Visual Programmer / STVP-STM32 from STMicroelectronics (must provide email for this free download)

Most Recent Drivers for Your Operating System / ST Visual Programmer (must provide email for this free download)

 

TSDZ2 STOCK FIRMWARE ARCHIVE - Remember that you need to READ the 'Option Byte' from your TSDZ2 FIRST, then OPEN BOTH 'Program Memory' AND 'Data Memory' Firmware .s19 files into the corresponding tabs - and finally - Program/Write to ALL TABS. Do not mix the firmware voltage files, make sure you use both the same voltage. You can use a 48v or a 52v firmware file on a 36v Motor for slightly increase cadence/rpm support.

TSDZ2 OPEN SOURCE FIRMWARE ARCHIVE - Remember to open the OSF .hex file into the 'Program Memory' tab, and ONLY WRITE TO THE CURRENT TAB!

Note: You must also program your compatible Display with TSDZ2 Open Source Firmware as well. (i.e. 850C DISPLAY - TSDZ2 OPEN SOURCE FIRMWARE - PLUG AND PLAY BOOTLOADER UPDATE TUTORIAL)

 

Related Open Source Firmware Products:

850C Display

Bootloader Box

TSDZ2 Motor Firmware Programming Cable

Open Source Firmware TSDZ2 w/ 850C Display + Options

Open Source Firmware Product Page

 

 


Leave a comment


Please note, comments must be approved before they are published