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

Problem with unbricking CH32V003J4M6 using WCH-LinkE #484

Open
xinaovo opened this issue Jan 1, 2025 · 1 comment
Open

Problem with unbricking CH32V003J4M6 using WCH-LinkE #484

xinaovo opened this issue Jan 1, 2025 · 1 comment

Comments

@xinaovo
Copy link

xinaovo commented Jan 1, 2025

Hi there! I compiled and uploaded the template code(which uses the debug pin PD1) to the MCU and I found that I couldn't upload other code to the MCU any more. So I tried to unbrick it using command minichlink -u but it stuck at Connection starting for a while and failed. The log is shown below.

minichlink -u
Found WCH Link
Entering Unbrick Mode
Connection starting
Programmer wasn't initialized? Fixing

DMStatus After Halt: /0/ffffffff
Fault on op (DMABSTRACTS = ffffffff) (-1) (Other Error) DMSTATUS: ffffffff
Unknown chip type.  Report as bug with picture of chip.
Vendored: ffffffff
marchid : ffffffff
HARTINFO: ffffffff
Chip Type: 0
Fault on op (DMABSTRACTS = ffffffff) (-1) (Other Error) DMSTATUS: ffffffff
Unknown chip type.  Report as bug with picture of chip.
Vendored: ffffffff
marchid : ffffffff
HARTINFO: ffffffff
Error: Flash is not unlocked (CTLR = ffffffff)
Error: Flash is not unlocked (CTLR = ffffffff)
Error: Flash is not unlocked (CTLR = ffffffff)

However, after reinstalling the WCH vendor driver and using "Clear All Code Flash-By Power Off" in the WCH-Link Utility, the MCU was unbricked successfully.

image
image

btw, the connection between MCU and WCH-LinkE programmer as well as the version of WCH-LinkE and WCH-Link Utility is shown below:

WCH-LinkE > CH32V003J4M6
SWDIO > Pin 8
GND > Pin 2
3V3 > Pin 4

WCH-LinkE version(reported by minichlink): 2.15
WCH-Link Utility version: 2.30
@roboticboyer
Copy link

See here the procedure/trick with minichlink -u (required a power off)

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