Chewy said:
Can someone please provide a basic step by step guide of how to flash the motor with Marcoq's firmware?
Hello, I report, translated with google, a guide to programming some time ago taken from a post by Marcoq:
"how to use the Configurator in Java.
First of all, what is needed:
- Install JRE runtime on the PC.
- Install the SDCC compiler as explained by casainho here https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Development
- An original STLINK-V2 programmer or Chinese clone (those in the shape of a USB flash drive).
- the self-made programming cable to connect the motor to the programmer.
- Install the ST Visual Programmer program on the PC.
How to program the motor via the Java Configurator.
- Unzip the file you downloaded from the Repository and save everything where you want (it's a folder).
- In the newly saved folder you will find the TSDZ_Configurator_vx.x.x.jar file, open it with a double click.
- Once the Configurator is open you can make the changes you want, even if by default it is already OK for 36V motors ...
eventually the characteristics of the battery and the max power of the motor must be changed. Connect the programmer to the motor and to the USB port of the PC. Click on the "Compile" button, once finished click on the "Program" button, the Configurator will program the engine without the help of the STVP software ... and you're done.
When "Compiling" with the Configurator a file is always created with the extension .ihx (equivalent to the .hex) which is then used to program the motor directly using the "Program" button.
The file with the .hex extension found in the releases folder is a file compiled with the default parameters of the Configurator and can be written to the motor microcontroller using the ST Visual programmer program (STVP).
The Wheel perimeter check and Wheel max speed indicate that these parameters are received by the VLCD6, if the check is disabled the data is read from the eeprom (Default wheel perimeter and Default wheel max speed).
Motor working flags and Wheel turning flags are used to indicate to the VLCD6 that the engine or wheel are turning, otherwise it would go to standby, if you want to keep the display always on, just enable the flag VLCD6 always on.
If brake sensors are installed, the relevant flag must be enabled.
Magic Byte should be used when producing a .hex file and programming the micro with the STVP softare without executing the eeprom deletion procedure, because the magic byte is the eeprom key, if it changes with respect to the one saved in memory, they will come automatically update all the data resident in eeprom ...... we say that this option is for expert users ...
I've already fixed the "break" write error ....