DeqingSun / ch55xduino

An Arduino-like programming API for the CH55X
GNU Lesser General Public License v2.1
437 stars 86 forks source link

Softreset after download CH549 #161

Closed usbman01 closed 5 months ago

usbman01 commented 5 months ago

I am testing some code on the ch549 using usbcdc. So far all is working. I can see that after download the soft reset is working. The problem is after the soft reset the usb module is still active and CDC can't be started.

So reset after download does not make any sense. I still need to reboot to activate CDC.

Is it possible to download without that reset?

DeqingSun commented 5 months ago

Did you try with the official WCHISPtool to upload and reset? If it works then there is bug in my code. If it does not, then there is nothing I can do.

usbman01 commented 5 months ago

behavour is the same tested with wchisptool v3.2. It seems there is no unplug event or the event is too short to be recognized by win. So I guess i have to live with that.

I am still trying to hack this thing but up to now without any success. Even that readable part of the bootloader is writeprotected in user mode.

DeqingSun commented 5 months ago

Do you want a tool to solve this kind of issue?

https://github.com/DeqingSun/ch55xduino/tree/ch55xduino/pcb/ch55xRebootTool

I can mail you one assembled one from my place or mail you parts for 5 sets if you don't mind do some soldering.

usbman01 commented 5 months ago

many thanks for your offer but i do not need that. For the power cycle i am using a hub with buttons for Vusb and all of my boards have a jumper for boot.. Thats good enough for me.