Open Rafik89 opened 1 year ago
Thanks, will you be able to recheck if I give you updated flasher binary?
Yes, i can check this. First afternoon 😉
The wb3s device also has a reading problem. The recording goes smoothly.
Flasher mode: BK7231T Going to open port: COM6. Serial port open! Getting bus... (now, please do reboot by CEN or by power off/on) Getting bus failed, will try again - 0/100! Getting bus failed, will try again - 1/100! Getting bus success! Going to set baud rate setting (115200)! Going to do erase, start 69632, sec count 2! Erasing sector 69632... ok! Erasing sector 73728... ok! All selected sectors erased! Going to start reading at offset 0x11000... Reading 0x11000... failed with serial.BytesToRead 4050 Failed! Read failed?
Assembled layout on WB3S ready to help with testing
Also having a problem flashing a WB3S
Starting read backup and flash new! Now is: Friday, January 6, 2023 4:19:33 PM. Flasher mode: BK7231T Going to open port: COM3. Serial port open! Getting bus... (now, please do reboot by CEN or by power off/on) Getting bus failed, will try again - 0/100! Getting bus failed, will try again - 1/100! Getting bus success! Going to set baud rate setting (1500000)! Going to start reading at offset 0x11000... Reading 0x11000... failed with serial.BytesToRead 4075 Failed!
Does the problem happen only in "Backup and write" modes or in a separate modes as well?
I will try to prepare a build with increased time for read operation and we will see what happens.
In my case both during backup and write. Also the write and read test in the advanced options do not allow to communicate properly with the MCU.
same on backup (read) only Starting read! Now is: Friday, January 6, 2023 5:11:13 PM. Flasher mode: BK7231T Going to open port: COM3. Serial port open! Getting bus... (now, please do reboot by CEN or by power off/on) Getting bus failed, will try again - 0/100! Getting bus failed, will try again - 1/100! Getting bus success! Going to set baud rate setting (115200)! Going to start reading at offset 0x11000... Reading 0x11000... failed with serial.BytesToRead 4056 Failed! There was no result to save.
test read/write Starting read-write test! Now is: Friday, January 6, 2023 5:14:11 PM. Flasher mode: BK7231T Going to open port: COM3. Serial port open! Getting bus... (now, please do reboot by CEN or by power off/on) Getting bus failed, will try again - 0/100! Getting bus success! Going to set baud rate setting (921600)! Going to do erase, start 69632, sec count 2! Erasing sector 69632... ok! Erasing sector 73728... ok! All selected sectors erased! Going to start reading at offset 0x11000... Reading 0x11000... failed with serial.BytesToRead 4092 Failed!
It works for me... I increased a delay in UART read for slower computers...
Can you recheck?
https://github.com/openshwprojects/BK7231GUIFlashTool/releases/tag/v1.0.2
1.0.2 doesn't give the countdown to do the reset
Starting read backup and flash new! Now is: Friday, January 6, 2023 5:27:15 PM. Flasher mode: BK7231T Going to open port: COM3. Serial port open! Getting bus... (now, please do reboot by CEN or by power off/on) Getting bus success! Going to set baud rate setting (921600)! Going to start reading at offset 0x11000... Reading 0x11000... failed with serial.BytesToRead 4092 (expected 4111) The beginning of buffer in UART contains 040EFF01E0FCF40610090000100100FF data. Failed!
No @itsj4y , it's not the version thing. You won't get countdown to RESET if you do erase flash memory of BK but do not write. This is because in this case BK has no application and reboots constantly.
The same will happen in bkWriter or anything, as long as you do erase without write on BK.
Still... thanks for testing. I hoped that increasing the delay from 5 to 10 seconds will help, but it seems that issue is somewhere else.
Flash respond command is the following: byte[] cBuf = new byte[] { 0x04, 0x0e, 0xff, 0x01, 0xe0, 0xfc, 0xf4, (1 + 1 + (4 + 4 1024)) & 0xff, ((1 + 1 + (4 + 4 1024)) >> 8) & 0xff, (byte)CommandCode.FlashRead4K};
so your buffer content looks like it has a start of flash read command, but for some reasons it's cut in place?
Can you try different baud rate, like 128000 and 256000 ? You can enter those numbers into the field (copy paste them, they are not on the list).
Extra question: can you show a photo of your USB to uart converter and/or give me a specific model name of it?
Starting read backup and flash new!
Now is: Friday, January 6, 2023 5:35:29 PM.
Flasher mode: BK7231T
Going to open port: COM3.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus success!
Going to set baud rate setting (128000)!
Going to start reading at offset 0x11000...
Reading 0x11000... failed with serial.BytesToRead 4092 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF40610090000100100FF data.
Failed!
Starting read backup and flash new!
Now is: Friday, January 6, 2023 5:40:55 PM.
Flasher mode: BK7231T
Going to open port: COM3.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus success!
Going to set baud rate setting (256000)!
Going to start reading at offset 0x11000...
Reading 0x11000... failed with serial.BytesToRead 4092 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF40610090000100100FF data.
Failed!
Ok so it worked after firmware write (no backup)
When i do Backup:
Starting read!
Now is: sobota, 7 stycznia 2023 00:48:51.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus failed, will try again - 3/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 7c
final sr: 7c
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... failed with serial.BytesToRead 4056 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF4061009000000000069 data.
Failed! There was no result to save.
Getting bus success!
Going to set baud rate setting (115200)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... failed with serial.BytesToRead 4055 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF4061009000000000069 data.
Failed! There was no result to save.
Starting read!
Now is: sobota, 7 stycznia 2023 00:51:20.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus success!
Going to set baud rate setting (1500000)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 7c
final sr: 7c
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... failed with serial.BytesToRead 4064 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF4061009000000000069 data.
Failed! There was no result to save.
But when flashing already without a backup, the process goes forward.
Starting flash new (no backup)!
Now is: sobota, 7 stycznia 2023 00:53:30.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus failed, will try again - 3/100!
Getting bus success!
Going to set baud rate setting (115200)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Reading file firmwares/OpenBK7231N_QIO_1.15.292.bin...
Loaded 1220464 bytes from firmwares/OpenBK7231N_QIO_1.15.292.bin...
Preparing to write data file to chip - resetting bus and baud...
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus success!
Going to set baud rate setting (115200)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to do erase, start 0, sec count 298!
Erasing sector 0... ok! Erasing sector 4096... ok! Erasing sector 8192... ok! Erasing sector 12288... ok! Erasing sector 16384... ok! Erasing sector 20480... ok! Erasing sector 24576... ok! Erasing sector 28672... ok! Erasing sector 32768... ok! Erasing sector 36864... ok! Erasing sector 40960... ok! Erasing sector 45056... ok! Erasing sector 49152... ok! Erasing sector 53248... ok! Erasing sector 57344... ok! Erasing sector 61440... ok! Erasing sector 65536... ok! Erasing sector 69632... ok! Erasing sector 73728... ok! Erasing sector 77824... ok! Erasing sector 81920... ok! Erasing sector 86016... ok! Erasing sector 90112... ok! Erasing sector 94208... ok! Erasing sector 98304... ok! Erasing sector 102400... ok! Erasing sector 106496... ok! Erasing sector 110592... ok! Erasing sector 114688... ok! Erasing sector 118784... ok! Erasing sector 122880... ok! Erasing sector 126976... ok! Erasing sector 131072... ok! Erasing sector 135168... ok! Erasing sector 139264... ok! Erasing sector 143360... ok! Erasing sector 147456... ok! Erasing sector 151552... ok! Erasing sector 155648... ok! Erasing sector 159744... ok! Erasing sector 163840... ok! Erasing sector 167936... ok! Erasing sector 172032... ok! Erasing sector 176128... ok! Erasing sector 180224... ok! Erasing sector 184320... ok! Erasing sector 188416... ok! Erasing sector 192512... ok! Erasing sector 196608... ok! Erasing sector 200704... ok! Erasing sector 204800... ok! Erasing sector 208896... ok! Erasing sector 212992... ok! Erasing sector 217088... ok! Erasing sector 221184... ok! Erasing sector 225280... ok! Erasing sector 229376... ok! Erasing sector 233472... ok! Erasing sector 237568... ok! Erasing sector 241664... ok! Erasing sector 245760... ok! Erasing sector 249856... ok! Erasing sector 253952... ok! Erasing sector 258048... ok! Erasing sector 262144... ok! Erasing sector 266240... ok! Erasing sector 270336... ok! Erasing sector 274432... ok! Erasing sector 278528... ok! Erasing sector 282624... ok! Erasing sector 286720... ok! Erasing sector 290816... ok! Erasing sector 294912... ok! Erasing sector 299008... ok! Erasing sector 303104... ok! Erasing sector 307200... ok! Erasing sector 311296... ok! Erasing sector 315392... ok! Erasing sector 319488... ok! Erasing sector 323584... ok! Erasing sector 327680... ok! Erasing sector 331776... ok! Erasing sector 335872... ok! Erasing sector 339968... ok! Erasing sector 344064... ok! Erasing sector 348160... ok! Erasing sector 352256... ok! Erasing sector 356352... ok! Erasing sector 360448... ok! Erasing sector 364544... ok! Erasing sector 368640... ok! Erasing sector 372736... ok! Erasing sector 376832... ok! Erasing sector 380928... ok! Erasing sector 385024... ok! Erasing sector 389120... ok! Erasing sector 393216... ok! Erasing sector 397312... ok! Erasing sector 401408... ok! Erasing sector 405504... ok! Erasing sector 409600... ok! Erasing sector 413696... ok! Erasing sector 417792... ok! Erasing sector 421888... ok! Erasing sector 425984... ok! Erasing sector 430080... ok! Erasing sector 434176... ok! Erasing sector 438272... ok! Erasing sector 442368... ok! Erasing sector 446464... ok! Erasing sector 450560... ok! Erasing sector 454656... ok! Erasing sector 458752... ok! Erasing sector 462848... ok! Erasing sector 466944... ok! Erasing sector 471040... ok! Erasing sector 475136... ok! Erasing sector 479232... ok! Erasing sector 483328... ok! Erasing sector 487424... ok! Erasing sector 491520... ok! Erasing sector 495616... ok! Erasing sector 499712... ok! Erasing sector 503808... ok! Erasing sector 507904... ok! Erasing sector 512000... ok! Erasing sector 516096... ok! Erasing sector 520192... ok! Erasing sector 524288... ok! Erasing sector 528384... ok! Erasing sector 532480... ok! Erasing sector 536576... ok! Erasing sector 540672... ok! Erasing sector 544768... ok! Erasing sector 548864... ok! Erasing sector 552960... ok! Erasing sector 557056... ok! Erasing sector 561152... ok! Erasing sector 565248... ok! Erasing sector 569344... ok! Erasing sector 573440... ok! Erasing sector 577536... ok! Erasing sector 581632... ok! Erasing sector 585728... ok! Erasing sector 589824... ok! Erasing sector 593920... ok! Erasing sector 598016... ok! Erasing sector 602112... ok! Erasing sector 606208... ok! Erasing sector 610304... ok! Erasing sector 614400... ok! Erasing sector 618496... ok! Erasing sector 622592... ok! Erasing sector 626688... ok! Erasing sector 630784... ok! Erasing sector 634880... ok! Erasing sector 638976... ok! Erasing sector 643072... ok! Erasing sector 647168... ok! Erasing sector 651264... ok! Erasing sector 655360... ok! Erasing sector 659456... ok! Erasing sector 663552... ok! Erasing sector 667648... ok! Erasing sector 671744... ok! Erasing sector 675840... ok! Erasing sector 679936... ok! Erasing sector 684032... ok! Erasing sector 688128... ok! Erasing sector 692224... ok! Erasing sector 696320... ok! Erasing sector 700416... ok! Erasing sector 704512... ok! Erasing sector 708608... ok! Erasing sector 712704... ok! Erasing sector 716800... ok! Erasing sector 720896... ok! Erasing sector 724992... ok! Erasing sector 729088... ok! Erasing sector 733184... ok! Erasing sector 737280... ok! Erasing sector 741376... ok! Erasing sector 745472... ok! Erasing sector 749568... ok! Erasing sector 753664... ok! Erasing sector 757760... ok! Erasing sector 761856... ok! Erasing sector 765952... ok! Erasing sector 770048... ok! Erasing sector 774144... ok! Erasing sector 778240... ok! Erasing sector 782336... ok! Erasing sector 786432... ok! Erasing sector 790528... ok! Erasing sector 794624... ok! Erasing sector 798720... ok! Erasing sector 802816... ok! Erasing sector 806912... ok! Erasing sector 811008... ok! Erasing sector 815104... ok! Erasing sector 819200... ok! Erasing sector 823296... ok! Erasing sector 827392... ok! Erasing sector 831488... ok! Erasing sector 835584... ok! Erasing sector 839680... ok! Erasing sector 843776... ok! Erasing sector 847872... ok! Erasing sector 851968... ok! Erasing sector 856064... ok! Erasing sector 860160... ok! Erasing sector 864256... ok! Erasing sector 868352... ok! Erasing sector 872448... ok! Erasing sector 876544... ok! Erasing sector 880640... ok! Erasing sector 884736... ok! Erasing sector 888832... ok! Erasing sector 892928... ok! Erasing sector 897024... ok! Erasing sector 901120... ok! Erasing sector 905216... ok! Erasing sector 909312... ok! Erasing sector 913408... ok! Erasing sector 917504... ok! Erasing sector 921600... ok! Erasing sector 925696... ok! Erasing sector 929792... ok! Erasing sector 933888... ok! Erasing sector 937984... ok! Erasing sector 942080... ok! Erasing sector 946176... ok! Erasing sector 950272... ok! Erasing sector 954368... ok! Erasing sector 958464... ok! Erasing sector 962560... ok! Erasing sector 966656... ok! Erasing sector 970752... ok! Erasing sector 974848... ok! Erasing sector 978944... ok! Erasing sector 983040... ok! Erasing sector 987136... ok! Erasing sector 991232... ok! Erasing sector 995328... ok! Erasing sector 999424... ok! Erasing sector 1003520... ok! Erasing sector 1007616... ok! Erasing sector 1011712... ok! Erasing sector 1015808... ok! Erasing sector 1019904... ok! Erasing sector 1024000... ok! Erasing sector 1028096... ok! Erasing sector 1032192... ok! Erasing sector 1036288... ok! Erasing sector 1040384... ok! Erasing sector 1044480... ok! Erasing sector 1048576... ok! Erasing sector 1052672... ok! Erasing sector 1056768... ok! Erasing sector 1060864... ok! Erasing sector 1064960... ok! Erasing sector 1069056... ok! Erasing sector 1073152... ok! Erasing sector 1077248... ok! Erasing sector 1081344... ok! Erasing sector 1085440... ok! Erasing sector 1089536... ok! Erasing sector 1093632... ok! Erasing sector 1097728... ok! Erasing sector 1101824... ok! Erasing sector 1105920... ok! Erasing sector 1110016... ok! Erasing sector 1114112... ok! Erasing sector 1118208... ok! Erasing sector 1122304... ok! Erasing sector 1126400... ok! Erasing sector 1130496... ok! Erasing sector 1134592... ok! Erasing sector 1138688... ok! Erasing sector 1142784... ok! Erasing sector 1146880... ok! Erasing sector 1150976... ok! Erasing sector 1155072... ok! Erasing sector 1159168... ok! Erasing sector 1163264... ok! Erasing sector 1167360... ok! Erasing sector 1171456... ok! Erasing sector 1175552... ok! Erasing sector 1179648... ok! Erasing sector 1183744... ok! Erasing sector 1187840... ok! Erasing sector 1191936... ok! Erasing sector 1196032... ok! Erasing sector 1200128... ok! Erasing sector 1204224... ok! Erasing sector 1208320... ok! Erasing sector 1212416... ok! Erasing sector 1216512... ok!
All selected sectors erased!
Writing sector 0... ok! Writing sector 4096... ok! Writing sector 8192... ok! Writing sector 12288... ok! Writing sector 16384... ok! Writing sector 20480... ok! Writing sector 24576... ok! Writing sector 28672... ok! Writing sector 32768... ok! Writing sector 36864... ok! Writing sector 40960... ok! Writing sector 45056... ok! Writing sector 49152... ok! Writing sector 53248... ok! Writing sector 57344... ok! Writing sector 61440... ok! Writing sector 65536... ok! Writing sector 69632... ok! Writing sector 73728... ok! Writing sector 77824... ok! Writing sector 81920... ok! Writing sector 86016... ok! Writing sector 90112... ok! Writing sector 94208... ok! Writing sector 98304... ok! Writing sector 102400... ok! Writing sector 106496... ok! Writing sector 110592... ok! Writing sector 114688... ok! Writing sector 118784... ok! Writing sector 122880... ok! Writing sector 126976... ok! Writing sector 131072... ok! Writing sector 135168... ok! Writing sector 139264... ok! Writing sector 143360... ok! Writing sector 147456... ok! Writing sector 151552... ok! Writing sector 155648... ok! Writing sector 159744... ok! Writing sector 163840... ok! Writing sector 167936... ok! Writing sector 172032... ok! Writing sector 176128... ok! Writing sector 180224... ok! Writing sector 184320... ok! Writing sector 188416... ok! Writing sector 192512... ok! Writing sector 196608... ok! Writing sector 200704... ok! Writing sector 204800... ok! Writing sector 208896... ok! Writing sector 212992... ok! Writing sector 217088... ok! Writing sector 221184... ok! Writing sector 225280... ok! Writing sector 229376... ok! Writing sector 233472... ok! Writing sector 237568... ok! Writing sector 241664... ok! Writing sector 245760... ok! Writing sector 249856... ok! Writing sector 253952... ok! Writing sector 258048... ok! Writing sector 262144... ok! Writing sector 266240... ok! Writing sector 270336... ok! Writing sector 274432... ok! Writing sector 278528... ok! Writing sector 282624... ok! Writing sector 286720... ok! Writing sector 290816... ok! Writing sector 294912... ok! Writing sector 299008... ok! Writing sector 303104... ok! Writing sector 307200... ok! Writing sector 311296... ok! Writing sector 315392... ok! Writing sector 319488... ok! Writing sector 323584... ok! Writing sector 327680... ok! Writing sector 331776... ok! Writing sector 335872... ok! Writing sector 339968... ok! Writing sector 344064... ok! Writing sector 348160... ok! Writing sector 352256... ok! Writing sector 356352... ok! Writing sector 360448... ok! Writing sector 364544... ok! Writing sector 368640... ok! Writing sector 372736... ok! Writing sector 376832... ok! Writing sector 380928... ok! Writing sector 385024... ok! Writing sector 389120... ok! Writing sector 393216... ok! Writing sector 397312... ok! Writing sector 401408... ok! Writing sector 405504... ok! Writing sector 409600... ok! Writing sector 413696... ok! Writing sector 417792... ok! Writing sector 421888... ok! Writing sector 425984... ok! Writing sector 430080... ok! Writing sector 434176... ok! Writing sector 438272... ok! Writing sector 442368... ok! Writing sector 446464... ok! Writing sector 450560... ok! Writing sector 454656... ok! Writing sector 458752... ok! Writing sector 462848... ok! Writing sector 466944... ok! Writing sector 471040... ok! Writing sector 475136... ok! Writing sector 479232... ok! Writing sector 483328... ok! Writing sector 487424... ok! Writing sector 491520... ok! Writing sector 495616... ok! Writing sector 499712... ok! Writing sector 503808... ok! Writing sector 507904... ok! Writing sector 512000... ok! Writing sector 516096... ok! Writing sector 520192... ok! Writing sector 524288... ok! Writing sector 528384... ok! Writing sector 532480... ok! Writing sector 536576... ok! Writing sector 540672... ok! Writing sector 544768... ok! Writing sector 548864... ok! Writing sector 552960... ok! Writing sector 557056... ok! Writing sector 561152... ok! Writing sector 565248... ok! Writing sector 569344... ok! Writing sector 573440... ok! Writing sector 577536... ok! Writing sector 581632... ok! Writing sector 585728... ok! Writing sector 589824... ok! Writing sector 593920... ok! Writing sector 598016... ok! Writing sector 602112... ok! Writing sector 606208... ok! Writing sector 610304... ok! Writing sector 614400... ok! Writing sector 618496... ok! Writing sector 622592... ok! Writing sector 626688... ok! Writing sector 630784... ok! Writing sector 634880... ok! Writing sector 638976... ok! Writing sector 643072... ok! Writing sector 647168... ok! Writing sector 651264... ok! Writing sector 655360... ok! Writing sector 659456... ok! Writing sector 663552... ok! Writing sector 667648... ok! Writing sector 671744... ok! Writing sector 675840... ok! Writing sector 679936... ok! Writing sector 684032... ok! Writing sector 688128... ok! Writing sector 692224... ok! Writing sector 696320... ok! Writing sector 700416... ok! Writing sector 704512... ok! Writing sector 708608... ok! Writing sector 712704... ok! Writing sector 716800... ok! Writing sector 720896... ok! Writing sector 724992... ok! Writing sector 729088... ok! Writing sector 733184... ok! Writing sector 737280... ok! Writing sector 741376... ok! Writing sector 745472... ok! Writing sector 749568... ok! Writing sector 753664... ok! Writing sector 757760... ok! Writing sector 761856... ok! Writing sector 765952... ok! Writing sector 770048... ok! Writing sector 774144... ok! Writing sector 778240... ok! Writing sector 782336... ok! Writing sector 786432... ok! Writing sector 790528... ok! Writing sector 794624... ok! Writing sector 798720... ok! Writing sector 802816... ok! Writing sector 806912... ok! Writing sector 811008... ok! Writing sector 815104... ok! Writing sector 819200... ok! Writing sector 823296... ok! Writing sector 827392... ok! Writing sector 831488... ok! Writing sector 835584... ok! Writing sector 839680... ok! Writing sector 843776... ok! Writing sector 847872... ok! Writing sector 851968... ok! Writing sector 856064... ok! Writing sector 860160... ok! Writing sector 864256... ok! Writing sector 868352... ok! Writing sector 872448... ok! Writing sector 876544... ok! Writing sector 880640... ok! Writing sector 884736... ok! Writing sector 888832... ok! Writing sector 892928... ok! Writing sector 897024... ok! Writing sector 901120... ok! Writing sector 905216... ok! Writing sector 909312... ok! Writing sector 913408... ok! Writing sector 917504... ok! Writing sector 921600... ok! Writing sector 925696... ok! Writing sector 929792... ok! Writing sector 933888... ok! Writing sector 937984... ok! Writing sector 942080... ok! Writing sector 946176... ok! Writing sector 950272... ok! Writing sector 954368... ok! Writing sector 958464... ok! Writing sector 962560... ok! Writing sector 966656... ok! Writing sector 970752... ok! Writing sector 974848... ok! Writing sector 978944... ok! Writing sector 983040... ok! Writing sector 987136... ok! Writing sector 991232... ok! Writing sector 995328... ok! Writing sector 999424... ok! Writing sector 1003520... ok! Writing sector 1007616... ok! Writing sector 1011712... ok! Writing sector 1015808... ok! Writing sector 1019904... ok! Writing sector 1024000... ok! Writing sector 1028096... ok! Writing sector 1032192... ok! Writing sector 1036288... ok! Writing sector 1040384... ok! Writing sector 1044480... ok! Writing sector 1048576... ok! Writing sector 1052672... ok! Writing sector 1056768... ok! Writing sector 1060864... ok! Writing sector 1064960... ok! Writing sector 1069056... ok! Writing sector 1073152... ok! Writing sector 1077248... ok! Writing sector 1081344... ok! Writing sector 1085440... ok! Writing sector 1089536... ok! Writing sector 1093632... ok! Writing sector 1097728... ok! Writing sector 1101824... ok! Writing sector 1105920... ok! Writing sector 1110016... ok! Writing sector 1114112... ok! Writing sector 1118208... ok! Writing sector 1122304... ok! Writing sector 1126400... ok! Writing sector 1130496... ok! Writing sector 1134592... ok! Writing sector 1138688... ok! Writing sector 1142784... ok! Writing sector 1146880... ok! Writing sector 1150976... ok! Writing sector 1155072... ok! Writing sector 1159168... ok! Writing sector 1163264... ok! Writing sector 1167360... ok! Writing sector 1171456... ok! Writing sector 1175552... ok! Writing sector 1179648... ok! Writing sector 1183744... ok! Writing sector 1187840... ok! Writing sector 1191936... ok! Writing sector 1196032... ok! Writing sector 1200128... ok! Writing sector 1204224... ok! Writing sector 1208320... ok! Writing sector 1212416... ok! Writing sector 1216512... ok! Starting CRC check for 298 sectors, starting at offset 00
CRC matches 0x4FE3B905!
Writing file data to chip successs
Surprisingly, there is no CRC matches error, which in HID occurred
Test writing pattern:
Starting write test!
Now is: sobota, 7 stycznia 2023 00:59:40.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus failed, will try again - 3/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Erasing sector 69632... ok! Erasing sector 73728... ok! Erasing sector 77824... ok! Erasing sector 81920... ok! Erasing sector 86016... ok!
All selected sectors erased!
Writing sector 69632... ok! Writing sector 73728... ok! Writing sector 77824... ok! Writing sector 81920... ok! Writing sector 86016... ok! Starting CRC check for 5 sectors, starting at offset 11000
CRC matches 0x32728942!
Write success!
Test read/write:
Starting read-write test!
Now is: sobota, 7 stycznia 2023 01:00:51.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus failed, will try again - 3/100!
Getting bus failed, will try again - 4/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to do erase, start 69632, sec count 2!
Erasing sector 69632... ok! Erasing sector 73728... ok!
All selected sectors erased!
Going to start reading at offset 0x11000...
Reading 0x11000... failed with serial.BytesToRead 4092 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF40610090000100100FF data.
Failed! Read failed?
As I set baud to 256000 I got this result(for 128000 as above):
Starting read!
Now is: sobota, 7 stycznia 2023 01:15:22.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus failed, will try again - 3/100!
Getting bus success!
Going to set baud rate setting (256000)!
failed with serial.BytesToRead 3 (expected 12)
The beginning of buffer in UART contains 2040FF data.
Failed to set baud rate!
There was no result to save.
I have added a larger buffer, it was not needed for my machine, but maybe...
That 4096 seems suspicious, because it fails somewhere around that point, but again.... for some reasons it always work for me. Still, it's worthchecking.
Can you all check this release, please?
https://github.com/openshwprojects/BK7231GUIFlashTool/releases/tag/v1.0.3
This was successfully done. You made it :) With https://github.com/openshwprojects/BK7231GUIFlashTool/releases/tag/v1.0.3 works for me.
baud rate 921600:
Starting read!
Now is: sobota, 7 stycznia 2023 01:21:07.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... Ok! Reading 0x1000... Ok! Reading 0x2000... Ok! Reading 0x3000... Ok! Reading 0x4000... Ok! Reading 0x5000... Ok! Reading 0x6000... Ok! Reading 0x7000... Ok! Reading 0x8000... Ok! Reading 0x9000... Ok! Reading 0xA000... Ok! Reading 0xB000... Ok! Reading 0xC000... Ok! Reading 0xD000... Ok! Reading 0xE000... Ok! Reading 0xF000... Ok! Reading 0x10000... Ok! Reading 0x11000... Ok! Reading 0x12000... Ok! Reading 0x13000... Ok! Reading 0x14000... Ok! Reading 0x15000... Ok! Reading 0x16000... Ok! Reading 0x17000... Ok! Reading 0x18000... Ok! Reading 0x19000... Ok! Reading 0x1A000... Ok! Reading 0x1B000... Ok! Reading 0x1C000... Ok! Reading 0x1D000... Ok! Reading 0x1E000... Ok! Reading 0x1F000... Ok! Reading 0x20000... Ok! Reading 0x21000... Ok! Reading 0x22000... Ok! Reading 0x23000... Ok! Reading 0x24000... Ok! Reading 0x25000... Ok! Reading 0x26000... Ok! Reading 0x27000... Ok! Reading 0x28000... Ok! Reading 0x29000... Ok! Reading 0x2A000... Ok! Reading 0x2B000... Ok! Reading 0x2C000... Ok! Reading 0x2D000... Ok! Reading 0x2E000... Ok! Reading 0x2F000... Ok! Reading 0x30000... Ok! Reading 0x31000... Ok! Reading 0x32000... Ok! Reading 0x33000... Ok! Reading 0x34000... Ok! Reading 0x35000... Ok! Reading 0x36000... Ok! Reading 0x37000... Ok! Reading 0x38000... Ok! Reading 0x39000... Ok! Reading 0x3A000... Ok! Reading 0x3B000... Ok! Reading 0x3C000... Ok! Reading 0x3D000... Ok! Reading 0x3E000... Ok! Reading 0x3F000... Ok! Reading 0x40000... Ok! Reading 0x41000... Ok! Reading 0x42000... Ok! Reading 0x43000... Ok! Reading 0x44000... Ok! Reading 0x45000... Ok! Reading 0x46000... Ok! Reading 0x47000... Ok! Reading 0x48000... Ok! Reading 0x49000... Ok! Reading 0x4A000... Ok! Reading 0x4B000... Ok! Reading 0x4C000... Ok! Reading 0x4D000... Ok! Reading 0x4E000... Ok! Reading 0x4F000... Ok! Reading 0x50000... Ok! Reading 0x51000... Ok! Reading 0x52000... Ok! Reading 0x53000... Ok! Reading 0x54000... Ok! Reading 0x55000... Ok! Reading 0x56000... Ok! Reading 0x57000... Ok! Reading 0x58000... Ok! Reading 0x59000... Ok! Reading 0x5A000... Ok! Reading 0x5B000... Ok! Reading 0x5C000... Ok! Reading 0x5D000... Ok! Reading 0x5E000... Ok! Reading 0x5F000... Ok! Reading 0x60000... Ok! Reading 0x61000... Ok! Reading 0x62000... Ok! Reading 0x63000... Ok! Reading 0x64000... Ok! Reading 0x65000... Ok! Reading 0x66000... Ok! Reading 0x67000... Ok! Reading 0x68000... Ok! Reading 0x69000... Ok! Reading 0x6A000... Ok! Reading 0x6B000... Ok! Reading 0x6C000... Ok! Reading 0x6D000... Ok! Reading 0x6E000... Ok! Reading 0x6F000... Ok! Reading 0x70000... Ok! Reading 0x71000... Ok! Reading 0x72000... Ok! Reading 0x73000... Ok! Reading 0x74000... Ok! Reading 0x75000... Ok! Reading 0x76000... Ok! Reading 0x77000... Ok! Reading 0x78000... Ok! Reading 0x79000... Ok! Reading 0x7A000... Ok! Reading 0x7B000... Ok! Reading 0x7C000... Ok! Reading 0x7D000... Ok! Reading 0x7E000... Ok! Reading 0x7F000... Ok! Reading 0x80000... Ok! Reading 0x81000... Ok! Reading 0x82000... Ok! Reading 0x83000... Ok! Reading 0x84000... Ok! Reading 0x85000... Ok! Reading 0x86000... Ok! Reading 0x87000... Ok! Reading 0x88000... Ok! Reading 0x89000... Ok! Reading 0x8A000... Ok! Reading 0x8B000... Ok! Reading 0x8C000... Ok! Reading 0x8D000... Ok! Reading 0x8E000... Ok! Reading 0x8F000... Ok! Reading 0x90000... Ok! Reading 0x91000... Ok! Reading 0x92000... Ok! Reading 0x93000... Ok! Reading 0x94000... Ok! Reading 0x95000... Ok! Reading 0x96000... Ok! Reading 0x97000... Ok! Reading 0x98000... Ok! Reading 0x99000... Ok! Reading 0x9A000... Ok! Reading 0x9B000... Ok! Reading 0x9C000... Ok! Reading 0x9D000... Ok! Reading 0x9E000... Ok! Reading 0x9F000... Ok! Reading 0xA0000... Ok! Reading 0xA1000... Ok! Reading 0xA2000... Ok! Reading 0xA3000... Ok! Reading 0xA4000... Ok! Reading 0xA5000... Ok! Reading 0xA6000... Ok! Reading 0xA7000... Ok! Reading 0xA8000... Ok! Reading 0xA9000... Ok! Reading 0xAA000... Ok! Reading 0xAB000... Ok! Reading 0xAC000... Ok! Reading 0xAD000... Ok! Reading 0xAE000... Ok! Reading 0xAF000... Ok! Reading 0xB0000... Ok! Reading 0xB1000... Ok! Reading 0xB2000... Ok! Reading 0xB3000... Ok! Reading 0xB4000... Ok! Reading 0xB5000... Ok! Reading 0xB6000... Ok! Reading 0xB7000... Ok! Reading 0xB8000... Ok! Reading 0xB9000... Ok! Reading 0xBA000... Ok! Reading 0xBB000... Ok! Reading 0xBC000... Ok! Reading 0xBD000... Ok! Reading 0xBE000... Ok! Reading 0xBF000... Ok! Reading 0xC0000... Ok! Reading 0xC1000... Ok! Reading 0xC2000... Ok! Reading 0xC3000... Ok! Reading 0xC4000... Ok! Reading 0xC5000... Ok! Reading 0xC6000... Ok! Reading 0xC7000... Ok! Reading 0xC8000... Ok! Reading 0xC9000... Ok! Reading 0xCA000... Ok! Reading 0xCB000... Ok! Reading 0xCC000... Ok! Reading 0xCD000... Ok! Reading 0xCE000... Ok! Reading 0xCF000... Ok! Reading 0xD0000... Ok! Reading 0xD1000... Ok! Reading 0xD2000... Ok! Reading 0xD3000... Ok! Reading 0xD4000... Ok! Reading 0xD5000... Ok! Reading 0xD6000... Ok! Reading 0xD7000... Ok! Reading 0xD8000... Ok! Reading 0xD9000... Ok! Reading 0xDA000... Ok! Reading 0xDB000... Ok! Reading 0xDC000... Ok! Reading 0xDD000... Ok! Reading 0xDE000... Ok! Reading 0xDF000... Ok! Reading 0xE0000... Ok! Reading 0xE1000... Ok! Reading 0xE2000... Ok! Reading 0xE3000... Ok! Reading 0xE4000... Ok! Reading 0xE5000... Ok! Reading 0xE6000... Ok! Reading 0xE7000... Ok! Reading 0xE8000... Ok! Reading 0xE9000... Ok! Reading 0xEA000... Ok! Reading 0xEB000... Ok! Reading 0xEC000... Ok! Reading 0xED000... Ok! Reading 0xEE000... Ok! Reading 0xEF000... Ok! Reading 0xF0000... Ok! Reading 0xF1000... Ok! Reading 0xF2000... Ok! Reading 0xF3000... Ok! Reading 0xF4000... Ok! Reading 0xF5000... Ok! Reading 0xF6000... Ok! Reading 0xF7000... Ok! Reading 0xF8000... Ok! Reading 0xF9000... Ok! Reading 0xFA000... Ok! Reading 0xFB000... Ok! Reading 0xFC000... Ok! Reading 0xFD000... Ok! Reading 0xFE000... Ok! Reading 0xFF000... Ok! Reading 0x100000... Ok! Reading 0x101000... Ok! Reading 0x102000... Ok! Reading 0x103000... Ok! Reading 0x104000... Ok! Reading 0x105000... Ok! Reading 0x106000... Ok! Reading 0x107000... Ok! Reading 0x108000... Ok! Reading 0x109000... Ok! Reading 0x10A000... Ok! Reading 0x10B000... Ok! Reading 0x10C000... Ok! Reading 0x10D000... Ok! Reading 0x10E000... Ok! Reading 0x10F000... Ok! Reading 0x110000... Ok! Reading 0x111000... Ok! Reading 0x112000... Ok! Reading 0x113000... Ok! Reading 0x114000... Ok! Reading 0x115000... Ok! Reading 0x116000... Ok! Reading 0x117000... Ok! Reading 0x118000... Ok! Reading 0x119000... Ok! Reading 0x11A000... Ok! Reading 0x11B000... Ok! Reading 0x11C000... Ok! Reading 0x11D000... Ok! Reading 0x11E000... Ok! Reading 0x11F000... Ok! Reading 0x120000... Ok! Reading 0x121000... Ok! Reading 0x122000... Ok! Reading 0x123000... Ok! Reading 0x124000... Ok! Reading 0x125000... Ok! Reading 0x126000... Ok! Reading 0x127000... Ok! Reading 0x128000... Ok! Reading 0x129000... Ok! Reading 0x12A000... Ok! Reading 0x12B000... Ok! Reading 0x12C000... Ok! Reading 0x12D000... Ok! Reading 0x12E000... Ok! Reading 0x12F000... Ok! Reading 0x130000... Ok! Reading 0x131000... Ok! Reading 0x132000... Ok! Reading 0x133000... Ok! Reading 0x134000... Ok! Reading 0x135000... Ok! Reading 0x136000... Ok! Reading 0x137000... Ok! Reading 0x138000... Ok! Reading 0x139000... Ok! Reading 0x13A000... Ok! Reading 0x13B000... Ok! Reading 0x13C000... Ok! Reading 0x13D000... Ok! Reading 0x13E000... Ok! Reading 0x13F000... Ok! Reading 0x140000... Ok! Reading 0x141000... Ok! Reading 0x142000... Ok! Reading 0x143000... Ok! Reading 0x144000... Ok! Reading 0x145000... Ok! Reading 0x146000... Ok! Reading 0x147000... Ok! Reading 0x148000... Ok! Reading 0x149000... Ok! Reading 0x14A000... Ok! Reading 0x14B000... Ok! Reading 0x14C000... Ok! Reading 0x14D000... Ok! Reading 0x14E000... Ok! Reading 0x14F000... Ok! Reading 0x150000... Ok! Reading 0x151000... Ok! Reading 0x152000... Ok! Reading 0x153000... Ok! Reading 0x154000... Ok! Reading 0x155000... Ok! Reading 0x156000... Ok! Reading 0x157000... Ok! Reading 0x158000... Ok! Reading 0x159000... Ok! Reading 0x15A000... Ok! Reading 0x15B000... Ok! Reading 0x15C000... Ok! Reading 0x15D000... Ok! Reading 0x15E000... Ok! Reading 0x15F000... Ok! Reading 0x160000... Ok! Reading 0x161000... Ok! Reading 0x162000... Ok! Reading 0x163000... Ok! Reading 0x164000... Ok! Reading 0x165000... Ok! Reading 0x166000... Ok! Reading 0x167000... Ok! Reading 0x168000... Ok! Reading 0x169000... Ok! Reading 0x16A000... Ok! Reading 0x16B000... Ok! Reading 0x16C000... Ok! Reading 0x16D000... Ok! Reading 0x16E000... Ok! Reading 0x16F000... Ok! Reading 0x170000... Ok! Reading 0x171000... Ok! Reading 0x172000... Ok! Reading 0x173000... Ok! Reading 0x174000... Ok! Reading 0x175000... Ok! Reading 0x176000... Ok! Reading 0x177000... Ok! Reading 0x178000... Ok! Reading 0x179000... Ok! Reading 0x17A000... Ok! Reading 0x17B000... Ok! Reading 0x17C000... Ok! Reading 0x17D000... Ok! Reading 0x17E000... Ok! Reading 0x17F000... Ok! Reading 0x180000... Ok! Reading 0x181000... Ok! Reading 0x182000... Ok! Reading 0x183000... Ok! Reading 0x184000... Ok! Reading 0x185000... Ok! Reading 0x186000... Ok! Reading 0x187000... Ok! Reading 0x188000... Ok! Reading 0x189000... Ok! Reading 0x18A000... Ok! Reading 0x18B000... Ok! Reading 0x18C000... Ok! Reading 0x18D000... Ok! Reading 0x18E000... Ok! Reading 0x18F000... Ok! Reading 0x190000... Ok! Reading 0x191000... Ok! Reading 0x192000... Ok! Reading 0x193000... Ok! Reading 0x194000... Ok! Reading 0x195000... Ok! Reading 0x196000... Ok! Reading 0x197000... Ok! Reading 0x198000... Ok! Reading 0x199000... Ok! Reading 0x19A000... Ok! Reading 0x19B000... Ok! Reading 0x19C000... Ok! Reading 0x19D000... Ok! Reading 0x19E000... Ok! Reading 0x19F000... Ok! Reading 0x1A0000... Ok! Reading 0x1A1000... Ok! Reading 0x1A2000... Ok! Reading 0x1A3000... Ok! Reading 0x1A4000... Ok! Reading 0x1A5000... Ok! Reading 0x1A6000... Ok! Reading 0x1A7000... Ok! Reading 0x1A8000... Ok! Reading 0x1A9000... Ok! Reading 0x1AA000... Ok! Reading 0x1AB000... Ok! Reading 0x1AC000... Ok! Reading 0x1AD000... Ok! Reading 0x1AE000... Ok! Reading 0x1AF000... Ok! Reading 0x1B0000... Ok! Reading 0x1B1000... Ok! Reading 0x1B2000... Ok! Reading 0x1B3000... Ok! Reading 0x1B4000... Ok! Reading 0x1B5000... Ok! Reading 0x1B6000... Ok! Reading 0x1B7000... Ok! Reading 0x1B8000... Ok! Reading 0x1B9000... Ok! Reading 0x1BA000... Ok! Reading 0x1BB000... Ok! Reading 0x1BC000... Ok! Reading 0x1BD000... Ok! Reading 0x1BE000... Ok! Reading 0x1BF000... Ok! Reading 0x1C0000... Ok! Reading 0x1C1000... Ok! Reading 0x1C2000... Ok! Reading 0x1C3000... Ok! Reading 0x1C4000... Ok! Reading 0x1C5000... Ok! Reading 0x1C6000... Ok! Reading 0x1C7000... Ok! Reading 0x1C8000... Ok! Reading 0x1C9000... Ok! Reading 0x1CA000... Ok! Reading 0x1CB000... Ok! Reading 0x1CC000... Ok! Reading 0x1CD000... Ok! Reading 0x1CE000... Ok! Reading 0x1CF000... Ok! Reading 0x1D0000... Ok! Reading 0x1D1000... Ok! Reading 0x1D2000... Ok! Reading 0x1D3000... Ok! Reading 0x1D4000... Ok! Reading 0x1D5000... Ok! Reading 0x1D6000... Ok! Reading 0x1D7000... Ok! Reading 0x1D8000... Ok! Reading 0x1D9000... Ok! Reading 0x1DA000... Ok! Reading 0x1DB000... Ok! Reading 0x1DC000... Ok! Reading 0x1DD000... Ok! Reading 0x1DE000... Ok! Reading 0x1DF000... Ok! Reading 0x1E0000... Ok! Reading 0x1E1000... Ok! Reading 0x1E2000... Ok! Reading 0x1E3000... Ok! Reading 0x1E4000... Ok! Reading 0x1E5000... Ok! Reading 0x1E6000... Ok! Reading 0x1E7000... Ok! Reading 0x1E8000... Ok! Reading 0x1E9000... Ok! Reading 0x1EA000... Ok! Reading 0x1EB000... Ok! Reading 0x1EC000... Ok! Reading 0x1ED000... Ok! Reading 0x1EE000... Ok! Reading 0x1EF000... Ok! Reading 0x1F0000... Ok! Reading 0x1F1000... Ok! Reading 0x1F2000... Ok! Reading 0x1F3000... Ok! Reading 0x1F4000... Ok! Reading 0x1F5000... Ok! Reading 0x1F6000... Ok! Reading 0x1F7000... Ok! Reading 0x1F8000... Ok! Reading 0x1F9000... Ok! Reading 0x1FA000... Ok! Reading 0x1FB000... Ok! Reading 0x1FC000... Ok! Reading 0x1FD000... Ok! Reading 0x1FE000... Ok! Reading 0x1FF000... Ok!
Basic read operation finished, but now it's time to verify...
Starting CRC check for 512 sectors, starting at offset 00
CRC matches 0xB05FBF44!
All read!
Loaded total 0x200000 bytes
Wrote 2097152 to readResult_BK7231N_2023-07-1--01-21-50.bin
baud rate 1500000!
Starting read!
Now is: sobota, 7 stycznia 2023 01:23:25.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus failed, will try again - 3/100!
Getting bus success!
Going to set baud rate setting (1500000)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... Ok! Reading 0x1000... Ok! Reading 0x2000... Ok! Reading 0x3000... Ok! Reading 0x4000... Ok! Reading 0x5000... Ok! Reading 0x6000... Ok! Reading 0x7000... Ok! Reading 0x8000... Ok! Reading 0x9000... Ok! Reading 0xA000... Ok! Reading 0xB000... Ok! Reading 0xC000... Ok! Reading 0xD000... Ok! Reading 0xE000... Ok! Reading 0xF000... Ok! Reading 0x10000... Ok! Reading 0x11000... Ok! Reading 0x12000... Ok! Reading 0x13000... Ok! Reading 0x14000... Ok! Reading 0x15000... Ok! Reading 0x16000... Ok! Reading 0x17000... Ok! Reading 0x18000... Ok! Reading 0x19000... Ok! Reading 0x1A000... Ok! Reading 0x1B000... Ok! Reading 0x1C000... Ok! Reading 0x1D000... Ok! Reading 0x1E000... Ok! Reading 0x1F000... Ok! Reading 0x20000... Ok! Reading 0x21000... Ok! Reading 0x22000... Ok! Reading 0x23000... Ok! Reading 0x24000... Ok! Reading 0x25000... Ok! Reading 0x26000... Ok! Reading 0x27000... Ok! Reading 0x28000... Ok! Reading 0x29000... Ok! Reading 0x2A000... Ok! Reading 0x2B000... Ok! Reading 0x2C000... Ok! Reading 0x2D000... Ok! Reading 0x2E000... Ok! Reading 0x2F000... Ok! Reading 0x30000... Ok! Reading 0x31000... Ok! Reading 0x32000... Ok! Reading 0x33000... Ok! Reading 0x34000... Ok! Reading 0x35000... Ok! Reading 0x36000... Ok! Reading 0x37000... Ok! Reading 0x38000... Ok! Reading 0x39000... Ok! Reading 0x3A000... Ok! Reading 0x3B000... Ok! Reading 0x3C000... Ok! Reading 0x3D000... Ok! Reading 0x3E000... Ok! Reading 0x3F000... Ok! Reading 0x40000... Ok! Reading 0x41000... Ok! Reading 0x42000... Ok! Reading 0x43000... Ok! Reading 0x44000... Ok! Reading 0x45000... Ok! Reading 0x46000... Ok! Reading 0x47000... Ok! Reading 0x48000... Ok! Reading 0x49000... Ok! Reading 0x4A000... Ok! Reading 0x4B000... Ok! Reading 0x4C000... Ok! Reading 0x4D000... Ok! Reading 0x4E000... Ok! Reading 0x4F000... Ok! Reading 0x50000... Ok! Reading 0x51000... Ok! Reading 0x52000... Ok! Reading 0x53000... Ok! Reading 0x54000... Ok! Reading 0x55000... Ok! Reading 0x56000... Ok! Reading 0x57000... Ok! Reading 0x58000... Ok! Reading 0x59000... Ok! Reading 0x5A000... Ok! Reading 0x5B000... Ok! Reading 0x5C000... Ok! Reading 0x5D000... Ok! Reading 0x5E000... Ok! Reading 0x5F000... Ok! Reading 0x60000... Ok! Reading 0x61000... Ok! Reading 0x62000... Ok! Reading 0x63000... Ok! Reading 0x64000... Ok! Reading 0x65000... Ok! Reading 0x66000... Ok! Reading 0x67000... Ok! Reading 0x68000... Ok! Reading 0x69000... Ok! Reading 0x6A000... Ok! Reading 0x6B000... Ok! Reading 0x6C000... Ok! Reading 0x6D000... Ok! Reading 0x6E000... Ok! Reading 0x6F000... Ok! Reading 0x70000... Ok! Reading 0x71000... Ok! Reading 0x72000... Ok! Reading 0x73000... Ok! Reading 0x74000... Ok! Reading 0x75000... Ok! Reading 0x76000... Ok! Reading 0x77000... Ok! Reading 0x78000... Ok! Reading 0x79000... Ok! Reading 0x7A000... Ok! Reading 0x7B000... Ok! Reading 0x7C000... Ok! Reading 0x7D000... Ok! Reading 0x7E000... Ok! Reading 0x7F000... Ok! Reading 0x80000... Ok! Reading 0x81000... Ok! Reading 0x82000... Ok! Reading 0x83000... Ok! Reading 0x84000... Ok! Reading 0x85000... Ok! Reading 0x86000... Ok! Reading 0x87000... Ok! Reading 0x88000... Ok! Reading 0x89000... Ok! Reading 0x8A000... Ok! Reading 0x8B000... Ok! Reading 0x8C000... Ok! Reading 0x8D000... Ok! Reading 0x8E000... Ok! Reading 0x8F000... Ok! Reading 0x90000... Ok! Reading 0x91000... Ok! Reading 0x92000... Ok! Reading 0x93000... Ok! Reading 0x94000... Ok! Reading 0x95000... Ok! Reading 0x96000... Ok! Reading 0x97000... Ok! Reading 0x98000... Ok! Reading 0x99000... Ok! Reading 0x9A000... Ok! Reading 0x9B000... Ok! Reading 0x9C000... Ok! Reading 0x9D000... Ok! Reading 0x9E000... Ok! Reading 0x9F000... Ok! Reading 0xA0000... Ok! Reading 0xA1000... Ok! Reading 0xA2000... Ok! Reading 0xA3000... Ok! Reading 0xA4000... Ok! Reading 0xA5000... Ok! Reading 0xA6000... Ok! Reading 0xA7000... Ok! Reading 0xA8000... Ok! Reading 0xA9000... Ok! Reading 0xAA000... Ok! Reading 0xAB000... Ok! Reading 0xAC000... Ok! Reading 0xAD000... Ok! Reading 0xAE000... Ok! Reading 0xAF000... Ok! Reading 0xB0000... Ok! Reading 0xB1000... Ok! Reading 0xB2000... Ok! Reading 0xB3000... Ok! Reading 0xB4000... Ok! Reading 0xB5000... Ok! Reading 0xB6000... Ok! Reading 0xB7000... Ok! Reading 0xB8000... Ok! Reading 0xB9000... Ok! Reading 0xBA000... Ok! Reading 0xBB000... Ok! Reading 0xBC000... Ok! Reading 0xBD000... Ok! Reading 0xBE000... Ok! Reading 0xBF000... Ok! Reading 0xC0000... Ok! Reading 0xC1000... Ok! Reading 0xC2000... Ok! Reading 0xC3000... Ok! Reading 0xC4000... Ok! Reading 0xC5000... Ok! Reading 0xC6000... Ok! Reading 0xC7000... Ok! Reading 0xC8000... Ok! Reading 0xC9000... Ok! Reading 0xCA000... Ok! Reading 0xCB000... Ok! Reading 0xCC000... Ok! Reading 0xCD000... Ok! Reading 0xCE000... Ok! Reading 0xCF000... Ok! Reading 0xD0000... Ok! Reading 0xD1000... Ok! Reading 0xD2000... Ok! Reading 0xD3000... Ok! Reading 0xD4000... Ok! Reading 0xD5000... Ok! Reading 0xD6000... Ok! Reading 0xD7000... Ok! Reading 0xD8000... Ok! Reading 0xD9000... Ok! Reading 0xDA000... Ok! Reading 0xDB000... Ok! Reading 0xDC000... Ok! Reading 0xDD000... Ok! Reading 0xDE000... Ok! Reading 0xDF000... Ok! Reading 0xE0000... Ok! Reading 0xE1000... Ok! Reading 0xE2000... Ok! Reading 0xE3000... Ok! Reading 0xE4000... Ok! Reading 0xE5000... Ok! Reading 0xE6000... Ok! Reading 0xE7000... Ok! Reading 0xE8000... Ok! Reading 0xE9000... Ok! Reading 0xEA000... Ok! Reading 0xEB000... Ok! Reading 0xEC000... Ok! Reading 0xED000... Ok! Reading 0xEE000... Ok! Reading 0xEF000... Ok! Reading 0xF0000... Ok! Reading 0xF1000... Ok! Reading 0xF2000... Ok! Reading 0xF3000... Ok! Reading 0xF4000... Ok! Reading 0xF5000... Ok! Reading 0xF6000... Ok! Reading 0xF7000... Ok! Reading 0xF8000... Ok! Reading 0xF9000... Ok! Reading 0xFA000... Ok! Reading 0xFB000... Ok! Reading 0xFC000... Ok! Reading 0xFD000... Ok! Reading 0xFE000... Ok! Reading 0xFF000... Ok! Reading 0x100000... Ok! Reading 0x101000... Ok! Reading 0x102000... Ok! Reading 0x103000... Ok! Reading 0x104000... Ok! Reading 0x105000... Ok! Reading 0x106000... Ok! Reading 0x107000... Ok! Reading 0x108000... Ok! Reading 0x109000... Ok! Reading 0x10A000... Ok! Reading 0x10B000... Ok! Reading 0x10C000... Ok! Reading 0x10D000... Ok! Reading 0x10E000... Ok! Reading 0x10F000... Ok! Reading 0x110000... Ok! Reading 0x111000... Ok! Reading 0x112000... Ok! Reading 0x113000... Ok! Reading 0x114000... Ok! Reading 0x115000... Ok! Reading 0x116000... Ok! Reading 0x117000... Ok! Reading 0x118000... Ok! Reading 0x119000... Ok! Reading 0x11A000... Ok! Reading 0x11B000... Ok! Reading 0x11C000... Ok! Reading 0x11D000... Ok! Reading 0x11E000... Ok! Reading 0x11F000... Ok! Reading 0x120000... Ok! Reading 0x121000... Ok! Reading 0x122000... Ok! Reading 0x123000... Ok! Reading 0x124000... Ok! Reading 0x125000... Ok! Reading 0x126000... Ok! Reading 0x127000... Ok! Reading 0x128000... Ok! Reading 0x129000... Ok! Reading 0x12A000... Ok! Reading 0x12B000... Ok! Reading 0x12C000... Ok! Reading 0x12D000... Ok! Reading 0x12E000... Ok! Reading 0x12F000... Ok! Reading 0x130000... Ok! Reading 0x131000... Ok! Reading 0x132000... Ok! Reading 0x133000... Ok! Reading 0x134000... Ok! Reading 0x135000... Ok! Reading 0x136000... Ok! Reading 0x137000... Ok! Reading 0x138000... Ok! Reading 0x139000... Ok! Reading 0x13A000... Ok! Reading 0x13B000... Ok! Reading 0x13C000... Ok! Reading 0x13D000... Ok! Reading 0x13E000... Ok! Reading 0x13F000... Ok! Reading 0x140000... Ok! Reading 0x141000... Ok! Reading 0x142000... Ok! Reading 0x143000... Ok! Reading 0x144000... Ok! Reading 0x145000... Ok! Reading 0x146000... Ok! Reading 0x147000... Ok! Reading 0x148000... Ok! Reading 0x149000... Ok! Reading 0x14A000... Ok! Reading 0x14B000... Ok! Reading 0x14C000... Ok! Reading 0x14D000... Ok! Reading 0x14E000... Ok! Reading 0x14F000... Ok! Reading 0x150000... Ok! Reading 0x151000... Ok! Reading 0x152000... Ok! Reading 0x153000... Ok! Reading 0x154000... Ok! Reading 0x155000... Ok! Reading 0x156000... Ok! Reading 0x157000... Ok! Reading 0x158000... Ok! Reading 0x159000... Ok! Reading 0x15A000... Ok! Reading 0x15B000... Ok! Reading 0x15C000... Ok! Reading 0x15D000... Ok! Reading 0x15E000... Ok! Reading 0x15F000... Ok! Reading 0x160000... Ok! Reading 0x161000... Ok! Reading 0x162000... Ok! Reading 0x163000... Ok! Reading 0x164000... Ok! Reading 0x165000... Ok! Reading 0x166000... Ok! Reading 0x167000... Ok! Reading 0x168000... Ok! Reading 0x169000... Ok! Reading 0x16A000... Ok! Reading 0x16B000... Ok! Reading 0x16C000... Ok! Reading 0x16D000... Ok! Reading 0x16E000... Ok! Reading 0x16F000... Ok! Reading 0x170000... Ok! Reading 0x171000... Ok! Reading 0x172000... Ok! Reading 0x173000... Ok! Reading 0x174000... Ok! Reading 0x175000... Ok! Reading 0x176000... Ok! Reading 0x177000... Ok! Reading 0x178000... Ok! Reading 0x179000... Ok! Reading 0x17A000... Ok! Reading 0x17B000... Ok! Reading 0x17C000... Ok! Reading 0x17D000... Ok! Reading 0x17E000... Ok! Reading 0x17F000... Ok! Reading 0x180000... Ok! Reading 0x181000... Ok! Reading 0x182000... Ok! Reading 0x183000... Ok! Reading 0x184000... Ok! Reading 0x185000... Ok! Reading 0x186000... Ok! Reading 0x187000... Ok! Reading 0x188000... Ok! Reading 0x189000... Ok! Reading 0x18A000... Ok! Reading 0x18B000... Ok! Reading 0x18C000... Ok! Reading 0x18D000... Ok! Reading 0x18E000... Ok! Reading 0x18F000... Ok! Reading 0x190000... Ok! Reading 0x191000... Ok! Reading 0x192000... Ok! Reading 0x193000... Ok! Reading 0x194000... Ok! Reading 0x195000... Ok! Reading 0x196000... Ok! Reading 0x197000... Ok! Reading 0x198000... Ok! Reading 0x199000... Ok! Reading 0x19A000... Ok! Reading 0x19B000... Ok! Reading 0x19C000... Ok! Reading 0x19D000... Ok! Reading 0x19E000... Ok! Reading 0x19F000... Ok! Reading 0x1A0000... Ok! Reading 0x1A1000... Ok! Reading 0x1A2000... Ok! Reading 0x1A3000... Ok! Reading 0x1A4000... Ok! Reading 0x1A5000... Ok! Reading 0x1A6000... Ok! Reading 0x1A7000... Ok! Reading 0x1A8000... Ok! Reading 0x1A9000... Ok! Reading 0x1AA000... Ok! Reading 0x1AB000... Ok! Reading 0x1AC000... Ok! Reading 0x1AD000... Ok! Reading 0x1AE000... Ok! Reading 0x1AF000... Ok! Reading 0x1B0000... Ok! Reading 0x1B1000... Ok! Reading 0x1B2000... Ok! Reading 0x1B3000... Ok! Reading 0x1B4000... Ok! Reading 0x1B5000... Ok! Reading 0x1B6000... Ok! Reading 0x1B7000... Ok! Reading 0x1B8000... Ok! Reading 0x1B9000... Ok! Reading 0x1BA000... Ok! Reading 0x1BB000... Ok! Reading 0x1BC000... Ok! Reading 0x1BD000... Ok! Reading 0x1BE000... Ok! Reading 0x1BF000... Ok! Reading 0x1C0000... Ok! Reading 0x1C1000... Ok! Reading 0x1C2000... Ok! Reading 0x1C3000... Ok! Reading 0x1C4000... Ok! Reading 0x1C5000... Ok! Reading 0x1C6000... Ok! Reading 0x1C7000... Ok! Reading 0x1C8000... Ok! Reading 0x1C9000... Ok! Reading 0x1CA000... Ok! Reading 0x1CB000... Ok! Reading 0x1CC000... Ok! Reading 0x1CD000... Ok! Reading 0x1CE000... Ok! Reading 0x1CF000... Ok! Reading 0x1D0000... Ok! Reading 0x1D1000... Ok! Reading 0x1D2000... Ok! Reading 0x1D3000... Ok! Reading 0x1D4000... Ok! Reading 0x1D5000... Ok! Reading 0x1D6000... Ok! Reading 0x1D7000... Ok! Reading 0x1D8000... Ok! Reading 0x1D9000... Ok! Reading 0x1DA000... Ok! Reading 0x1DB000... Ok! Reading 0x1DC000... Ok! Reading 0x1DD000... Ok! Reading 0x1DE000... Ok! Reading 0x1DF000... Ok! Reading 0x1E0000... Ok! Reading 0x1E1000... Ok! Reading 0x1E2000... Ok! Reading 0x1E3000... Ok! Reading 0x1E4000... Ok! Reading 0x1E5000... Ok! Reading 0x1E6000... Ok! Reading 0x1E7000... Ok! Reading 0x1E8000... Ok! Reading 0x1E9000... Ok! Reading 0x1EA000... Ok! Reading 0x1EB000... Ok! Reading 0x1EC000... Ok! Reading 0x1ED000... Ok! Reading 0x1EE000... Ok! Reading 0x1EF000... Ok! Reading 0x1F0000... Ok! Reading 0x1F1000... Ok! Reading 0x1F2000... Ok! Reading 0x1F3000... Ok! Reading 0x1F4000... Ok! Reading 0x1F5000... Ok! Reading 0x1F6000... Ok! Reading 0x1F7000... Ok! Reading 0x1F8000... Ok! Reading 0x1F9000... Ok! Reading 0x1FA000... Ok! Reading 0x1FB000... Ok! Reading 0x1FC000... Ok! Reading 0x1FD000... Ok! Reading 0x1FE000... Ok! Reading 0x1FF000... Ok!
Basic read operation finished, but now it's time to verify...
Starting CRC check for 512 sectors, starting at offset 00
CRC matches 0xB05FBF44!
All read!
Loaded total 0x200000 bytes
Wrote 2097152 to readResult_BK7231N_2023-07-1--01-24-01.bin
And test read/write as well:
Starting read-write test!
Now is: sobota, 7 stycznia 2023 01:25:58.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus success!
Going to set baud rate setting (115200)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to do erase, start 69632, sec count 2!
Erasing sector 69632... ok! Erasing sector 73728... ok!
All selected sectors erased!
Going to start reading at offset 0x11000...
Reading 0x11000... Ok! Reading 0x12000... Ok!
Basic read operation finished, but now it's time to verify...
Starting CRC check for 2 sectors, starting at offset 11000
CRC matches 0x4BD6CBCA!
All read!
Loaded total 0x2000 bytes
After erase, flash was full of 0xff
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus success!
Going to set baud rate setting (115200)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to do erase, start 69632, sec count 2!
Erasing sector 69632... ok! Erasing sector 73728... ok!
All selected sectors erased!
Writing sector 69632... ok! Writing sector 73728... ok! Starting CRC check for 2 sectors, starting at offset 11000
CRC matches 0x4998ACF8!
Going to start reading at offset 0x11000...
Reading 0x11000... Ok! Reading 0x12000... Ok!
Basic read operation finished, but now it's time to verify...
Starting CRC check for 2 sectors, starting at offset 11000
CRC matches 0x4998ACF8!
All read!
Loaded total 0x2000 bytes
Check passed! Loaded data was the same as written!
Do backup and flash new:
Starting read backup and flash new!
Now is: sobota, 7 stycznia 2023 01:33:26.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus failed, will try again - 3/100!
Getting bus success!
Going to set baud rate setting (1500000)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 7c
final sr: 7c
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... Ok! Reading 0x1000... Ok! Reading 0x2000... Ok! Reading 0x3000... Ok! Reading 0x4000... Ok! Reading 0x5000... Ok! Reading 0x6000... Ok! Reading 0x7000... Ok! Reading 0x8000... Ok! Reading 0x9000... Ok! Reading 0xA000... Ok! Reading 0xB000... Ok! Reading 0xC000... Ok! Reading 0xD000... Ok! Reading 0xE000... Ok! Reading 0xF000... Ok! Reading 0x10000... Ok! Reading 0x11000... Ok! Reading 0x12000... Ok! Reading 0x13000... Ok! Reading 0x14000... Ok! Reading 0x15000... Ok! Reading 0x16000... Ok! Reading 0x17000... Ok! Reading 0x18000... Ok! Reading 0x19000... Ok! Reading 0x1A000... Ok! Reading 0x1B000... Ok! Reading 0x1C000... Ok! Reading 0x1D000... Ok! Reading 0x1E000... Ok! Reading 0x1F000... Ok! Reading 0x20000... Ok! Reading 0x21000... Ok! Reading 0x22000... Ok! Reading 0x23000... Ok! Reading 0x24000... Ok! Reading 0x25000... Ok! Reading 0x26000... Ok! Reading 0x27000... Ok! Reading 0x28000... Ok! Reading 0x29000... Ok! Reading 0x2A000... Ok! Reading 0x2B000... Ok! Reading 0x2C000... Ok! Reading 0x2D000... Ok! Reading 0x2E000... Ok! Reading 0x2F000... Ok! Reading 0x30000... Ok! Reading 0x31000... Ok! Reading 0x32000... Ok! Reading 0x33000... Ok! Reading 0x34000... Ok! Reading 0x35000... Ok! Reading 0x36000... Ok! Reading 0x37000... Ok! Reading 0x38000... Ok! Reading 0x39000... Ok! Reading 0x3A000... Ok! Reading 0x3B000... Ok! Reading 0x3C000... Ok! Reading 0x3D000... Ok! Reading 0x3E000... Ok! Reading 0x3F000... Ok! Reading 0x40000... Ok! Reading 0x41000... Ok! Reading 0x42000... Ok! Reading 0x43000... Ok! Reading 0x44000... Ok! Reading 0x45000... Ok! Reading 0x46000... Ok! Reading 0x47000... Ok! Reading 0x48000... Ok! Reading 0x49000... Ok! Reading 0x4A000... Ok! Reading 0x4B000... Ok! Reading 0x4C000... Ok! Reading 0x4D000... Ok! Reading 0x4E000... Ok! Reading 0x4F000... Ok! Reading 0x50000... Ok! Reading 0x51000... Ok! Reading 0x52000... Ok! Reading 0x53000... Ok! Reading 0x54000... Ok! Reading 0x55000... Ok! Reading 0x56000... Ok! Reading 0x57000... Ok! Reading 0x58000... Ok! Reading 0x59000... Ok! Reading 0x5A000... Ok! Reading 0x5B000... Ok! Reading 0x5C000... Ok! Reading 0x5D000... Ok! Reading 0x5E000... Ok! Reading 0x5F000... Ok! Reading 0x60000... Ok! Reading 0x61000... Ok! Reading 0x62000... Ok! Reading 0x63000... Ok! Reading 0x64000... Ok! Reading 0x65000... Ok! Reading 0x66000... Ok! Reading 0x67000... Ok! Reading 0x68000... Ok! Reading 0x69000... Ok! Reading 0x6A000... Ok! Reading 0x6B000... Ok! Reading 0x6C000... Ok! Reading 0x6D000... Ok! Reading 0x6E000... Ok! Reading 0x6F000... Ok! Reading 0x70000... Ok! Reading 0x71000... Ok! Reading 0x72000... Ok! Reading 0x73000... Ok! Reading 0x74000... Ok! Reading 0x75000... Ok! Reading 0x76000... Ok! Reading 0x77000... Ok! Reading 0x78000... Ok! Reading 0x79000... Ok! Reading 0x7A000... Ok! Reading 0x7B000... Ok! Reading 0x7C000... Ok! Reading 0x7D000... Ok! Reading 0x7E000... Ok! Reading 0x7F000... Ok! Reading 0x80000... Ok! Reading 0x81000... Ok! Reading 0x82000... Ok! Reading 0x83000... Ok! Reading 0x84000... Ok! Reading 0x85000... Ok! Reading 0x86000... Ok! Reading 0x87000... Ok! Reading 0x88000... Ok! Reading 0x89000... Ok! Reading 0x8A000... Ok! Reading 0x8B000... Ok! Reading 0x8C000... Ok! Reading 0x8D000... Ok! Reading 0x8E000... Ok! Reading 0x8F000... Ok! Reading 0x90000... Ok! Reading 0x91000... Ok! Reading 0x92000... Ok! Reading 0x93000... Ok! Reading 0x94000... Ok! Reading 0x95000... Ok! Reading 0x96000... Ok! Reading 0x97000... Ok! Reading 0x98000... Ok! Reading 0x99000... Ok! Reading 0x9A000... Ok! Reading 0x9B000... Ok! Reading 0x9C000... Ok! Reading 0x9D000... Ok! Reading 0x9E000... Ok! Reading 0x9F000... Ok! Reading 0xA0000... Ok! Reading 0xA1000... Ok! Reading 0xA2000... Ok! Reading 0xA3000... Ok! Reading 0xA4000... Ok! Reading 0xA5000... Ok! Reading 0xA6000... Ok! Reading 0xA7000... Ok! Reading 0xA8000... Ok! Reading 0xA9000... Ok! Reading 0xAA000... Ok! Reading 0xAB000... Ok! Reading 0xAC000... Ok! Reading 0xAD000... Ok! Reading 0xAE000... Ok! Reading 0xAF000... Ok! Reading 0xB0000... Ok! Reading 0xB1000... Ok! Reading 0xB2000... Ok! Reading 0xB3000... Ok! Reading 0xB4000... Ok! Reading 0xB5000... Ok! Reading 0xB6000... Ok! Reading 0xB7000... Ok! Reading 0xB8000... Ok! Reading 0xB9000... Ok! Reading 0xBA000... Ok! Reading 0xBB000... Ok! Reading 0xBC000... Ok! Reading 0xBD000... Ok! Reading 0xBE000... Ok! Reading 0xBF000... Ok! Reading 0xC0000... Ok! Reading 0xC1000... Ok! Reading 0xC2000... Ok! Reading 0xC3000... Ok! Reading 0xC4000... Ok! Reading 0xC5000... Ok! Reading 0xC6000... Ok! Reading 0xC7000... Ok! Reading 0xC8000... Ok! Reading 0xC9000... Ok! Reading 0xCA000... Ok! Reading 0xCB000... Ok! Reading 0xCC000... Ok! Reading 0xCD000... Ok! Reading 0xCE000... Ok! Reading 0xCF000... Ok! Reading 0xD0000... Ok! Reading 0xD1000... Ok! Reading 0xD2000... Ok! Reading 0xD3000... Ok! Reading 0xD4000... Ok! Reading 0xD5000... Ok! Reading 0xD6000... Ok! Reading 0xD7000... Ok! Reading 0xD8000... Ok! Reading 0xD9000... Ok! Reading 0xDA000... Ok! Reading 0xDB000... Ok! Reading 0xDC000... Ok! Reading 0xDD000... Ok! Reading 0xDE000... Ok! Reading 0xDF000... Ok! Reading 0xE0000... Ok! Reading 0xE1000... Ok! Reading 0xE2000... Ok! Reading 0xE3000... Ok! Reading 0xE4000... Ok! Reading 0xE5000... Ok! Reading 0xE6000... Ok! Reading 0xE7000... Ok! Reading 0xE8000... Ok! Reading 0xE9000... Ok! Reading 0xEA000... Ok! Reading 0xEB000... Ok! Reading 0xEC000... Ok! Reading 0xED000... Ok! Reading 0xEE000... Ok! Reading 0xEF000... Ok! Reading 0xF0000... Ok! Reading 0xF1000... Ok! Reading 0xF2000... Ok! Reading 0xF3000... Ok! Reading 0xF4000... Ok! Reading 0xF5000... Ok! Reading 0xF6000... Ok! Reading 0xF7000... Ok! Reading 0xF8000... Ok! Reading 0xF9000... Ok! Reading 0xFA000... Ok! Reading 0xFB000... Ok! Reading 0xFC000... Ok! Reading 0xFD000... Ok! Reading 0xFE000... Ok! Reading 0xFF000... Ok! Reading 0x100000... Ok! Reading 0x101000... Ok! Reading 0x102000... Ok! Reading 0x103000... Ok! Reading 0x104000... Ok! Reading 0x105000... Ok! Reading 0x106000... Ok! Reading 0x107000... Ok! Reading 0x108000... Ok! Reading 0x109000... Ok! Reading 0x10A000... Ok! Reading 0x10B000... Ok! Reading 0x10C000... Ok! Reading 0x10D000... Ok! Reading 0x10E000... Ok! Reading 0x10F000... Ok! Reading 0x110000... Ok! Reading 0x111000... Ok! Reading 0x112000... Ok! Reading 0x113000... Ok! Reading 0x114000... Ok! Reading 0x115000... Ok! Reading 0x116000... Ok! Reading 0x117000... Ok! Reading 0x118000... Ok! Reading 0x119000... Ok! Reading 0x11A000... Ok! Reading 0x11B000... Ok! Reading 0x11C000... Ok! Reading 0x11D000... Ok! Reading 0x11E000... Ok! Reading 0x11F000... Ok! Reading 0x120000... Ok! Reading 0x121000... Ok! Reading 0x122000... Ok! Reading 0x123000... Ok! Reading 0x124000... Ok! Reading 0x125000... Ok! Reading 0x126000... Ok! Reading 0x127000... Ok! Reading 0x128000... Ok! Reading 0x129000... Ok! Reading 0x12A000... Ok! Reading 0x12B000... Ok! Reading 0x12C000... Ok! Reading 0x12D000... Ok! Reading 0x12E000... Ok! Reading 0x12F000... Ok! Reading 0x130000... Ok! Reading 0x131000... Ok! Reading 0x132000... Ok! Reading 0x133000... Ok! Reading 0x134000... Ok! Reading 0x135000... Ok! Reading 0x136000... Ok! Reading 0x137000... Ok! Reading 0x138000... Ok! Reading 0x139000... Ok! Reading 0x13A000... Ok! Reading 0x13B000... Ok! Reading 0x13C000... Ok! Reading 0x13D000... Ok! Reading 0x13E000... Ok! Reading 0x13F000... Ok! Reading 0x140000... Ok! Reading 0x141000... Ok! Reading 0x142000... Ok! Reading 0x143000... Ok! Reading 0x144000... Ok! Reading 0x145000... Ok! Reading 0x146000... Ok! Reading 0x147000... Ok! Reading 0x148000... Ok! Reading 0x149000... Ok! Reading 0x14A000... Ok! Reading 0x14B000... Ok! Reading 0x14C000... Ok! Reading 0x14D000... Ok! Reading 0x14E000... Ok! Reading 0x14F000... Ok! Reading 0x150000... Ok! Reading 0x151000... Ok! Reading 0x152000... Ok! Reading 0x153000... Ok! Reading 0x154000... Ok! Reading 0x155000... Ok! Reading 0x156000... Ok! Reading 0x157000... Ok! Reading 0x158000... Ok! Reading 0x159000... Ok! Reading 0x15A000... Ok! Reading 0x15B000... Ok! Reading 0x15C000... Ok! Reading 0x15D000... Ok! Reading 0x15E000... Ok! Reading 0x15F000... Ok! Reading 0x160000... Ok! Reading 0x161000... Ok! Reading 0x162000... Ok! Reading 0x163000... Ok! Reading 0x164000... Ok! Reading 0x165000... Ok! Reading 0x166000... Ok! Reading 0x167000... Ok! Reading 0x168000... Ok! Reading 0x169000... Ok! Reading 0x16A000... Ok! Reading 0x16B000... Ok! Reading 0x16C000... Ok! Reading 0x16D000... Ok! Reading 0x16E000... Ok! Reading 0x16F000... Ok! Reading 0x170000... Ok! Reading 0x171000... Ok! Reading 0x172000... Ok! Reading 0x173000... Ok! Reading 0x174000... Ok! Reading 0x175000... Ok! Reading 0x176000... Ok! Reading 0x177000... Ok! Reading 0x178000... Ok! Reading 0x179000... Ok! Reading 0x17A000... Ok! Reading 0x17B000... Ok! Reading 0x17C000... Ok! Reading 0x17D000... Ok! Reading 0x17E000... Ok! Reading 0x17F000... Ok! Reading 0x180000... Ok! Reading 0x181000... Ok! Reading 0x182000... Ok! Reading 0x183000... Ok! Reading 0x184000... Ok! Reading 0x185000... Ok! Reading 0x186000... Ok! Reading 0x187000... Ok! Reading 0x188000... Ok! Reading 0x189000... Ok! Reading 0x18A000... Ok! Reading 0x18B000... Ok! Reading 0x18C000... Ok! Reading 0x18D000... Ok! Reading 0x18E000... Ok! Reading 0x18F000... Ok! Reading 0x190000... Ok! Reading 0x191000... Ok! Reading 0x192000... Ok! Reading 0x193000... Ok! Reading 0x194000... Ok! Reading 0x195000... Ok! Reading 0x196000... Ok! Reading 0x197000... Ok! Reading 0x198000... Ok! Reading 0x199000... Ok! Reading 0x19A000... Ok! Reading 0x19B000... Ok! Reading 0x19C000... Ok! Reading 0x19D000... Ok! Reading 0x19E000... Ok! Reading 0x19F000... Ok! Reading 0x1A0000... Ok! Reading 0x1A1000... Ok! Reading 0x1A2000... Ok! Reading 0x1A3000... Ok! Reading 0x1A4000... Ok! Reading 0x1A5000... Ok! Reading 0x1A6000... Ok! Reading 0x1A7000... Ok! Reading 0x1A8000... Ok! Reading 0x1A9000... Ok! Reading 0x1AA000... Ok! Reading 0x1AB000... Ok! Reading 0x1AC000... Ok! Reading 0x1AD000... Ok! Reading 0x1AE000... Ok! Reading 0x1AF000... Ok! Reading 0x1B0000... Ok! Reading 0x1B1000... Ok! Reading 0x1B2000... Ok! Reading 0x1B3000... Ok! Reading 0x1B4000... Ok! Reading 0x1B5000... Ok! Reading 0x1B6000... Ok! Reading 0x1B7000... Ok! Reading 0x1B8000... Ok! Reading 0x1B9000... Ok! Reading 0x1BA000... Ok! Reading 0x1BB000... Ok! Reading 0x1BC000... Ok! Reading 0x1BD000... Ok! Reading 0x1BE000... Ok! Reading 0x1BF000... Ok! Reading 0x1C0000... Ok! Reading 0x1C1000... Ok! Reading 0x1C2000... Ok! Reading 0x1C3000... Ok! Reading 0x1C4000... Ok! Reading 0x1C5000... Ok! Reading 0x1C6000... Ok! Reading 0x1C7000... Ok! Reading 0x1C8000... Ok! Reading 0x1C9000... Ok! Reading 0x1CA000... Ok! Reading 0x1CB000... Ok! Reading 0x1CC000... Ok! Reading 0x1CD000... Ok! Reading 0x1CE000... Ok! Reading 0x1CF000... Ok! Reading 0x1D0000... Ok! Reading 0x1D1000... Ok! Reading 0x1D2000... Ok! Reading 0x1D3000... Ok! Reading 0x1D4000... Ok! Reading 0x1D5000... Ok! Reading 0x1D6000... Ok! Reading 0x1D7000... Ok! Reading 0x1D8000... Ok! Reading 0x1D9000... Ok! Reading 0x1DA000... Ok! Reading 0x1DB000... Ok! Reading 0x1DC000... Ok! Reading 0x1DD000... Ok! Reading 0x1DE000... Ok! Reading 0x1DF000... Ok! Reading 0x1E0000... Ok! Reading 0x1E1000... Ok! Reading 0x1E2000... Ok! Reading 0x1E3000... Ok! Reading 0x1E4000... Ok! Reading 0x1E5000... Ok! Reading 0x1E6000... Ok! Reading 0x1E7000... Ok! Reading 0x1E8000... Ok! Reading 0x1E9000... Ok! Reading 0x1EA000... Ok! Reading 0x1EB000... Ok! Reading 0x1EC000... Ok! Reading 0x1ED000... Ok! Reading 0x1EE000... Ok! Reading 0x1EF000... Ok! Reading 0x1F0000... Ok! Reading 0x1F1000... Ok! Reading 0x1F2000... Ok! Reading 0x1F3000... Ok! Reading 0x1F4000... Ok! Reading 0x1F5000... Ok! Reading 0x1F6000... Ok! Reading 0x1F7000... Ok! Reading 0x1F8000... Ok! Reading 0x1F9000... Ok! Reading 0x1FA000... Ok! Reading 0x1FB000... Ok! Reading 0x1FC000... Ok! Reading 0x1FD000... Ok! Reading 0x1FE000... Ok! Reading 0x1FF000... Ok!
Basic read operation finished, but now it's time to verify...
Starting CRC check for 512 sectors, starting at offset 00
CRC matches 0x87011CA9!
All read!
Loaded total 0x200000 bytes
Wrote 2097152 to readResult_BK7231N_2023-07-1--01-34-01.bin
Reading file firmwares/OpenBK7231N_QIO_1.15.292.bin...
Loaded 1220464 bytes from firmwares/OpenBK7231N_QIO_1.15.292.bin...
Preparing to write data file to chip - resetting bus and baud...
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus success!
Going to set baud rate setting (1500000)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 15701C
Will now search for Flash def in out database...
Flash def found! For: 15701C
Flash information: mid: 15701C, icName: EN25QH16B, manufacturer: ESMT, szMem: 1000000, szSR: 1, cwUnp: 0, cwEnp: 7, cwMsk: 3C, sb: 2, lb: 4, cwdRd: 05-FF-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 40
final sr: 40
msk: 3c
cw: 0, sb: 2, lb: 4
bfd: 0
SetProtectState(True) success!
Going to do erase, start 0, sec count 298!
Erasing sector 0... ok! Erasing sector 4096... ok! Erasing sector 8192... ok! Erasing sector 12288... ok! Erasing sector 16384... ok! Erasing sector 20480... ok! Erasing sector 24576... ok! Erasing sector 28672... ok! Erasing sector 32768... ok! Erasing sector 36864... ok! Erasing sector 40960... ok! Erasing sector 45056... ok! Erasing sector 49152... ok! Erasing sector 53248... ok! Erasing sector 57344... ok! Erasing sector 61440... ok! Erasing sector 65536... ok! Erasing sector 69632... ok! Erasing sector 73728... ok! Erasing sector 77824... ok! Erasing sector 81920... ok! Erasing sector 86016... ok! Erasing sector 90112... ok! Erasing sector 94208... ok! Erasing sector 98304... ok! Erasing sector 102400... ok! Erasing sector 106496... ok! Erasing sector 110592... ok! Erasing sector 114688... ok! Erasing sector 118784... ok! Erasing sector 122880... ok! Erasing sector 126976... ok! Erasing sector 131072... ok! Erasing sector 135168... ok! Erasing sector 139264... ok! Erasing sector 143360... ok! Erasing sector 147456... ok! Erasing sector 151552... ok! Erasing sector 155648... ok! Erasing sector 159744... ok! Erasing sector 163840... ok! Erasing sector 167936... ok! Erasing sector 172032... ok! Erasing sector 176128... ok! Erasing sector 180224... ok! Erasing sector 184320... ok! Erasing sector 188416... ok! Erasing sector 192512... ok! Erasing sector 196608... ok! Erasing sector 200704... ok! Erasing sector 204800... ok! Erasing sector 208896... ok! Erasing sector 212992... ok! Erasing sector 217088... ok! Erasing sector 221184... ok! Erasing sector 225280... ok! Erasing sector 229376... ok! Erasing sector 233472... ok! Erasing sector 237568... ok! Erasing sector 241664... ok! Erasing sector 245760... ok! Erasing sector 249856... ok! Erasing sector 253952... ok! Erasing sector 258048... ok! Erasing sector 262144... ok! Erasing sector 266240... ok! Erasing sector 270336... ok! Erasing sector 274432... ok! Erasing sector 278528... ok! Erasing sector 282624... ok! Erasing sector 286720... ok! Erasing sector 290816... ok! Erasing sector 294912... ok! Erasing sector 299008... ok! Erasing sector 303104... ok! Erasing sector 307200... ok! Erasing sector 311296... ok! Erasing sector 315392... ok! Erasing sector 319488... ok! Erasing sector 323584... ok! Erasing sector 327680... ok! Erasing sector 331776... ok! Erasing sector 335872... ok! Erasing sector 339968... ok! Erasing sector 344064... ok! Erasing sector 348160... ok! Erasing sector 352256... ok! Erasing sector 356352... ok! Erasing sector 360448... ok! Erasing sector 364544... ok! Erasing sector 368640... ok! Erasing sector 372736... ok! Erasing sector 376832... ok! Erasing sector 380928... ok! Erasing sector 385024... ok! Erasing sector 389120... ok! Erasing sector 393216... ok! Erasing sector 397312... ok! Erasing sector 401408... ok! Erasing sector 405504... ok! Erasing sector 409600... ok! Erasing sector 413696... ok! Erasing sector 417792... ok! Erasing sector 421888... ok! Erasing sector 425984... ok! Erasing sector 430080... ok! Erasing sector 434176... ok! Erasing sector 438272... ok! Erasing sector 442368... ok! Erasing sector 446464... ok! Erasing sector 450560... ok! Erasing sector 454656... ok! Erasing sector 458752... ok! Erasing sector 462848... ok! Erasing sector 466944... ok! Erasing sector 471040... ok! Erasing sector 475136... ok! Erasing sector 479232... ok! Erasing sector 483328... ok! Erasing sector 487424... ok! Erasing sector 491520... ok! Erasing sector 495616... ok! Erasing sector 499712... ok! Erasing sector 503808... ok! Erasing sector 507904... ok! Erasing sector 512000... ok! Erasing sector 516096... ok! Erasing sector 520192... ok! Erasing sector 524288... ok! Erasing sector 528384... ok! Erasing sector 532480... ok! Erasing sector 536576... ok! Erasing sector 540672... ok! Erasing sector 544768... ok! Erasing sector 548864... ok! Erasing sector 552960... ok! Erasing sector 557056... ok! Erasing sector 561152... ok! Erasing sector 565248... ok! Erasing sector 569344... ok! Erasing sector 573440... ok! Erasing sector 577536... ok! Erasing sector 581632... ok! Erasing sector 585728... ok! Erasing sector 589824... ok! Erasing sector 593920... ok! Erasing sector 598016... ok! Erasing sector 602112... ok! Erasing sector 606208... ok! Erasing sector 610304... ok! Erasing sector 614400... ok! Erasing sector 618496... ok! Erasing sector 622592... ok! Erasing sector 626688... ok! Erasing sector 630784... ok! Erasing sector 634880... ok! Erasing sector 638976... ok! Erasing sector 643072... ok! Erasing sector 647168... ok! Erasing sector 651264... ok! Erasing sector 655360... ok! Erasing sector 659456... ok! Erasing sector 663552... ok! Erasing sector 667648... ok! Erasing sector 671744... ok! Erasing sector 675840... ok! Erasing sector 679936... ok! Erasing sector 684032... ok! Erasing sector 688128... ok! Erasing sector 692224... ok! Erasing sector 696320... ok! Erasing sector 700416... ok! Erasing sector 704512... ok! Erasing sector 708608... ok! Erasing sector 712704... ok! Erasing sector 716800... ok! Erasing sector 720896... ok! Erasing sector 724992... ok! Erasing sector 729088... ok! Erasing sector 733184... ok! Erasing sector 737280... ok! Erasing sector 741376... ok! Erasing sector 745472... ok! Erasing sector 749568... ok! Erasing sector 753664... ok! Erasing sector 757760... ok! Erasing sector 761856... ok! Erasing sector 765952... ok! Erasing sector 770048... ok! Erasing sector 774144... ok! Erasing sector 778240... ok! Erasing sector 782336... ok! Erasing sector 786432... ok! Erasing sector 790528... ok! Erasing sector 794624... ok! Erasing sector 798720... ok! Erasing sector 802816... ok! Erasing sector 806912... ok! Erasing sector 811008... ok! Erasing sector 815104... ok! Erasing sector 819200... ok! Erasing sector 823296... ok! Erasing sector 827392... ok! Erasing sector 831488... ok! Erasing sector 835584... ok! Erasing sector 839680... ok! Erasing sector 843776... ok! Erasing sector 847872... ok! Erasing sector 851968... ok! Erasing sector 856064... ok! Erasing sector 860160... ok! Erasing sector 864256... ok! Erasing sector 868352... ok! Erasing sector 872448... ok! Erasing sector 876544... ok! Erasing sector 880640... ok! Erasing sector 884736... ok! Erasing sector 888832... ok! Erasing sector 892928... ok! Erasing sector 897024... ok! Erasing sector 901120... ok! Erasing sector 905216... ok! Erasing sector 909312... ok! Erasing sector 913408... ok! Erasing sector 917504... ok! Erasing sector 921600... ok! Erasing sector 925696... ok! Erasing sector 929792... ok! Erasing sector 933888... ok! Erasing sector 937984... ok! Erasing sector 942080... ok! Erasing sector 946176... ok! Erasing sector 950272... ok! Erasing sector 954368... ok! Erasing sector 958464... ok! Erasing sector 962560... ok! Erasing sector 966656... ok! Erasing sector 970752... ok! Erasing sector 974848... ok! Erasing sector 978944... ok! Erasing sector 983040... ok! Erasing sector 987136... ok! Erasing sector 991232... ok! Erasing sector 995328... ok! Erasing sector 999424... ok! Erasing sector 1003520... ok! Erasing sector 1007616... ok! Erasing sector 1011712... ok! Erasing sector 1015808... ok! Erasing sector 1019904... ok! Erasing sector 1024000... ok! Erasing sector 1028096... ok! Erasing sector 1032192... ok! Erasing sector 1036288... ok! Erasing sector 1040384... ok! Erasing sector 1044480... ok! Erasing sector 1048576... ok! Erasing sector 1052672... ok! Erasing sector 1056768... ok! Erasing sector 1060864... ok! Erasing sector 1064960... ok! Erasing sector 1069056... ok! Erasing sector 1073152... ok! Erasing sector 1077248... ok! Erasing sector 1081344... ok! Erasing sector 1085440... ok! Erasing sector 1089536... ok! Erasing sector 1093632... ok! Erasing sector 1097728... ok! Erasing sector 1101824... ok! Erasing sector 1105920... ok! Erasing sector 1110016... ok! Erasing sector 1114112... ok! Erasing sector 1118208... ok! Erasing sector 1122304... ok! Erasing sector 1126400... ok! Erasing sector 1130496... ok! Erasing sector 1134592... ok! Erasing sector 1138688... ok! Erasing sector 1142784... ok! Erasing sector 1146880... ok! Erasing sector 1150976... ok! Erasing sector 1155072... ok! Erasing sector 1159168... ok! Erasing sector 1163264... ok! Erasing sector 1167360... ok! Erasing sector 1171456... ok! Erasing sector 1175552... ok! Erasing sector 1179648... ok! Erasing sector 1183744... ok! Erasing sector 1187840... ok! Erasing sector 1191936... ok! Erasing sector 1196032... ok! Erasing sector 1200128... ok! Erasing sector 1204224... ok! Erasing sector 1208320... ok! Erasing sector 1212416... ok! Erasing sector 1216512... ok!
All selected sectors erased!
Writing sector 0... ok! Writing sector 4096... ok! Writing sector 8192... ok! Writing sector 12288... ok! Writing sector 16384... ok! Writing sector 20480... ok! Writing sector 24576... ok! Writing sector 28672... ok! Writing sector 32768... ok! Writing sector 36864... ok! Writing sector 40960... ok! Writing sector 45056... ok! Writing sector 49152... ok! Writing sector 53248... ok! Writing sector 57344... ok! Writing sector 61440... ok! Writing sector 65536... ok! Writing sector 69632... ok! Writing sector 73728... ok! Writing sector 77824... ok! Writing sector 81920... ok! Writing sector 86016... ok! Writing sector 90112... ok! Writing sector 94208... ok! Writing sector 98304... ok! Writing sector 102400... ok! Writing sector 106496... ok! Writing sector 110592... ok! Writing sector 114688... ok! Writing sector 118784... ok! Writing sector 122880... ok! Writing sector 126976... ok! Writing sector 131072... ok! Writing sector 135168... ok! Writing sector 139264... ok! Writing sector 143360... ok! Writing sector 147456... ok! Writing sector 151552... ok! Writing sector 155648... ok! Writing sector 159744... ok! Writing sector 163840... ok! Writing sector 167936... ok! Writing sector 172032... ok! Writing sector 176128... ok! Writing sector 180224... ok! Writing sector 184320... ok! Writing sector 188416... ok! Writing sector 192512... ok! Writing sector 196608... ok! Writing sector 200704... ok! Writing sector 204800... ok! Writing sector 208896... ok! Writing sector 212992... ok! Writing sector 217088... ok! Writing sector 221184... ok! Writing sector 225280... ok! Writing sector 229376... ok! Writing sector 233472... ok! Writing sector 237568... ok! Writing sector 241664... ok! Writing sector 245760... ok! Writing sector 249856... ok! Writing sector 253952... ok! Writing sector 258048... ok! Writing sector 262144... ok! Writing sector 266240... ok! Writing sector 270336... ok! Writing sector 274432... ok! Writing sector 278528... ok! Writing sector 282624... ok! Writing sector 286720... ok! Writing sector 290816... ok! Writing sector 294912... ok! Writing sector 299008... ok! Writing sector 303104... ok! Writing sector 307200... ok! Writing sector 311296... ok! Writing sector 315392... ok! Writing sector 319488... ok! Writing sector 323584... ok! Writing sector 327680... ok! Writing sector 331776... ok! Writing sector 335872... ok! Writing sector 339968... ok! Writing sector 344064... ok! Writing sector 348160... ok! Writing sector 352256... ok! Writing sector 356352... ok! Writing sector 360448... ok! Writing sector 364544... ok! Writing sector 368640... ok! Writing sector 372736... ok! Writing sector 376832... ok! Writing sector 380928... ok! Writing sector 385024... ok! Writing sector 389120... ok! Writing sector 393216... ok! Writing sector 397312... ok! Writing sector 401408... ok! Writing sector 405504... ok! Writing sector 409600... ok! Writing sector 413696... ok! Writing sector 417792... ok! Writing sector 421888... ok! Writing sector 425984... ok! Writing sector 430080... ok! Writing sector 434176... ok! Writing sector 438272... ok! Writing sector 442368... ok! Writing sector 446464... ok! Writing sector 450560... ok! Writing sector 454656... ok! Writing sector 458752... ok! Writing sector 462848... ok! Writing sector 466944... ok! Writing sector 471040... ok! Writing sector 475136... ok! Writing sector 479232... ok! Writing sector 483328... ok! Writing sector 487424... ok! Writing sector 491520... ok! Writing sector 495616... ok! Writing sector 499712... ok! Writing sector 503808... ok! Writing sector 507904... ok! Writing sector 512000... ok! Writing sector 516096... ok! Writing sector 520192... ok! Writing sector 524288... ok! Writing sector 528384... ok! Writing sector 532480... ok! Writing sector 536576... ok! Writing sector 540672... ok! Writing sector 544768... ok! Writing sector 548864... ok! Writing sector 552960... ok! Writing sector 557056... ok! Writing sector 561152... ok! Writing sector 565248... ok! Writing sector 569344... ok! Writing sector 573440... ok! Writing sector 577536... ok! Writing sector 581632... ok! Writing sector 585728... ok! Writing sector 589824... ok! Writing sector 593920... ok! Writing sector 598016... ok! Writing sector 602112... ok! Writing sector 606208... ok! Writing sector 610304... ok! Writing sector 614400... ok! Writing sector 618496... ok! Writing sector 622592... ok! Writing sector 626688... ok! Writing sector 630784... ok! Writing sector 634880... ok! Writing sector 638976... ok! Writing sector 643072... ok! Writing sector 647168... ok! Writing sector 651264... ok! Writing sector 655360... ok! Writing sector 659456... ok! Writing sector 663552... ok! Writing sector 667648... ok! Writing sector 671744... ok! Writing sector 675840... ok! Writing sector 679936... ok! Writing sector 684032... ok! Writing sector 688128... ok! Writing sector 692224... ok! Writing sector 696320... ok! Writing sector 700416... ok! Writing sector 704512... ok! Writing sector 708608... ok! Writing sector 712704... ok! Writing sector 716800... ok! Writing sector 720896... ok! Writing sector 724992... ok! Writing sector 729088... ok! Writing sector 733184... ok! Writing sector 737280... ok! Writing sector 741376... ok! Writing sector 745472... ok! Writing sector 749568... ok! Writing sector 753664... ok! Writing sector 757760... ok! Writing sector 761856... ok! Writing sector 765952... ok! Writing sector 770048... ok! Writing sector 774144... ok! Writing sector 778240... ok! Writing sector 782336... ok! Writing sector 786432... ok! Writing sector 790528... ok! Writing sector 794624... ok! Writing sector 798720... ok! Writing sector 802816... ok! Writing sector 806912... ok! Writing sector 811008... ok! Writing sector 815104... ok! Writing sector 819200... ok! Writing sector 823296... ok! Writing sector 827392... ok! Writing sector 831488... ok! Writing sector 835584... ok! Writing sector 839680... ok! Writing sector 843776... ok! Writing sector 847872... ok! Writing sector 851968... ok! Writing sector 856064... ok! Writing sector 860160... ok! Writing sector 864256... ok! Writing sector 868352... ok! Writing sector 872448... ok! Writing sector 876544... ok! Writing sector 880640... ok! Writing sector 884736... ok! Writing sector 888832... ok! Writing sector 892928... ok! Writing sector 897024... ok! Writing sector 901120... ok! Writing sector 905216... ok! Writing sector 909312... ok! Writing sector 913408... ok! Writing sector 917504... ok! Writing sector 921600... ok! Writing sector 925696... ok! Writing sector 929792... ok! Writing sector 933888... ok! Writing sector 937984... ok! Writing sector 942080... ok! Writing sector 946176... ok! Writing sector 950272... ok! Writing sector 954368... ok! Writing sector 958464... ok! Writing sector 962560... ok! Writing sector 966656... ok! Writing sector 970752... ok! Writing sector 974848... ok! Writing sector 978944... ok! Writing sector 983040... ok! Writing sector 987136... ok! Writing sector 991232... ok! Writing sector 995328... ok! Writing sector 999424... ok! Writing sector 1003520... ok! Writing sector 1007616... ok! Writing sector 1011712... ok! Writing sector 1015808... ok! Writing sector 1019904... ok! Writing sector 1024000... ok! Writing sector 1028096... ok! Writing sector 1032192... ok! Writing sector 1036288... ok! Writing sector 1040384... ok! Writing sector 1044480... ok! Writing sector 1048576... ok! Writing sector 1052672... ok! Writing sector 1056768... ok! Writing sector 1060864... ok! Writing sector 1064960... ok! Writing sector 1069056... ok! Writing sector 1073152... ok! Writing sector 1077248... ok! Writing sector 1081344... ok! Writing sector 1085440... ok! Writing sector 1089536... ok! Writing sector 1093632... ok! Writing sector 1097728... ok! Writing sector 1101824... ok! Writing sector 1105920... ok! Writing sector 1110016... ok! Writing sector 1114112... ok! Writing sector 1118208... ok! Writing sector 1122304... ok! Writing sector 1126400... ok! Writing sector 1130496... ok! Writing sector 1134592... ok! Writing sector 1138688... ok! Writing sector 1142784... ok! Writing sector 1146880... ok! Writing sector 1150976... ok! Writing sector 1155072... ok! Writing sector 1159168... ok! Writing sector 1163264... ok! Writing sector 1167360... ok! Writing sector 1171456... ok! Writing sector 1175552... ok! Writing sector 1179648... ok! Writing sector 1183744... ok! Writing sector 1187840... ok! Writing sector 1191936... ok! Writing sector 1196032... ok! Writing sector 1200128... ok! Writing sector 1204224... ok! Writing sector 1208320... ok! Writing sector 1212416... ok! Writing sector 1216512... ok! Starting CRC check for 298 sectors, starting at offset 00
CRC matches 0x4FE3B905!
Writing file data to chip successs.
And It has stability problems from time to time:
Starting read backup and flash new!
Now is: sobota, 7 stycznia 2023 01:33:16.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus success!
Going to set baud rate setting (1500000)!
failed with serial.BytesToRead 1 (expected 12)
The beginning of buffer in UART contains C2 data.
Failed to set baud rate!
Starting read backup and flash new!
Now is: sobota, 7 stycznia 2023 01:31:56.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus success!
Going to set baud rate setting (1500000)!
failed with serial.BytesToRead 0 (expected 12)
The beginning of buffer in UART contains data.
Failed to set baud rate!
Starting read backup and flash new!
Now is: sobota, 7 stycznia 2023 01:30:14.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus success!
Going to set baud rate setting (1500000)!
failed with serial.BytesToRead 1 (expected 12)
The beginning of buffer in UART contains C6 data.
Failed to set baud rate!
Thank you @Rafik89 for testing. It's a good news. I am still super surprised that it worked for me with 4096 buffer, it's very strange. Still, I would like everyone else here to test it as well, because I am not yet sure that it's really solved.
I checked WB3S reading, everything works. I will try to restore the original firmware of the device. I will help you test Flasher mode: BK7231T Going to open port: COM6. Serial port open! Getting bus... (now, please do reboot by CEN or by power off/on) Getting bus failed, will try again - 0/100! Getting bus failed, will try again - 1/100! Getting bus failed, will try again - 2/100! Getting bus success! Going to set baud rate setting (115200)! Going to start reading at offset 0x11000... ......... Reading 0x20F000... Ok! Reading 0x210000... Ok! Basic read operation finished, but now it's time to verify... Starting CRC check for 512 sectors, starting at offset 11000 CRC matches 0x35D1A1EC! All read! Loaded total 0x200000 bytes Wrote 2097152 to readResult_BK7231T_2023-07-1--05-28-41.bin
Do not try to restore the original firmware without me adding an option for that first! You may break your bootloader.
OK got it
Hello, I have problem flashing CB2S. I'm using ftdi ft232rl and external power suplier. I tried all baudrates mentioned here and problem was allways same:
Getting bus success! Going to set baud rate setting (115200)! Will try to read device flash MID (for unprotect N): Flash MID loaded: 1560EB Will now search for Flash def in out database... Flash def found! For: 1560EB Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF Entering SetProtectState(True)... sr: 0 sr: 0 final sr: 0 msk: 407c cw: 0, sb: 2, lb: 5 bfd: 0 SetProtectState(True) success! Going to start reading at offset 0x00... Reading 0x00... failed with serial.BytesToRead 4095 (expected 4111) The beginning of buffer in UART contains 040EFF01E0FCF4061009000000000069 data. Failed! There was no result to save.
@veivari which version?
@openshwprojects 1.0.3
Hi @openshwprojects, I'm facing the same issue as @veivari but using version 1.0.4 I tried a couple of baudrates but no success. Using CH340 as USB to TTL guess it's from AZ Delivey.
Edit:
tried using windows (and BK Writer):
looks the same
Starting read backup and flash new!
Now is: Donnerstag, 26. Januar 2023 23:50:05.
Flasher mode: BK7231N
Going to open port: COM4.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 1560EB
Will now search for Flash def in out database...
Flash def found! For: 1560EB
Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 80
sr: 680
final sr: 680
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... Ok! Reading 0x1000... Ok! Reading 0x2000... Ok! Reading 0x3000... Ok! Reading 0x4000... Ok! Reading 0x5000... Ok! Reading 0x6000... Ok! Reading 0x7000... Ok! Reading 0x8000... Ok! Reading 0x9000... Ok! Reading 0xA000... Ok! Reading 0xB000... Ok! Reading 0xC000... Ok! Reading 0xD000... Ok! Reading 0xE000... Ok! Reading 0xF000... Ok! Reading 0x10000... Ok! Reading 0x11000... Ok! Reading 0x12000... Ok! Reading 0x13000... Ok! Reading 0x14000... Ok! Reading 0x15000... Ok! Reading 0x16000... Ok! Reading 0x17000... Ok! Reading 0x18000... Ok! Reading 0x19000... Ok! Reading 0x1A000... Ok! Reading 0x1B000... Ok! Reading 0x1C000... Ok! Reading 0x1D000... Ok! Reading 0x1E000... Ok! Reading 0x1F000... Ok! Reading 0x20000... Ok! Reading 0x21000... Ok! Reading 0x22000... Ok! Reading 0x23000... Ok! Reading 0x24000... Ok! Reading 0x25000... Ok! Reading 0x26000... Ok! Reading 0x27000... Ok! Reading 0x28000... Ok! Reading 0x29000... Ok! Reading 0x2A000... Ok! Reading 0x2B000... Ok! Reading 0x2C000... Ok! Reading 0x2D000... Ok! Reading 0x2E000... Ok! Reading 0x2F000... Ok! Reading 0x30000... Ok! Reading 0x31000... Ok! Reading 0x32000... Ok! Reading 0x33000... Ok! Reading 0x34000... Ok! Reading 0x35000... Ok! Reading 0x36000... Ok! Reading 0x37000... Ok! Reading 0x38000... Ok! Reading 0x39000... Ok! Reading 0x3A000... Ok! Reading 0x3B000... Ok! Reading 0x3C000... Ok! Reading 0x3D000... Ok! Reading 0x3E000... Ok! Reading 0x3F000... Ok! Reading 0x40000... Ok! Reading 0x41000... Ok! Reading 0x42000... Ok! Reading 0x43000... Ok! Reading 0x44000... Ok! Reading 0x45000... Ok! Reading 0x46000... Ok! Reading 0x47000... Ok! Reading 0x48000... Ok! Reading 0x49000... Ok! Reading 0x4A000... Ok! Reading 0x4B000... Ok! Reading 0x4C000... Ok! Reading 0x4D000... Ok! Reading 0x4E000... Ok! Reading 0x4F000... Ok! Reading 0x50000... Ok! Reading 0x51000... Ok! Reading 0x52000... Ok! Reading 0x53000... Ok! Reading 0x54000... Ok! Reading 0x55000... Ok! Reading 0x56000... Ok! Reading 0x57000... Ok! Reading 0x58000... Ok! Reading 0x59000... Ok! Reading 0x5A000... Ok! Reading 0x5B000... Ok! Reading 0x5C000... Ok! Reading 0x5D000... Ok! Reading 0x5E000... Ok! Reading 0x5F000... Ok! Reading 0x60000... Ok! Reading 0x61000... Ok! Reading 0x62000... Ok! Reading 0x63000... Ok! Reading 0x64000... Ok! Reading 0x65000... Ok! Reading 0x66000... Ok! Reading 0x67000... Ok! Reading 0x68000... Ok! Reading 0x69000... Ok! Reading 0x6A000... Ok! Reading 0x6B000... Ok! Reading 0x6C000... Ok! Reading 0x6D000... Ok! Reading 0x6E000... Ok! Reading 0x6F000... Ok! Reading 0x70000... Ok! Reading 0x71000... Ok! Reading 0x72000... Ok! Reading 0x73000... Ok! Reading 0x74000... Ok! Reading 0x75000... Ok! Reading 0x76000... Ok! Reading 0x77000... Ok! Reading 0x78000... Ok! Reading 0x79000... Ok! Reading 0x7A000... Ok! Reading 0x7B000... Ok! Reading 0x7C000... Ok! Reading 0x7D000... Ok! Reading 0x7E000... Ok! Reading 0x7F000... Ok! Reading 0x80000... Ok! Reading 0x81000... Ok! Reading 0x82000... Ok! Reading 0x83000... Ok! Reading 0x84000... Ok! Reading 0x85000... Ok! Reading 0x86000... Ok! Reading 0x87000... Ok! Reading 0x88000... Ok! Reading 0x89000... Ok! Reading 0x8A000... Ok! Reading 0x8B000... Ok! Reading 0x8C000... Ok! Reading 0x8D000... Ok! Reading 0x8E000... Ok! Reading 0x8F000... Ok! Reading 0x90000... Ok! Reading 0x91000... Ok! Reading 0x92000... Ok! Reading 0x93000... Ok! Reading 0x94000... Ok! Reading 0x95000... Ok! Reading 0x96000... Ok! Reading 0x97000... Ok! Reading 0x98000... Ok! Reading 0x99000... Ok! Reading 0x9A000... Ok! Reading 0x9B000... Ok! Reading 0x9C000... Ok! Reading 0x9D000... Ok! Reading 0x9E000... Ok! Reading 0x9F000... Ok! Reading 0xA0000... Ok! Reading 0xA1000... Ok! Reading 0xA2000... failed with serial.BytesToRead 0 (expected 4111)
The beginning of buffer in UART contains data.
Failed!
I'm using this USB to UART device: https://image.made-in-china.com/2f0j00levUBmHLfGos/FT232r-USB-Uart-Nano.jpg
Edit: What i recognized is that... Sometimes the blue LED of the the tuya device is not on nor blinking. Then i'm not able to get the bus. So i press the device button and the blue led starts blinking. Then i can do the CEN reset and the tool starts to read data.
But after a few seconds the reading failed. Interesting is, that the blue led is off. It looks like the device is turning off while reading data.
Edit 2: I don't know if it's interesting, but on the chip is labeled with "CB3S" (not CB2S)
@dawosch isn't it a battery-powered device where MCU turns off the wifi module? Can you show device photo?
@Rafik89 Yes it is. Ignore the wirering. I tested a lot. My approaches based on the connection direct of the chip.
On the other side there is the battery mount.
Sorry but your problem is not related to the flasher. Basically, this device has TuyaMCU and TuyaMCU might interfere with flashing. You can either cut the rx/tx tracks or desolder the MCU temporarily. You can read and ask more here: https://www.elektroda.com/rtvforum/topic3914412.html
Ok, thanks for the info. But one more question/idea. At the current highest baud rate i can read or write round about 80% of the firmware before it interrupts.
Would it be possible to increase the baud rate a little bit more to write the firmware complete? Or reduce the firmware size for faster writing?
Thanks
If you are asking in relation to TuyaMCU devices, then it's not practical. The correct approach is just to power the device correctly (avoid MCU interruption) and, if required, remove temporarily the MCU or cut traces.
I have the same issue with BK7231N - it's from a smart plug, so I don't think there is the mentioned above TuyaMCU on board (attaching pictures just in case I can't see it). I have tried different baudrates
I'm using 1.0.4 version of the flasher
Here are my logs:
Test read/write pattern
Starting read-write test!
Now is: Tuesday, February 7, 2023 3:51:32 PM.
Flasher mode: BK7231N
Going to open port: /dev/ttyUSB0.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 1560EB
Will now search for Flash def in out database...
Flash def found! For: 1560EB
Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 0
sr: 0
final sr: 0
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
SetProtectState(True) success!
Going to do erase, start 69632, sec count 2!
Erasing sector 69632... ok! Erasing sector 73728... ok!
All selected sectors erased!
Going to start reading at offset 0x11000...
Reading 0x11000... failed with serial.BytesToRead 4095 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF40610090000102100FF data.
Failed! Read failed?
Test write pattern
Starting write test!
Now is: Tuesday, February 7, 2023 3:53:35 PM.
Flasher mode: BK7231N
Going to open port: /dev/ttyUSB0.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 1560EB
Will now search for Flash def in out database...
Flash def found! For: 1560EB
Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 0
sr: 0
final sr: 0
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
SetProtectState(True) success!
Erasing sector 0x11000... ok! Erasing sector 0x12000... ok! Erasing sector 0x13000... ok! Erasing sector 0x14000... ok! Erasing sector 0x15000... ok!
All selected sectors erased!
failed with serial.BytesToRead 0 (expected 15)
The beginning of buffer in UART contains data.
Writing sector 69632... Writing sector 69632 failed!
Do firmware backup (read) only
Starting read!
Now is: Tuesday, February 7, 2023 3:55:22 PM.
Flasher mode: BK7231N
Going to open port: /dev/ttyUSB0.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus failed, will try again - 3/100!
Getting bus failed, will try again - 4/100!
Getting bus failed, will try again - 5/100!
Getting bus failed, will try again - 6/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 1560EB
Will now search for Flash def in out database...
Flash def found! For: 1560EB
Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 0
sr: 0
final sr: 0
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... failed with serial.BytesToRead 4095 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF4061009000000200069 data.
Failed! There was no result to save.
Do firmware write (no backup!)
Starting flash new (no backup)!
Now is: Tuesday, February 7, 2023 3:56:49 PM.
Flasher mode: BK7231N
Going to open port: /dev/ttyUSB0.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
Getting bus failed, will try again - 2/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 1560EB
Will now search for Flash def in out database...
Flash def found! For: 1560EB
Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 0
sr: 0
final sr: 0
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
SetProtectState(True) success!
Reading file firmwares/OpenBK7231N_QIO_1.15.417.bin...
Loaded 1220464 bytes from firmwares/OpenBK7231N_QIO_1.15.417.bin...
Preparing to write data file to chip - resetting bus and baud...
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 1560EB
Will now search for Flash def in out database...
Flash def found! For: 1560EB
Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 0
sr: 0
final sr: 0
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
SetProtectState(True) success!
Going to do erase, start 0, sec count 298!
Erasing sector 0... ok! Erasing sector 4096... ok! Erasing sector 8192... ok! Erasing sector 12288... ok! Erasing sector 16384... ok! Erasing sector 20480... ok! Erasing sector 24576... ok! Erasing sector 28672... ok! Erasing sector 32768... ok! Erasing sector 36864... ok! Erasing sector 40960... ok! Erasing sector 45056... ok! Erasing sector 49152... ok! Erasing sector 53248... ok! Erasing sector 57344... ok! Erasing sector 61440... ok! Erasing sector 65536... ok! Erasing sector 69632... ok! Erasing sector 73728... ok! Erasing sector 77824... ok! Erasing sector 81920... ok! Erasing sector 86016... ok! Erasing sector 90112... ok! Erasing sector 94208... ok! Erasing sector 98304... ok! Erasing sector 102400... ok! Erasing sector 106496... ok! Erasing sector 110592... ok! Erasing sector 114688... ok! Erasing sector 118784... ok! Erasing sector 122880... ok! Erasing sector 126976... ok! Erasing sector 131072... ok! Erasing sector 135168... ok! Erasing sector 139264... ok! Erasing sector 143360... ok! Erasing sector 147456... ok! Erasing sector 151552... ok! Erasing sector 155648... ok! Erasing sector 159744... ok! Erasing sector 163840... ok! Erasing sector 167936... ok! Erasing sector 172032... ok! Erasing sector 176128... ok! Erasing sector 180224... ok! Erasing sector 184320... ok! Erasing sector 188416... ok! Erasing sector 192512... ok! Erasing sector 196608... ok! Erasing sector 200704... ok! Erasing sector 204800... ok! Erasing sector 208896... ok! Erasing sector 212992... ok! Erasing sector 217088... ok! Erasing sector 221184... ok! Erasing sector 225280... ok! Erasing sector 229376... ok! Erasing sector 233472... ok! Erasing sector 237568... ok! Erasing sector 241664... ok! Erasing sector 245760... ok! Erasing sector 249856... ok! Erasing sector 253952... ok! Erasing sector 258048... ok! Erasing sector 262144... ok! Erasing sector 266240... ok! Erasing sector 270336... ok! Erasing sector 274432... ok! Erasing sector 278528... ok! Erasing sector 282624... ok! Erasing sector 286720... ok! Erasing sector 290816... ok! Erasing sector 294912... ok! Erasing sector 299008... ok! Erasing sector 303104... ok! Erasing sector 307200... ok! Erasing sector 311296... ok! Erasing sector 315392... ok! Erasing sector 319488... ok! Erasing sector 323584... ok! Erasing sector 327680... ok! Erasing sector 331776... ok! Erasing sector 335872... ok! Erasing sector 339968... ok! Erasing sector 344064... ok! Erasing sector 348160... ok! Erasing sector 352256... ok! Erasing sector 356352... ok! Erasing sector 360448... ok! Erasing sector 364544... ok! Erasing sector 368640... ok! Erasing sector 372736... ok! Erasing sector 376832... ok! Erasing sector 380928... ok! Erasing sector 385024... ok! Erasing sector 389120... ok! Erasing sector 393216... ok! Erasing sector 397312... ok! Erasing sector 401408... ok! Erasing sector 405504... ok! Erasing sector 409600... ok! Erasing sector 413696... ok! Erasing sector 417792... ok! Erasing sector 421888... ok! Erasing sector 425984... ok! Erasing sector 430080... ok! Erasing sector 434176... ok! Erasing sector 438272... ok! Erasing sector 442368... ok! Erasing sector 446464... ok! Erasing sector 450560... ok! Erasing sector 454656... ok! Erasing sector 458752... ok! Erasing sector 462848... ok! Erasing sector 466944... ok! Erasing sector 471040... ok! Erasing sector 475136... ok! Erasing sector 479232... ok! Erasing sector 483328... ok! Erasing sector 487424... ok! Erasing sector 491520... ok! Erasing sector 495616... ok! Erasing sector 499712... ok! Erasing sector 503808... ok! Erasing sector 507904... ok! Erasing sector 512000... ok! Erasing sector 516096... ok! Erasing sector 520192... ok! Erasing sector 524288... ok! Erasing sector 528384... ok! Erasing sector 532480... ok! Erasing sector 536576... ok! Erasing sector 540672... ok! Erasing sector 544768... ok! Erasing sector 548864... ok! Erasing sector 552960... ok! Erasing sector 557056... ok! Erasing sector 561152... ok! Erasing sector 565248... ok! Erasing sector 569344... ok! Erasing sector 573440... ok! Erasing sector 577536... ok! Erasing sector 581632... ok! Erasing sector 585728... ok! Erasing sector 589824... ok! Erasing sector 593920... ok! Erasing sector 598016... ok! Erasing sector 602112... ok! Erasing sector 606208... ok! Erasing sector 610304... ok! Erasing sector 614400... ok! Erasing sector 618496... ok! Erasing sector 622592... ok! Erasing sector 626688... ok! Erasing sector 630784... ok! Erasing sector 634880... ok! Erasing sector 638976... ok! Erasing sector 643072... ok! Erasing sector 647168... ok! Erasing sector 651264... ok! Erasing sector 655360... ok! Erasing sector 659456... ok! Erasing sector 663552... ok! Erasing sector 667648... ok! Erasing sector 671744... ok! Erasing sector 675840... ok! Erasing sector 679936... ok! Erasing sector 684032... ok! Erasing sector 688128... ok! Erasing sector 692224... ok! Erasing sector 696320... ok! Erasing sector 700416... ok! Erasing sector 704512... ok! Erasing sector 708608... ok! Erasing sector 712704... ok! Erasing sector 716800... ok! Erasing sector 720896... ok! Erasing sector 724992... ok! Erasing sector 729088... ok! Erasing sector 733184... ok! Erasing sector 737280... ok! Erasing sector 741376... ok! Erasing sector 745472... ok! Erasing sector 749568... ok! Erasing sector 753664... ok! Erasing sector 757760... ok! Erasing sector 761856... ok! Erasing sector 765952... ok! Erasing sector 770048... ok! Erasing sector 774144... ok! Erasing sector 778240... ok! Erasing sector 782336... ok! Erasing sector 786432... ok! Erasing sector 790528... ok! Erasing sector 794624... ok! Erasing sector 798720... ok! Erasing sector 802816... ok! Erasing sector 806912... ok! Erasing sector 811008... ok! Erasing sector 815104... ok! Erasing sector 819200... ok! Erasing sector 823296... ok! Erasing sector 827392... ok! Erasing sector 831488... ok! Erasing sector 835584... ok! Erasing sector 839680... ok! Erasing sector 843776... ok! Erasing sector 847872... ok! Erasing sector 851968... ok! Erasing sector 856064... ok! Erasing sector 860160... ok! Erasing sector 864256... ok! Erasing sector 868352... ok! Erasing sector 872448... ok! Erasing sector 876544... ok! Erasing sector 880640... ok! Erasing sector 884736... ok! Erasing sector 888832... ok! Erasing sector 892928... ok! Erasing sector 897024... ok! Erasing sector 901120... ok! Erasing sector 905216... ok! Erasing sector 909312... ok! Erasing sector 913408... ok! Erasing sector 917504... ok! Erasing sector 921600... ok! Erasing sector 925696... ok! Erasing sector 929792... ok! Erasing sector 933888... ok! Erasing sector 937984... ok! Erasing sector 942080... ok! Erasing sector 946176... ok! Erasing sector 950272... ok! Erasing sector 954368... ok! Erasing sector 958464... ok! Erasing sector 962560... ok! Erasing sector 966656... ok! Erasing sector 970752... ok! Erasing sector 974848... ok! Erasing sector 978944... ok! Erasing sector 983040... ok! Erasing sector 987136... ok! Erasing sector 991232... ok! Erasing sector 995328... ok! Erasing sector 999424... ok! Erasing sector 1003520... ok! Erasing sector 1007616... ok! Erasing sector 1011712... ok! Erasing sector 1015808... ok! Erasing sector 1019904... ok! Erasing sector 1024000... ok! Erasing sector 1028096... ok! Erasing sector 1032192... ok! Erasing sector 1036288... ok! Erasing sector 1040384... ok! Erasing sector 1044480... ok! Erasing sector 1048576... ok! Erasing sector 1052672... ok! Erasing sector 1056768... ok! Erasing sector 1060864... ok! Erasing sector 1064960... ok! Erasing sector 1069056... ok! Erasing sector 1073152... ok! Erasing sector 1077248... ok! Erasing sector 1081344... ok! Erasing sector 1085440... ok! Erasing sector 1089536... ok! Erasing sector 1093632... ok! Erasing sector 1097728... ok! Erasing sector 1101824... ok! Erasing sector 1105920... ok! Erasing sector 1110016... ok! Erasing sector 1114112... ok! Erasing sector 1118208... ok! Erasing sector 1122304... ok! Erasing sector 1126400... ok! Erasing sector 1130496... ok! Erasing sector 1134592... ok! Erasing sector 1138688... ok! Erasing sector 1142784... ok! Erasing sector 1146880... ok! Erasing sector 1150976... ok! Erasing sector 1155072... ok! Erasing sector 1159168... ok! Erasing sector 1163264... ok! Erasing sector 1167360... ok! Erasing sector 1171456... ok! Erasing sector 1175552... ok! Erasing sector 1179648... ok! Erasing sector 1183744... ok! Erasing sector 1187840... ok! Erasing sector 1191936... ok! Erasing sector 1196032... ok! Erasing sector 1200128... ok! Erasing sector 1204224... ok! Erasing sector 1208320... ok! Erasing sector 1212416... ok! Erasing sector 1216512... ok!
All selected sectors erased!
failed with serial.BytesToRead 0 (expected 15)
The beginning of buffer in UART contains 040EFF01E0FCF40600070000000000 data.
Writing sector 0x00... Writing sector 0 failed!
Writing file data to chip failed.
Hello, I also had this random write error. I increased the TimeOut (0.25f instead of 0.05f) at line 387 of the BK7231Flasher.cs file (from V1.06) and the write was successful.
Hello,
iam having an problem with an BK7231N on an aliexpress relay board.
Firmware read was a success at first, the write is the problem (thats the reason why i dont do a backup in this try) it randomly stops either at 0x4000 or 0x1000. At higher baudrate there was no connectivity at all 115200 did following.
TTL chip/board used is an cp2102*
Starting flash new (no backup)! Now is: Samstag, 11. März 2023 22:39:00. Flasher mode: BK7231N Going to open port: COM3. Serial port open! Getting bus... (now, please do reboot by CEN or by power off/on) Getting bus failed, will try again - 0/100! Getting bus failed, will try again - 1/100! Getting bus success! Going to set baud rate setting (115200)! Will try to read device flash MID (for unprotect N): Flash MID loaded: 1560EB Will now search for Flash def in out database... Flash def found! For: 1560EB Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF Entering SetProtectState(True)... sr: 0 sr: 0 final sr: 0 msk: 407c cw: 0, sb: 2, lb: 5 bfd: 0 SetProtectState(True) success! Reading file firmwares/OpenBK7231N_QIO_1.15.450.bin... Loaded 1220464 bytes from firmwares/OpenBK7231N_QIO_1.15.450.bin... Preparing to write data file to chip - resetting bus and baud... Getting bus... (now, please do reboot by CEN or by power off/on) Getting bus success! Going to set baud rate setting (115200)! Will try to read device flash MID (for unprotect N): Flash MID loaded: 1560EB Will now search for Flash def in out database... Flash def found! For: 1560EB Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF Entering SetProtectState(True)... sr: 0 sr: 0 final sr: 0 msk: 407c cw: 0, sb: 2, lb: 5 bfd: 0 SetProtectState(True) success! Going to do erase, start 0, sec count 298! Erasing sector 0... ok! Erasing sector 4096... ok! Erasing sector 8192... ok! Erasing sector 12288... ok! Erasing sector 16384... ok! Erasing sector 20480... ok! Erasing sector 24576... ok! Erasing sector 28672... ok! Erasing sector 32768... ok! Erasing sector 36864... ok! Erasing sector 40960... ok! Erasing sector 45056... ok! Erasing sector 49152... ok! Erasing sector 53248... ok! Erasing sector 57344... ok! Erasing sector 61440... ok! Erasing sector 65536... ok! Erasing sector 69632... ok! Erasing sector 73728... ok! Erasing sector 77824... ok! Erasing sector 81920... ok! Erasing sector 86016... ok! Erasing sector 90112... ok! Erasing sector 94208... ok! Erasing sector 98304... ok! Erasing sector 102400... ok! Erasing sector 106496... ok! Erasing sector 110592... ok! Erasing sector 114688... ok! Erasing sector 118784... ok! Erasing sector 122880... ok! Erasing sector 126976... ok! Erasing sector 131072... ok! Erasing sector 135168... ok! Erasing sector 139264... ok! Erasing sector 143360... ok! Erasing sector 147456... ok! Erasing sector 151552... ok! Erasing sector 155648... ok! Erasing sector 159744... ok! Erasing sector 163840... ok! Erasing sector 167936... ok! Erasing sector 172032... ok! Erasing sector 176128... ok! Erasing sector 180224... ok! Erasing sector 184320... ok! Erasing sector 188416... ok! Erasing sector 192512... ok! Erasing sector 196608... ok! Erasing sector 200704... ok! Erasing sector 204800... ok! Erasing sector 208896... ok! Erasing sector 212992... ok! Erasing sector 217088... ok! Erasing sector 221184... ok! Erasing sector 225280... ok! Erasing sector 229376... ok! Erasing sector 233472... ok! Erasing sector 237568... ok! Erasing sector 241664... ok! Erasing sector 245760... ok! Erasing sector 249856... ok! Erasing sector 253952... ok! Erasing sector 258048... ok! Erasing sector 262144... ok! Erasing sector 266240... ok! Erasing sector 270336... ok! Erasing sector 274432... ok! Erasing sector 278528... ok! Erasing sector 282624... ok! Erasing sector 286720... ok! Erasing sector 290816... ok! Erasing sector 294912... ok! Erasing sector 299008... ok! Erasing sector 303104... ok! Erasing sector 307200... ok! Erasing sector 311296... ok! Erasing sector 315392... ok! Erasing sector 319488... ok! Erasing sector 323584... ok! Erasing sector 327680... ok! Erasing sector 331776... ok! Erasing sector 335872... ok! Erasing sector 339968... ok! Erasing sector 344064... ok! Erasing sector 348160... ok! Erasing sector 352256... ok! Erasing sector 356352... ok! Erasing sector 360448... ok! Erasing sector 364544... ok! Erasing sector 368640... ok! Erasing sector 372736... ok! Erasing sector 376832... ok! Erasing sector 380928... ok! Erasing sector 385024... ok! Erasing sector 389120... ok! Erasing sector 393216... ok! Erasing sector 397312... ok! Erasing sector 401408... ok! Erasing sector 405504... ok! Erasing sector 409600... ok! Erasing sector 413696... ok! Erasing sector 417792... ok! Erasing sector 421888... ok! Erasing sector 425984... ok! Erasing sector 430080... ok! Erasing sector 434176... ok! Erasing sector 438272... ok! Erasing sector 442368... ok! Erasing sector 446464... ok! Erasing sector 450560... ok! Erasing sector 454656... ok! Erasing sector 458752... ok! Erasing sector 462848... ok! Erasing sector 466944... ok! Erasing sector 471040... ok! Erasing sector 475136... ok! Erasing sector 479232... ok! Erasing sector 483328... ok! Erasing sector 487424... ok! Erasing sector 491520... ok! Erasing sector 495616... ok! Erasing sector 499712... ok! Erasing sector 503808... ok! Erasing sector 507904... ok! Erasing sector 512000... ok! Erasing sector 516096... ok! Erasing sector 520192... ok! Erasing sector 524288... ok! Erasing sector 528384... ok! Erasing sector 532480... ok! Erasing sector 536576... ok! Erasing sector 540672... ok! Erasing sector 544768... ok! Erasing sector 548864... ok! Erasing sector 552960... ok! Erasing sector 557056... ok! Erasing sector 561152... ok! Erasing sector 565248... ok! Erasing sector 569344... ok! Erasing sector 573440... ok! Erasing sector 577536... ok! Erasing sector 581632... ok! Erasing sector 585728... ok! Erasing sector 589824... ok! Erasing sector 593920... ok! Erasing sector 598016... ok! Erasing sector 602112... ok! Erasing sector 606208... ok! Erasing sector 610304... ok! Erasing sector 614400... ok! Erasing sector 618496... ok! Erasing sector 622592... ok! Erasing sector 626688... ok! Erasing sector 630784... ok! Erasing sector 634880... ok! Erasing sector 638976... ok! Erasing sector 643072... ok! Erasing sector 647168... ok! Erasing sector 651264... ok! Erasing sector 655360... ok! Erasing sector 659456... ok! Erasing sector 663552... ok! Erasing sector 667648... ok! Erasing sector 671744... ok! Erasing sector 675840... ok! Erasing sector 679936... ok! Erasing sector 684032... ok! Erasing sector 688128... ok! Erasing sector 692224... ok! Erasing sector 696320... ok! Erasing sector 700416... ok! Erasing sector 704512... ok! Erasing sector 708608... ok! Erasing sector 712704... ok! Erasing sector 716800... ok! Erasing sector 720896... ok! Erasing sector 724992... ok! Erasing sector 729088... ok! Erasing sector 733184... ok! Erasing sector 737280... ok! Erasing sector 741376... ok! Erasing sector 745472... ok! Erasing sector 749568... ok! Erasing sector 753664... ok! Erasing sector 757760... ok! Erasing sector 761856... ok! Erasing sector 765952... ok! Erasing sector 770048... ok! Erasing sector 774144... ok! Erasing sector 778240... ok! Erasing sector 782336... ok! Erasing sector 786432... ok! Erasing sector 790528... ok! Erasing sector 794624... ok! Erasing sector 798720... ok! Erasing sector 802816... ok! Erasing sector 806912... ok! Erasing sector 811008... ok! Erasing sector 815104... ok! Erasing sector 819200... ok! Erasing sector 823296... ok! Erasing sector 827392... ok! Erasing sector 831488... ok! Erasing sector 835584... ok! Erasing sector 839680... ok! Erasing sector 843776... ok! Erasing sector 847872... ok! Erasing sector 851968... ok! Erasing sector 856064... ok! Erasing sector 860160... ok! Erasing sector 864256... ok! Erasing sector 868352... ok! Erasing sector 872448... ok! Erasing sector 876544... ok! Erasing sector 880640... ok! Erasing sector 884736... ok! Erasing sector 888832... ok! Erasing sector 892928... ok! Erasing sector 897024... ok! Erasing sector 901120... ok! Erasing sector 905216... ok! Erasing sector 909312... ok! Erasing sector 913408... ok! Erasing sector 917504... ok! Erasing sector 921600... ok! Erasing sector 925696... ok! Erasing sector 929792... ok! Erasing sector 933888... ok! Erasing sector 937984... ok! Erasing sector 942080... ok! Erasing sector 946176... ok! Erasing sector 950272... ok! Erasing sector 954368... ok! Erasing sector 958464... ok! Erasing sector 962560... ok! Erasing sector 966656... ok! Erasing sector 970752... ok! Erasing sector 974848... ok! Erasing sector 978944... ok! Erasing sector 983040... ok! Erasing sector 987136... ok! Erasing sector 991232... ok! Erasing sector 995328... ok! Erasing sector 999424... ok! Erasing sector 1003520... ok! Erasing sector 1007616... ok! Erasing sector 1011712... ok! Erasing sector 1015808... ok! Erasing sector 1019904... ok! Erasing sector 1024000... ok! Erasing sector 1028096... ok! Erasing sector 1032192... ok! Erasing sector 1036288... ok! Erasing sector 1040384... ok! Erasing sector 1044480... ok! Erasing sector 1048576... ok! Erasing sector 1052672... ok! Erasing sector 1056768... ok! Erasing sector 1060864... ok! Erasing sector 1064960... ok! Erasing sector 1069056... ok! Erasing sector 1073152... ok! Erasing sector 1077248... ok! Erasing sector 1081344... ok! Erasing sector 1085440... ok! Erasing sector 1089536... ok! Erasing sector 1093632... ok! Erasing sector 1097728... ok! Erasing sector 1101824... ok! Erasing sector 1105920... ok! Erasing sector 1110016... ok! Erasing sector 1114112... ok! Erasing sector 1118208... ok! Erasing sector 1122304... ok! Erasing sector 1126400... ok! Erasing sector 1130496... ok! Erasing sector 1134592... ok! Erasing sector 1138688... ok! Erasing sector 1142784... ok! Erasing sector 1146880... ok! Erasing sector 1150976... ok! Erasing sector 1155072... ok! Erasing sector 1159168... ok! Erasing sector 1163264... ok! Erasing sector 1167360... ok! Erasing sector 1171456... ok! Erasing sector 1175552... ok! Erasing sector 1179648... ok! Erasing sector 1183744... ok! Erasing sector 1187840... ok! Erasing sector 1191936... ok! Erasing sector 1196032... ok! Erasing sector 1200128... ok! Erasing sector 1204224... ok! Erasing sector 1208320... ok! Erasing sector 1212416... ok! Erasing sector 1216512... ok! All selected sectors erased! Writing sector 0x00... ok! Writing sector 0x1000... ok! Writing sector 0x2000... ok! Writing sector 0x3000... ok! failed with serial.BytesToRead 14 (expected 15) The beginning of buffer in UART contains 040EFF01E0FCF40600070000400000 data. Writing sector 0x4000... Writing sector 16384 failed! Writing file data to chip failed.
Hi Dexruus,
did you try to modify the timeout as I said in my previous message ?
Hi, just wanted to add that I'm basically having the same problem. I've tried increasing the timeout to no success. I compiled the GUI under Linux, it seems that might make a difference. I also switched baud rate down to 115200. I then used the old python programmer which had no issues writing the chip. So something is different in the way Mono reads and writes to the serial port compared to the python script. This was for a BK7231T chip.
This is more an FYI that this is still an issue for at least some users. I'd love to see it working, since the GUI is much nicer and easier to use than the python implementation.
I don't know what is wrong. It seems to work reliable for me. @thinksilicon how did you compile it on linux?
Btw, I have a major update coming for this tool. It will be possible to extract Tuya config very easily and also it will be possible to configure OBK in place, from the flasher access. It will be released in few days.
Hey, I built it with xbuild, which did give a deprecation warning, but still built fine. Reading code didn't succeed at all. It did make a connection to the bus after I toggled CEN, however it did not read any bytes. Writing started with erasing like the previous posts in this issue and then errored out at various times during the erase. Maybe it's just some oddity with Mono + serial ports under Linux.
xbuild --help
>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
XBuild Engine Version 14.0
Mono, Version 6.12.0.122
Copyright (C) 2005-2013 Various Mono authors
Hey, just wanted to say that I was having a similar issue on linux but it worked fine on windows. As you said, it probably has to do with the interaction with serial ports over Mono. Hopefully they can find a fix!
It works for me... I increased a delay in UART read for slower computers...
Can you recheck? https://github.com/openshwprojects/BK7231GUIFlashTool/releases/tag/v1.0.2
Great! Thanks for this hint! =)
Increasing UART timeouts worked for me too (Set to 5 first and second). Tried in Linux (Ubuntu) ARM on Parallels VM on Mac M1.
It works for me... I increased a delay in UART read for slower computers...
Can you recheck? https://github.com/openshwprojects/BK7231GUIFlashTool/releases/tag/v1.0.2
Great! Thanks for this hint! =) Increasing UART timeouts worked for me too (Set to 5 first and second). Tried in Linux (Ubuntu) ARM on Parallels VM on Mac M1.
Thanks, this helped. No issues on my Windows 10 laptop. But on my Ubuntu 22.04 workstation (Ryzen 5700G) I faced the same issue. By changing two of the topmost UART timings from 1s to 5s everything started working.
Thank you for testing. Now 5s delays in those two fields are default values. I've made a release - BK7231 GUI Flash Tool 1.1.1
with a separated CB2S module, I got the sequence
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... failed with serial.BytesToRead 4095 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF4061009000000200069 data.
Failed! There was no result to save.
on a Debian "testing" system on a Ryzen 5 4650G with version 1.1.1 (so with the two defaults of 5, I checked them).
With 9 sec in both entries it only waits longer after the
Going to start reading at offset 0x00...
line.
No problem on a Windows laptop with the same hardware. My serial adapter is nearly exactly the same like the one above.
May be the higher timeout wasn't the reason it worked but only increased the chances.
Might relates to #19
I had the same problem on Arch Linux. Write was working fine, but it stopped at the backup. failed with serial.BytesToRead 4095 (expected 4111) It might worth a try to use this: https://github.com/OpenBekenIOT/hid_download_py Best regards
Hello,
BK7231N (CB3S) chip I can't do flasch or backup. Whichever I do.
In the HID Download itself goes without the slightest problem.