new tsdz8 pswpower

When I flash TSDZ2 motor I always removefirst previous installation with st-link and after that flash new version.
Pre-existing installation interfered with the new installation.

Can it also be done with j-link?
 
For TSDZ8 you must use Jlink and not Stlink.
The first time, you must flash 2 hex files:
- the provided firmware
- and YOUR configuration that you generate with the configurator.

Look at the readme in github for more details.
 
did you checked if the configuration hex file has been updated by the configurator. The date and time should have changed when you run the configurator and ask for compile & flash.
Yes the configuration.hex file date and time was updated to current after I used the configurator. I plugged jlink into motor. Used the j flash program as before and flashed first the tsdz8 firmware.hex . Then a second flash with the configuration.hex .
It showed my battery level was one bar with a full battery. And had no power. Also it didn't show any NEW data when lights on or at power on.
 
Yes the configuration.hex file date and time was updated to current after I used the configurator. I plugged jlink into motor. Used the j flash program as before and flashed first the tsdz8 firmware.hex . Then a second flash with the configuration.hex .
It showed my battery level was one bar with a full battery. And had no power. Also it didn't show any NEW data when lights on or at power on.
It is strange. It looks like the controller is not running or at least is not sending messages to the display.
I do not see immediately what happens.
I have to leave for some hours but in about 6/7 hours I will make again an upload on my controller.
I will keep you informed.
 
would it be a good idea to open both data files in j-flash and attempt to flash them both at the same time?
 
would it be a good idea to open both data files in j-flash and attempt to flash them both at the same time?
I do not know if Jfash allows to load 2 hex file at the same time.
I can't provide only one file because the principle is that there is one file with the firmware (containing all options) and another (the configuration) that is user specific.
 
I do not know if Jfash allows to load 2 hex file at the same time.
I can't provide only one file because the principle is that there is one file with the firmware (containing all options) and another (the configuration) that is user specific.
It allows me to open two data files at the same time. Idk if it will flash both. But if it works for you flashing both separately that's what I'll do.
I'm still unable to get the motor to spin with the OSF tho
 
Well, a small update regarding osf tsdz8 via java, I have checked the hex generated for xh18, the support and throttle works, it supports quite nicely (like the more powerful tsdz2 osf), although with the settings I have set, slight jerks during support are felt, but I think it's a matter of refining the settings. Thanks Mstrens
 
Well, a small update regarding osf tsdz8 via java, I have checked the hex generated for xh18, the support and throttle works, it supports quite nicely (like the more powerful tsdz2 osf), although with the settings I have set, slight jerks during support are felt, but I think it's a matter of refining the settings. Thanks Mstrens
Thanks for the feed back.
It is not clear for me what you mean with "support". Is "support" the same as "assist"?
If so, Am I right if I say:
The latest OSF TSDZ8 version (using the java configurator) has been tested on a bike and works quite nicely.

Please note that I got today photos of a TSDZ8 controller showing that the internal shunt resistors used to measure the current does not have the expected values (thy are different from those of the TSDZ2 V2 controller). The result could be that the current measured by the firmware is not the real one and so the firmware (perhaps) does not apply the expected protections against high currents. So be careful. In the coming days, a test wil be made to compare the real current with the one measured by the fiirmware. I will then know if I have to make some change about this.
 
It allows me to open two data files at the same time. Idk if it will flash both. But if it works for you flashing both separately that's what I'll do.
I'm still unable to get the motor to spin with the OSF tho
Up to now, I always flashed separately the 2 HEX files.
Flashing first the firmware or the config should not matter.
I expect that the original Tongsteng firmware does not use the upper part of the flash memory where the config is stored. So it should not interfere with original firmware.
Once my firmware is uploaded, it checks if the config exists and is compatible. When it is not the case, the motor should not work but the display should give an error E09 (on VLCD5). Code is perhaps different for other displays.
 
