-
Notifications
You must be signed in to change notification settings - Fork 32
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
"Invalid payload length" on WCH-Link CH549 at ProbeInfo
response payload
#68
Comments
Almost the same here
this is wch link with older combined firmware where you can still switch between ARM CMSIS-DAP and RISCV mode by grounding TX pin when plugging device in. When updating to newer RISCV only firmware it works fine
the 0203 response is probably firmware version 2.03, newer one is 2.12 and the response is 4 bytes instead of 2 |
I encountered this same error using a CH549 based WCH-Link. Flashing a new firmware using the official WCH-LinkUtility and then switching to WinUSB drivers fixed it for me. |
but anyway, the line Line 31 in fd31f2b
should probably have < 2 not < 3 so it is worth fixing if older firmware would otherwise work. As mentioned older firmware has both ARM and RISCV versions combined, so if one uses devices with both cpu families and it otherwise works, one may prefer to keep the older version.
EDIT: Here is build with this change https://github.com/fanoush/wlink/actions/runs/11108154349 with downloadable artifacts, did not try with the device yet. |
I have tried it and detection now works but it does not detect attached CH32V305 device
When testing another CH549 based wch-link with updated firmware it finds it
so unfortunately this is not the only change needed. I don't have WCH RISCV devices older than 305/307 so can't test if older chips would work with older firmware. |
Where did you find the firmware for this one? I need it, too. |
it is part of the wch-link utility zip from https://www.wch.cn/downloads/wch-linkutility_zip.html I think it is the WCH-Link_APP_IAP_RV.bin inside Firmware_Link folder if you want to flash risc-v chips and the WCH-Link_APP_IAP_ARM.bin if you want CMSIS-DAP functionality |
Mate, thanks in a million! |
Running
wlink -vv regs
gives the following output:The error arises from the
ProbeInfo
response here, where there must be at least three bytes in the payload but my payload only contains two bytes [2, 1]. It then seems as though only the first two bytes are being used.What should the payload of three bytes look like if only the first two are going to being used?
Thanks,
Rowan
The text was updated successfully, but these errors were encountered: