Skip to content

ch32v: Improve timekeeping#752

Merged
mattnite merged 2 commits intomainfrom
wch_time
Dec 6, 2025
Merged

ch32v: Improve timekeeping#752
mattnite merged 2 commits intomainfrom
wch_time

Conversation

@Grazfather
Copy link
Collaborator

  • Remove SysTick interrupt setup and handler function
  • Add TIM2 interrupt setup and handler function for time_since_boot
  • Add delay_us and delay_ms functions which spin waiting on the SysTick counter value.
    • This yield tiny code and doesn't need an interrupt, which can save code space, which is at a premium on these tiny chips.
  • Remove CSRs I mistakenly exported from riscv32_common.zig, they aren't implemented on these chips!

@mattnite mattnite merged commit cb7b34d into main Dec 6, 2025
48 checks passed
@mattnite mattnite deleted the wch_time branch December 6, 2025 06:38
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