ch32-rs / wchisp

WCH ISP Tool in Rust
https://ch32-rs.github.io/wchisp/
GNU General Public License v2.0
166 stars 28 forks source link

Question: Is there a way to programmatically have chips enter bootloader mode? #31

Open KurtE opened 1 year ago

KurtE commented 1 year ago

Sorry, not sure if this is the best place to ask this, but wondering if there is a prescribed way for a program that is running on of the chips such as the CH32V307 or CH32V203... to be able to enter into a state where you can use this app to upload the new program.

I know with some other boards, you can do this by jumping to some special location, others by special instructions, etc.

If there is a way, then I will probably play with the USB code to detect some condition such as some specific set of bytes sent to it, with a specific logical baud rate. At which point can then potentially build up an external command that can be run within some build process that first uses this to reset the board, and then use wchip to reprogram it.

Thanks and again sorry if this is not the appropriate place to ask this. Kurt

andelf commented 1 year ago

I can set PC via wlink, but fail to let it run the bootloader. Need more investigation.