FRONT PAGE SUPERSALE running until 9/27 Retail Store Grand Opening! First come first serve while supplies last! New products will be added periodically to the front page sale! For questions email: customerservice@cycles.eco

Add your deal, information or promotional text

TSDZ2 Motor Controller Firmware Programming

 

 TSDZ2 Motor Firmware Programming

To get started, you will need a TSDZ2 Motor Firmware Programming Cable to connect your TSDZ2 Motor Controller to your Computer

PROGRAMMING OR ATTEMPTING TO PROGRAM YOUR OWN DISPLAY/MOTOR WITH OSF OR ANY FIRMWARE FILE IN GENERAL DOES VOID YOUR WARRANTY AND SHOULD BE DONE AT YOUR OWN RISK!

Note: You will also need a Bootloader Box for 860C Displays to program your Display with a matching OSF Version. This is a separate installation/updating process detailed in our article: '860C Display Bootloader - Plug and Play Open Source Firmware Programming'. The motor controller AND display must both be programmed independently to successfully run Open Source Firmware.

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. You get more of an increase in torque up to the RPM limit as opposed to increasing the RPM limit, however.

  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 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), and then plug in your TSDZ2 Programming Cable USB end into the Computer USB Port (with 6 foot extension in place if needed). 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. Note: Programming 48v or 52v Firmware on a 36v Motor will allow it to Spin Slightly Faster, Supporting Higher Cadence RPM - but alternate/proprietary or OSF firmware is truly needed to unlock the RPM cap to make a true 'Overdrive' Motor.

 

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') -  NOTE: if you Read from an OSF programmed TSDZ2 then the third set will read '20' instead of '28', as the '28' is the value from stock firmware - !!

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 - If you Program 'All tabs' before Read 'All tabs' or at least the 'Option Byte' then the motor will not function as you will be writing all 00's to that tab - !!

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!

Note: If your TSDZ2 is not functioning after this process, you most likely did not 'Read' the 'Option Byte' Tab and you will need to load and Program the 'stockoptionbyte.s19' from the archive to the 'Option Byte tab! This is the most common error. If this does not solve it then you either did not load both the 'Program Memory' AND 'Data Memory' files - or not Program 'All tabs'. Again, for the process to be complete, ALL TABS must be correct!

 

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

 

Open Source Firmware (OSF) Programming

Step OSF-1 - Download the latest stable version (TSDZ2-OSF-motor-controller-v20.1C.3) of the TSDZ2 Motor Controller OSF(or any version of your choice as long as it matches your display's loaded version) - 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-OSF-motor-controller-v1.1.0.hex). 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 program a compatible Display with TSDZ2 Open Source Firmware as well. (i.e. 860C DISPLAY - TSDZ2 OPEN SOURCE FIRMWARE - PLUG AND PLAY BOOTLOADER UPDATE TUTORIAL unless you are manually programming the SW102 which we do not cover the process of)

 

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

 

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. Note: Programming 48v or 52v Firmware on a 36v Motor will allow it to Spin Slightly Faster, Supporting Higher Cadence RPM - but alternate/proprietary or OSF firmware is truly needed to unlock the RPM cap to make a true 'Overdrive' Motor.

TSDZ2 OSF Firmware File (must match motor firmware version)

 

Reminder: You must program a Compatible Display with TSDZ2 Open Source Firmware as well. (i.e. 860C DISPLAY - TSDZ2 OPEN SOURCE FIRMWARE - PLUG AND PLAY BOOTLOADER UPDATE TUTORIAL)

 

Related Open Source Firmware Products:

TSDZ2 Motor Firmware Programming Cable

Bootloader Box for 860C Displays

860C Display w/ OSF

Open Source Firmware TSDZ2 w/ 860C Display + Options

Open Source Firmware Product Page

 

 

Leave a comment (all fields required)

Comments will be approved before showing up.

Search