Instructions for connecting the programmer SWD and change of model, firmware.
The author of the manual is not responsible for the actions that you do with your device. Everything is at your own peril and risk! If your device is out of order, do not say that I am to blame,
otherwise I will point my finger at you and laugh out loud I warned you
Before soldering and while working with the programmer, ALWAYS disconnect the battery! and press the power button to discharge the capacitors.
You need a programmer j-link v8 (Or anyone else that understands the STM32F103RC processor). Well, a soldering iron with wires.
Install the program with the driver. If anyone needs it, you can download here version 4.20a, it is more convenient to work with.
Also download the program for working with dumps here, I write it myself, and you can write in PM on the forums (my nickname MRN76) about the problems of work and possible improvements.
A bit of theory.
Pinout of j-link connector:
To work, we need 5 points of connection to the controller:
- VCC (power supply). In the programmer, this is the 1st pin. On the controller, it is easier to solder to the capacitor near the processor or to the 3.3 control point (or to the feet of the processor, 13,19,32,48,64).
- SWDIO (data input / output). In the programmer, this is the 7th pin. On the controller, the terminal farthest from the arrow for SWD (or to the 46th leg, PA13).
- SWCLK (SWD clock speed). In the programmer, this is the 9th pin. On the controller, the middle pin for SWD (or to the 49th leg, PA14).
- GND (ground) Anyone with ground can be used in the programmer, 4,6,8,10 ...). On the controller, the pin for SWD is marked with an arrow.
- NRST (reset). In the programmer, this is the 15th pin. On the controller, it is easier to solder to the capacitor going to the 7th leg of the processor.
Everything is ready and you can connect the USB cable to the programmer.
Some diodes will light up, the controller may beep on different firmware.
Launching the J-Flash ARM program
We configure it for our processor. Go to Options-> Project settings ...
And set up as in the photo below:
We connect to the device. Target-> Connect. If successful, then we see from the bottom in the status bar that the device is connected and the connection speed.
Reading ROM memory. Target-> Read back-> Selected sectors
And we see the reading process. Fast enough. After that, we save the read data in the binary file * .bin format
In the request for the start and end addresses, just click OK
We close the data window in the program (which appeared after reading) so as not to get confused.
Next, open our file in my programm (download here) on working with dumps (select the desired dump file and click read).
The program reads some data, determines which firmware is installed and the model of the device. (As long as the program understands ONE C / E / P monowheels and Mini / Pro mini-wheels, ONE A1 / S2 mono-wheels are partially supported)
If we want to change the model, then we select which model we want and press the button change model, if we want to change the firmware, select the desired firmware and press the button change firmware.
Next, open the modified file in the programmer program. File-> Open data file
Checking that the starting address is 8000000
And load it into the processor. Target-> Program & verify.
Here the program will ask if we really want to do this, and that it will first erase all data. Well, we know that we want this)
And the firmware process is in progress.
At the end, reports that everything is successful
Disconnect from the device. Target -> Disconnect
We take out the USB from the programmer, take out the contacts from the programmer (To check what has been done).
if all is well, you can unsolder / remove the wires from the device.