Up to now, I always flashed separately the 2 HEX files.
Flashing first the firmware or the config should not matter.
I expect that the original Tongsteng firmware does not use the upper part of the flash memory where the config is stored. So it should not interfere with original firmware.
Once my firmware is uploaded, it checks if the config exists and is compatible. When it is not the case, the motor should not work but the display should give an error E09 (on VLCD5). Code is perhaps different for other displays.
I'm using the vlcd5. No error
Is there a max amps allowed in the configurator? I set it to 25amps. 1200 watts.
 
I forgot to say that in the current version (with configurator), I made changes in order to let the user save the modification entered with the display.
E.g. if you change the assist mode with the display and then save it , this set up should not be lost after a power off.
To know how to change parameters with the display and how to save the changes, look at the OSF manuals made by mbrusa (links in the readme section).
I did not yet had time to test this functionality myself.
 
Thanks for the feed back.
It is not clear for me what you mean with "support". Is "support" the same as "assist"?
If so, Am I right if I say:
The latest OSF TSDZ8 version (using the java configurator) has been tested on a bike and works quite nicely.

Please note that I got today photos of a TSDZ8 controller showing that the internal shunt resistors used to measure the current does not have the expected values (thy are different from those of the TSDZ2 V2 controller). The result could be that the current measured by the firmware is not the real one and so the firmware (perhaps) does not apply the expected protections against high currents. So be careful. In the coming days, a test wil be made to compare the real current with the one measured by the fiirmware. I will then know if I have to make some change about this.
Ok thanks for info, yes I meant assist.
 
I'm using the vlcd5. No error
Is there a max amps allowed in the configurator? I set it to 25amps. 1200 watts.
In the configurator you define the max power.
Then the firmware calculates the max current taking care of the voltage (current = pwer / voltage). The firmware measures the current and checks that it does not exceed the max current that has been calculated.

As said, it could be that the firmware makes an error when it measures the current and so that the protection is not as expected.

Furthermore, it is good to know that a protection against overcurrent is not sufficient at this stage of the project.
In fact, to have a good efficiency, the firmware has to control the rotation of the magnetic flux in a very precise way.
It it is not the case, the motor could become very warm even with a current much lower that the foreseen maximum.
In the firmware there is a parameter (foc multiplier) that has an impact on the motor efficiency. Currently I assigned it a value to this parameter but have no way to test if it is good or not.
So at this stage, I really recomend not to push the motor to the limits and to check regularly the temperature.

Currently changing this parameter (foc multiplier) requires to edit the source and to recompile the firmware. I hope to add it into the java configurator. So it will be easier to make tests with different values.
 
In the configurator you define the max power.
Then the firmware calculates the max current taking care of the voltage (current = pwer / voltage). The firmware measures the current and checks that it does not exceed the max current that has been calculated.

As said, it could be that the firmware makes an error when it measures the current and so that the protection is not as expected.

Furthermore, it is good to know that a protection against overcurrent is not sufficient at this stage of the project.
In fact, to have a good efficiency, the firmware has to control the rotation of the magnetic flux in a very precise way.
It it is not the case, the motor could become very warm even with a current much lower that the foreseen maximum.
In the firmware there is a parameter (foc multiplier) that has an impact on the motor efficiency. Currently I assigned it a value to this parameter but have no way to test if it is good or not.
So at this stage, I really recomend not to push the motor to the limits and to check regularly the temperature.

Currently changing this parameter (foc multiplier) requires to edit the source and to recompile the firmware. I hope to add it into the java configurator. So it will be easier to make tests with different values.
but the configurator has a box for amps, and a box for watts? should i leave either of them empty? and what should i do to fix the battery level indicator problem? it says 1 bar of battery with a full 48volt battery.
 
but the configurator has a box for amps, and a box for watts? should i leave either of them empty? and what should i do to fix the battery level indicator problem? it says 1 bar of battery with a full 48volt battery.
You are right. The way it works is explained in the TSDZ2 manual.
Here an extract
Code:
- Battery current max (A)
 Maximum battery current in Amperes.
 Set the maximum current that the battery can deliver. Consult the characteristics of the battery.
 Maximum recommended value 12 A for 48 V motor, 16 A for 36 V motor.
