Skip to content

WCH CH32V: cpus: refactoring#528

Merged
mattnite merged 13 commits intoZigEmbeddedGroup:mainfrom
ghostiam:wch_ch32v_refactoring
May 8, 2025
Merged

WCH CH32V: cpus: refactoring#528
mattnite merged 13 commits intoZigEmbeddedGroup:mainfrom
ghostiam:wch_ch32v_refactoring

Conversation

@ghostiam
Copy link
Contributor

@ghostiam ghostiam commented May 5, 2025

Note

There are not as many changes here as GitHub shows, it just includes the SVD files.

Interrupts are now working!

  • Refactored the cpu module to remove duplicated code. All supported MCUs are now initialized in a similar way.
  • Added interrupt support for each MCU, with a comptime check to make sure the handler is declared when an interrupt is enabled.
  • Added CSRs supported by the MCU.
  • Added a blinky_systick example that uses interrupts.
  • Moved CPU names into an enum, so now we can control code flow depending on the selected MCU (see blinky_systick example).
  • Removed an example that only differed by output pins.
  • SVD files updated. Used original, unpatched files because the old ones were missing some registers and had names different from the reference manual. Only access fields were fixed to avoid errors from regz.

Using these files as references:

@ghostiam ghostiam force-pushed the wch_ch32v_refactoring branch from b344b76 to 90155fd Compare May 6, 2025 00:14
@ghostiam ghostiam force-pushed the wch_ch32v_refactoring branch from 4ed0d66 to 51b0c14 Compare May 8, 2025 00:16
@ghostiam ghostiam force-pushed the wch_ch32v_refactoring branch from 51b0c14 to 6e0108d Compare May 8, 2025 00:18
@ghostiam ghostiam marked this pull request as ready for review May 8, 2025 00:55
@ghostiam ghostiam changed the title [WIP] WCH CH32V: cpus: refactoring WCH CH32V: cpus: refactoring May 8, 2025
@ghostiam ghostiam force-pushed the wch_ch32v_refactoring branch from 015280a to c4410e6 Compare May 8, 2025 01:25
@ghostiam ghostiam marked this pull request as draft May 8, 2025 01:26
@ghostiam ghostiam marked this pull request as ready for review May 8, 2025 01:34
@mattnite mattnite merged commit 4a2e251 into ZigEmbeddedGroup:main May 8, 2025
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.

2 participants