-
Notifications
You must be signed in to change notification settings - Fork 70
Update Ch32V10x variants #211
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
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # variants/CH32V10x/CH32V103R8T6/variant_CH32V103R8T6.cpp
Excellent work! |
@maxint-rd |
Very nice board. Well done! |
I've made a fix for using interrupt driven serial. See PR #201. @KenRouKoro - I strongly advise you to review all PRs that have not been merged into the V1.0.4 and the current master branch. They contain some very valuable improvements (including yours). Please be aware that WCH hasn't dedicated much time to support this core. My impression is that it's a labor of love provided in limited spare time of WCH employees and some (increasingly less) active community members |
I tried the content of the PR you submitted. The main serial port (USART1) works well on the ch32v103, but I am unable to configure the second serial port, as it gets merged into the main serial port in a very strange way. I am currently investigating the cause of this issue. |
I've worked on dual serial port support for the X033 and got it working. For dual (simultaneous) support I used the WCH method as basis, so it also requires setting certain defines in that header file. Next to dual support it also supports single port selection, so having the proper defines really matters. In the comment on top of PR #201 you can read all details. So far I've only had the X033 to develop dual UART support. In this commit of PR #171 you can see the changes I made to support dual port usage on the X033. It involved selecting alternate pin functions. Other board definitions probably require similar chip specific changes. Recently I obtained some V006 chips, which also have two UART modules. I've not yet had the time to implement and test dual support for the V006. Once I do, I'll add any changes to PR #200. |
@maxint-rd Today I conducted further testing. I used the native operation method (refer to the example project for Ch32V103) and confirmed that operating USART3 is feasible. However, it will take me a few more days to understand the current implementation of USART1 and port it accordingly. Additionally, I need to report an issue with the EEPROM library. For the Ch32V103, the current EEPROM library can only operate on the first two bytes. Writing to and reading from the other 24 bytes does not generate errors, but the values cannot be modified (they remain permanently at 255). |
Okay. Please submit another issue to address the EEPROM library. That library was contributed by me, based on code from the CH32fun project and EVT example code, when I only had the V003 available. (It states so in the readme). Improving it will likely be a community effort. If you submit this as a new issue, I can see how I can make further contributions. At the moment I also have V002, V006, X033 and V203 for further testing/development. Support for the V10x probably requires help from you or other community members. |
Please also have a look at the X033 code I added in PR #171 to support UART2 and of course the UART2 code in #201 . At the moment that PR only supports UART1 and UART2, but with a bit of effort I may be able to extend it to support UART3 and 4. Edit: just added support for USART2 on CH32V006F8 (TSSOP20). Went about the same as for the X033, but had to specify using pin remapping function in |
Fix #210

Fully updated the pin definitions of CH32V103R8T6 according to the manual.