cnlohr / ch32v003fun

Open source minimal stack for the ch32 line of WCH processors, including the ch32v003, a 10ยข 48 MHz RISC-V Microcontroller - as well as many other chips within the ch32v/x line.
MIT License
901 stars 142 forks source link

blink bricked CH32V003A4M6? #234

Open xsrf opened 1 year ago

xsrf commented 1 year ago

Hey, so is it possible that your blink example basically bricked my CH32V003A4M6? ๐Ÿ™ˆ The CH32V003A4M6 has SWIO and PD4 on the same physical pin. Your blink example toggles PD4 instantly. I use the official WCH-Link to flash the chip but after flashing blink (I've successfully flashed other code too) it won't connect anymore.

> minichlink.exe
Found WCH Link
WCH Programmer is LinkE version 2.8
link error, nothing connected to linker
Could not setup interface.

Do you know of a way to recover it?

dwillmore commented 1 year ago

Use the "-u" option of mminichlink. You'll need to have the WCH-LinkE control the power to your board.

On Sat, Sep 2, 2023 at 10:47โ€ฏAM Andreas @.***> wrote:

Hey, so is it possible that your blink example basically bricked my CH32V003A4M6? ๐Ÿ™ˆ The CH32V003A4M6 has SWIO and PD4 on the same physical pin. Your blink example toggles PD4 instantly. I use the official WCH-Link to flash the chip but after flashing blink (I've successfully flashed other code too) it won't connect anymore.

minichlink.exe Found WCH Link WCH Programmer is LinkE version 2.8 link error, nothing connected to linker Could not setup interface.

Do you know of a way to recover it?

โ€” Reply to this email directly, view it on GitHub https://github.com/cnlohr/ch32v003fun/issues/234, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPEX7GUD6GRBQAMDZRTQPTXYNBHZANCNFSM6AAAAAA4IUSMR4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

xsrf commented 1 year ago

@dwillmore thx, that helped ;) I've seen the -tf option to disable the power supply and hoped it would work when it just enables the power for flashing, but that was not the case. Missed the -u somehow - thx!

Maybe adding a delay to the example at the beginning would help with that kind of issue? :)

dwillmore commented 1 year ago

It may. I've been meaning to make some changes to the blink anyway.

On Sat, Sep 2, 2023 at 11:10โ€ฏAM Andreas @.***> wrote:

@dwillmore https://github.com/dwillmore thx, that helped ;) I've seen the -tf option to disable the power supply and hoped it would work when it just enables the power for flashing, but that was not the case. Missed the -u somehow - thx!

Maybe adding a delay to the example at the beginning would help with that kind of issue? :)

โ€” Reply to this email directly, view it on GitHub https://github.com/cnlohr/ch32v003fun/issues/234#issuecomment-1703859696, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPEX7DNWOH3BYS57JJEUPDXYND6RANCNFSM6AAAAAA4IUSMR4 . You are receiving this because you were mentioned.Message ID: @.***>