Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wlink flash hangs when trying to reconnect serial console after reset #60

Open
reinauer opened this issue Mar 30, 2024 · 2 comments
Open

Comments

@reinauer
Copy link

wlink flash --watch-serial ./Build/app.elf will hang and NOT reset the device.
wlink flash ./Build/app.elf will reset the device but of course not provide serial output.

I have a WCH Link and a WCH LinkE. Tried firmware v30 and v32. Same results.

DUT is a CH32V103C-R1-1v1.

On Windows with the WCH LinkTool I can reboot the DUT. But when using wlink the reset does not go through. The device itself hangs. I tried wlink on MacOS or Linux both. I can manually reset the device and it will come up and provide serial output through --watch-serial

If I don't specify --watch-serial the device will reboot fine.

$ sudo ~/bin/wlink  flash --watch-serial  ./Build/app.elf
17:27:30 [INFO] Connected to WCH-Link v2.12(v32) (WCH-LinkE-CH32V305)
17:27:30 [INFO] Attached chip: CH32V103 (ChipID: 0x2500410f)
17:27:30 [INFO] Chip ESIG: FlashSize(64KB) UID(cd-ab-76-0e-f4-bc-37-77)
17:27:30 [INFO] Flash protected: false
17:27:30 [INFO] Read ./Build/app.elf as ELF format
17:27:30 [INFO] Flashing 23268 bytes to 0x08000000
17:27:30 [INFO] Read protected: false
███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 23268/2326817:27:33 [INFO] Flash done
17:27:33 [INFO] Now reset...
17:26:15 [INFO] Flash done
17:26:15 [INFO] Now reset...
17:26:15 [TRACE] (1) wlink::probe: [src/probe.rs:196] send command: Soft
17:26:15 [TRACE] (1) wlink::probe: [src/probe.rs:177] send 810b01 01
17:26:15 [TRACE] (1) wlink::probe: [src/probe.rs:187] recv 820b01 01
17:26:15 [DEBUG] (1) wlink::probe: Opening serial port: "/dev/ttyACM0"
17:26:15 [TRACE] (1) wlink::probe: [src/probe.rs:271] Serial port opened: SerialPort ( name: /dev/ttyACM0 baud_rate: 115200 data_bits: Eight flow_control: None parity: None stop_bits: One )
@andelf
Copy link
Contributor

andelf commented Mar 31, 2024

Does this happen every time?
I observed random fail on V203 too. I'm trying to resolve this.

@reinauer
Copy link
Author

reinauer commented Mar 31, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants