-
Notifications
You must be signed in to change notification settings - Fork 70
[CH32VM00X] Support TSSOP20 variants ch32v002f4 ch32v006f8 #200
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
Open
maxint-rd
wants to merge
24
commits into
openwch:main
Choose a base branch
from
maxint-rd:support-CH32V002F4-CH32V006F8
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: added peripheral menu in board.txt only for V003, VM00x, X035 - lacking board options for others will probably result in failing to compile. TODO: support peripheral menu for others
Issue openwch#27 [this comment](openwch#27 (comment)).
This was referenced Jun 17, 2025
This was referenced Jul 7, 2025
Open
define CH32V002 when CH32V002F4 is defined (as done by board selection)
Check if USART2 is defined before using it.
…openwch#65) - micros was counting backwards (openwch#65) - micros used 64-bit division; using 32-bit is more than 1K smaller (openwch#204) (requires same change for delayMicroseconds() in ../wiring_time.h)
delayMicroseconds() used 64-bit division; using 32-bit is more than 1K smaller (see openwch#204) (similar change for micros() in ch32/clock.c)
This was referenced Aug 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recently I acquired some CH32V002 and CH32V006 chips in a TSSOP20 package. Since they share the same pinout as the CH32V003, I think they can be useful upgrades for V003 projects. Based on the V006 QFN32 variant K8U6 this PR adds support for the V002 and V006 in TSSOP20 packages.
The V006 has 62KB flash, which makes it a good candidate for debugging V003 projects. I included some handy information such as Arduino pin numbers and installation instructions in
variants/CH32VM00X/README.md
.Note: This PR is not 100% complete but works for me and may be useful for others. It adds peripheral selection from the IDE menu only for certain chips. For others it may break compilation/uploading, so please be selective and know what you want.
To make it useful this PR includes some changes derived from other PR's:
|| defined(CH32VM00X)
to support I2C and SPIUnfortunately I don't have the full range of CH32 chips in my collection. I've only implemented support for the chips that I could test. The README gives some further info about this and other known issues.