jmaselbas / wch-isp

mirror of https://sr.ht/~jmaselbas/wch-isp/
https://sr.ht/~jmaselbas/wch-isp/
GNU General Public License v2.0
21 stars 8 forks source link

`Fail to verify chunk` for CH32V208WB in Ubuntu Linux #2

Closed tonyho closed 1 year ago

tonyho commented 1 year ago

The tool can get the infor of device:

$sudo ./wch-isp info -v
BTVER v2.5 UID d0-40-88-26-3b-38-93-9f [0x1980] CH32V208WBU6

But failed to flash image:

$ sudo ./wch-isp -v flash ./WebServer.hex
BTVER v2.5 UID d0-40-88-26-3b-38-93-9f [0x1980] CH32V208WBU6
Fail to verify chunk @ 0 error: f5 00
jmaselbas commented 1 year ago

Which version of wch-isp are you using ? (but I don't think that matters)

I don't have an CH32V208WBU6 at hand to test this myself, do you have a link to a board featuring such MCU ?

Have you tried using others "isp" (such as https://github.com/ch32-rs/wchisp) ?

jmaselbas commented 1 year ago

I've ordered 3 eval boards using:

tonyho commented 1 year ago

@jmaselbas Thanks for huge support and fast reply. I tried the wchisp, it has another problem to flash the CH32V208: https://github.com/ch32-rs/wchisp/issues/29

jmaselbas commented 1 year ago

I just thought you might try to disable verifying (-n option) and see if your design boots. I doubt this will work but maybe only the verification step fails.

jmaselbas commented 1 year ago

I got the same issue with the CH32V208 eval board that I received... I somehow finally managed to write to the device but I don't really know how nor why... And I cannot reproduce this issue anymore after the first successful write, weird.

jmaselbas commented 1 year ago

I think I've understand the issue, the WRP write protection need to be disabled. I've just pushed a new tag with a new command disable-wp, you might want to give it a try, also the device might need to be reset before trying the write operation again.