Closed dirkx closed 5 months ago
The upload tool will change setting to a CH559, but not on CH558
https://github.com/DeqingSun/vnproch551/blob/bd6a1a85be100bda11a7ddc3db55691bf40468cf/main.cpp#L503
So your CH558L kept the factory settings. And you can try another boot pin P4.6 down.
Also the 1209:c550 means the USB stack for CDC is working. You can just set serial port to it and it can automatically go to bootloader in upload process.
Ah - understood. And indeed that works. Will see if I can modify main.cpp/503 to also work for the CH558L.
The USB-CDC stack for the default Blinken appears as /dev/ttyAMC0 (1209:c550) as opposed to the 4348:55e0 when it is powered up with boot pressed (in my case P5.1 to 3V3). And this /dev/ttyAMC0 (1209:c550) behaves as a serial port.
Can this serial port be brought into boot loader mode without a powercycle ? i.e. programatically ?
@dirkx Yes, it can be done in default Arduino way, open and close port at 1200bps. And if you choose that port in Arduino IDE and press Upload, it will be done automatically. Code is located at https://github.com/DeqingSun/ch55xduino/blob/d69a0e446aa082b35a1be808a8c7e22a4886b6e2/ch55xduino/ch55x/cores/ch55xduino/USBCDC.c#L61
@dirkx I also tried to modify the code with a text editor and Github action compiled the binary. The code is not tested on hardware, but it will likely solve your CH558 problem.
commit: https://github.com/DeqingSun/vnproch551/commit/c07331616c9802a1ca1510dde47b5e09261b8660
Binary: linux_arm64_build.zip win_build.zip mac_build.zip linux_build.zip
Thanks - wil give that a try and let you know (I am reliant on the DP+ pin).
@dirkx Yes, it can be done in default Arduino way, open and close port at 1200bps. And if you choose that port in Arduino IDE and press Upload, it will be done automatically. Code is located at
Thanks - for splendidly (will try to make a pull request for the right menu/config settings).
Added PR #163 with the changes that made it all work automatically from within the Arduino environment (as opposed to tweaking things from the command line).
Although the datasheet suggests the right boot pin (P5.1/DP), etc -- the CH558L does not seem to respond after its initial (successful) flash.
it does appear fine on the USB bus though:
Does this ring a bell with anyone ?