The maximum value is limited internally by the software to 18 A.
 The maximum value can take a lower value, see next parameter.
 If you set a value near to the maximum, consider installing a temperature sensor.
 
 - Battery power max (W)
 Maximum power supplied by the battery in watts.
 It is also the motor power limit in OFFROAD mode.
 The maximum current used as a limit is the minimum value between "Battery current max" and the one
calculated with "Battery power max" / "Battery voltage"

So, currently it should, in theory not exceed 18A. Still based on a possible mistake in TSDZ8 firmware due to unexpected shunt resistor, it could be that TSDZ8 firmware does not measure the real current and so that this limit is exceeded.

The limit of 18A that exists in current firmware could easily be changed. It is foreseen to protect the controller/motor.
You could increased it if your compile the code by yourself (at your own risk).
 
Yes the configuration.hex file date and time was updated to current after I used the configurator. I plugged jlink into motor. Used the j flash program as before and flashed first the tsdz8 firmware.hex . Then a second flash with the configuration.hex .
It showed my battery level was one bar with a full battery. And had no power. Also it didn't show any NEW data when lights on or at power on.
I just made a new test using the compiled firmware OSF_TSDZ8_V00_01_03 and generating a new config with the TSDZ8 configurator.
It works on my side (E.g. I get several bars in the battery gauge of VLCD5, I get other data on the display when I press Ligth on and I can let the motor run).
Another user also said that it works.
So I expect there is something wrong on your side but I do not know what.

It is strange because even if the config file is wrong/missing, the display is supposed to give an error message.

If you check the config file that you created, does it look like the one I put on github (first line is
:020000041000EA

last line is nr 151 and is
:00000001FF
 
I get bored to win10, java configurator did not work and went to debian linux. Then started to happen. I executed: java -jar OSF_TSDZ8_configurator.jar

I get this error: LinkageError occurred while loading main class TSDZ2_Configurator java.lang.UnsupportedClassVersionError: TSDZ2_Configurator has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0.

So I thought tsdz8 confgurator has coded with latest java.

I installed latest java:

wget https://download.oracle.com/java/23/latest/jdk-23_linux-x64_bin.deb

sudo dpkg -i jdk-23_linux-x64_bin.deb

And now configurator opens. Misadvantage is configurator page cannot resize.

Segger j-link is also working in Linux.

Maybe I get some day segger clone and can flash TSDZ8.
 
I get bored to win10, java configurator did not work
I've built the configurator on a Win10 system (find the jar file as zipped attachment). It starts properly by a simple double click, if you have installed a recent JRE (Java runtime environment) There is no need to install the JDK.
I get this output in the cmd window:

Code:
CD src
CALL clean.bat
CALL compile.bat
Copying firmware to release folder.
C:\temp\OSF-main\releases\TSDZ2-20.1C.6-0-PROGRAM.hex
COPY ..\bin\main.hex "C:\temp\OSF-main\releases\TSDZ2-20.1C.6-0.hex"
Press any key to flash... (Ctl+C to stop)

The file TSDZ8_config.hex is updated in the files_to_flash folder.
But of course I can't test, if it works properly, as I have no TSDZ8 ;)

regards
stancecoke
 

Attachments

  • Java_Configurator_TSDZ8.zip
    103.7 KB · Views: 12
Last edited:
I've built the configurator on a Win10 system (find the jar file as zipped attachment). It starts properly by a simple double click, if you have installed a recent JRE (Java runtime environment) There is no need to install the JDK.
I get this output in the cmd window:

Code:
CD src
CALL clean.bat
CALL compile.bat
Copying firmware to release folder.
C:\temp\OSF-main\releases\TSDZ2-20.1C.6-0-PROGRAM.hex
COPY ..\bin\main.hex "C:\temp\OSF-main\releases\TSDZ2-20.1C.6-0.hex"
Press any key to flash... (Ctl+C to stop)

The file TSDZ8_config.hex is updated in the files_to_flash folder.
But of course I can't test, if it works properly, as I have no TSDZ8 ;)

regards
stancecoke

Thank you. I will test tomorrow.
 
Back
Top