ch32-rs / wlink

An open source WCH-Link library/command line tool written in Rust.
Apache License 2.0
155 stars 25 forks source link

Failed to flash for ch32v003 #23

Closed secext2022 closed 1 year ago

secext2022 commented 1 year ago

flash command:

> wlink flash --address 0x08000000 out.hex
22:13:47 [INFO] WCH-Link v2.9 (WCH-LinkE-CH32V305)
22:13:47 [WARN] No expected chip type specified, assume CH32V30X (use --chip to specify chip type)
22:13:48 [INFO] Attached chip: CH32V003(0x00300500)
22:13:48 [INFO] Chip UID: cd-ab-84-aa-49-bc-9a-12
22:13:48 [INFO] Flash protected: false
22:13:48 [INFO] Read out.hex as IntelHex format
22:13:48 [INFO] Flashing 1604 bytes to 0x08000000
Error: USB error: Operation timed out

Caused by:
    Operation timed out

wlink version:

> wlink --version
wlink 0.0.4

chip info:

> wlink status
22:13:41 [INFO] WCH-Link v2.9 (WCH-LinkE-CH32V305)
22:13:41 [WARN] No expected chip type specified, assume CH32V30X (use --chip to specify chip type)
22:13:41 [INFO] Attached chip: CH32V003(0x00300500)
22:13:41 [INFO] Chip UID: cd-ab-84-aa-49-bc-9a-12
22:13:41 [INFO] Flash protected: false
22:13:41 [INFO] RISC-V ISA: Some("RV32CEX")
22:13:41 [INFO] RISC-V arch: Some("WCH-V2A")
22:13:41 [INFO] Dmstatus {
    .0: 4981634,
    allhavereset: true,
    anyhavereset: true,
    allresumeack: false,
    anyresumeack: false,
    allunavail: false,
    anyunavail: false,
    allrunning: false,
    anyrunning: false,
    allhalted: true,
    anyhalted: true,
    authenticated: true,
    version: 2,
}
andelf commented 1 year ago

This should be fixed in the newest release. @secext2022