Skip to content

Added CH32H417 support. - #117

Open
rewolff wants to merge 1 commit into
ch32-rs:mainfrom
rewolff:ch32h417-support
Open

rewolff wants to merge 1 commit into
ch32-rs:mainfrom
rewolff:ch32h417-support

Conversation

@rewolff

@rewolff rewolff commented Oct 26, 2026

Copy link
Copy Markdown

Tested against the QFN128, BTVER 02.40, USB, chip reported as 0x7028 , using USB.
Tested on the CH32H416QEU6-R0-1v1 (-EVT ?)

I've created the "go to bootloader" conditions (pullup on PB8 (10k), and pullup on PA12 (1.5k) ) and it boots into the bootloader.
The bootloader then waits for 10 seconds for "bootloader activity" and if none is detected, after 10 seconds it jumps to usercode.

This was difficult to diagnose at first, because I couldn't SEE any usercode running. The USB device seems to remain present because of the external pullup. I did not dare use a highervalue pullup even though claude kept pushing me to do so: When USB is connected, the PC must have a pulldown on that wire to reliably see the pullup of the device. So a higher value resistor may not register as "high".

After I had downloaded my first program (blinky) it was suddenly obvious when the usercode started to execute: the led would start flashing.

I need to powercycle the board to get it into the bootloader again: A reset doesn't work. I may not have the "jump to bootloader" hardware configuration correct yet.

@rewolff

rewolff commented Oct 26, 2026

Copy link
Copy Markdown
Author

Oh. One "known issue" with the current '417 definition file: My reference manual specifies two WRPR registers (or actually 4 16-bit registers). but my chip has "weird" values in the second one. So there might be an error in the datasheet, or they just initialize those "weird". (There are just 3 bits set on my chip, so only 3/32 (I still don't know the units) are writable if I am to believe the datasheet).

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant