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

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

Open
KurtE opened this issue Jun 4, 2023 · 2 comments

Comments

@KurtE
Copy link

KurtE commented Jun 4, 2023

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
Copy link
Contributor

andelf commented Jul 9, 2023

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

@froscon2024
Copy link
Contributor

The installed firmware on the device also make it sort of dependent how you can jump to the bootloader.
For example the closed source firmware on the Badgemagic https://badgemagic.fossasia.org/ did not let jumps to 0x00. This makes it a requirement to solder out the battery once, flash the opensource firmware replacement and then solder on the battery again.
With the opensource firmware now jumping to 0x00 is possible and you do not have to desolder the battery any more: fossasia/badgemagic-firmware#38 (comment)

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

3 participants