Open Henry586 opened 4 months ago
TLSR8258 Flash memory can be 1 MB. Such chips are usually installed in Tuya's ZTU modules for Zigbee. You can find out the Flash size using the "i" command.
...
Flash JEDEC ID: 0xC86013, Size: 512 kbytes
...
When recording Flash, no full check is performed to speed up the process. If clarification of the record is required, then you should read it again and compare the files. It will take the same amount of time if build in the “verify” command.
REGISTERS: 000060: 00 00 c0 ff 1f 37 42 00 02 00 02 00 01 02 1f 00 000070: 00 04 00 04 00 00 00 00 00 00 00 64 00 02 62 55`
will try with verify command.
REGISTERS: 000060: 7c f7 c7 83 08 30 06 00 02 00 02 00 01 02 1f 00 000070: 00 04 00 04 00 00 00 00 00 00 00 64 00 02 62 55 Worked Time: 0.267 sec
D:\tlsr8258\TLSRPGM>`
The processor is stopped in a different place in the program - therefore there may be different data in the registers...
On the second pass, Flash is not yet enabled. There was no SoC reset. "-t 5" - the reset pulse time of 5 ms is not enough to discharge the capacitor from the programmer pin at 4 mA or pin "reset" is not connected.
Yes, you are right, only have gnd,sws,pwr connected. Thanks, I will try to modify them and try again.
Many thanks for such a great tools.
I just read flash from dongle, then erase flash, then write back, but it seems does not run any more. 1) read `D:\tlsr8258\TLSRPGM>TlsrPgm.py -w -t 5 -a 100 -c -pCOM8 -b1000000 rf 0 0x80000 dongle_512k.bin
TLSR82xx TlsrPgm version 31.10.23
Open COM8, 230400 bit/s... ok PGM: ChipID: 0x5562 (TLSR825x), ver: 0.0.0.2 swdiv 5, addrlen 3, swbuf [5a 00 06 02 00 05], pwr On SWire bit rate: 0.9600 Mbits/s Set Speed UART PGM board 1000000 bits/s... ok ReOpen COM8, 1000000 bit/s... ok === PreProcess ======================================== Hard reset Ext.MCU 5 ms... ok Activate 100 ms... ok CPU PC=0x00000000 CPU Stall... ok === Process =========================================== Outfile: dongle_512k.bin Read Flash from 0x000000 to 0x080000... Worked Time: 14.937 sec
D:\tlsr8258\TLSRPGM>`
2) erase flash and write it back: `D:\tlsr8258\TLSRPGM>TlsrPgm.py -s -pCOM8 ea
TLSR82xx TlsrPgm version 31.10.23
Open COM8, 230400 bit/s... ok PGM: ChipID: 0x5562 (TLSR825x), ver: 0.0.0.2 swdiv 5, addrlen 3, swbuf [5a 00 06 02 00 05], pwr On SWire bit rate: 0.9600 Mbits/s === PreProcess ======================================== CPU Stop... ok === Process =========================================== Write 0 to Flash Status Register... Flash Status Register: 0x00 Erase All Flash ...
D:\tlsr8258\TLSRPGM>TlsrPgm.py -w -t 5 -a 100 -c -pCOM8 -b1000000 we 0 dongle_512k.bin
TLSR82xx TlsrPgm version 31.10.23
Open COM8, 230400 bit/s... ok PGM: ChipID: 0x5562 (TLSR825x), ver: 0.0.0.2 swdiv 5, addrlen 3, swbuf [5a 00 06 02 00 05], pwr On SWire bit rate: 0.9600 Mbits/s Set Speed UART PGM board 1000000 bits/s... ok ReOpen COM8, 1000000 bit/s... ok === PreProcess ======================================== Hard reset Ext.MCU 5 ms... ok Activate 100 ms... ok CPU PC=0x00000000 CPU Stall... ok === Process =========================================== Inputfile: dongle_512k.bin Write 0 to Flash Status Register... Flash Status Register: 0x00 Write Flash data 0x00000000 to 0x00080000... Worked Time: 6.934 sec ` 3) try to restart but it does not work as expected.
Is there anything missing? Many thanks!