Skip to content

Add 64bit SysTick example #605

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

Merged
merged 2 commits into from
Jun 1, 2025
Merged

Conversation

BogdanTheGeek
Copy link
Contributor

Modified the original example to work on split 64bit counters.
You can see which other MCUs this would work on here:

#if defined(CH32V20x) || defined(CH32V30x) || (defined(CH57x) && MCU_PACKAGE == 3) || defined(CH58x) || defined(CH59x) // ch573

I guess alternatively we could change the typedef for these to have a single 64bit register. They are little endian, so it should work.

@BogdanTheGeek
Copy link
Contributor Author

I modified the typedef to make it work more like all other MCUs. I've kept the old names behind a union to maintain backwards compatibility. Maybe this makes the example redundant?

@cnlohr
Copy link
Owner

cnlohr commented Jun 1, 2025

It's very frustrating that there is no 32-bit mode :( but I guess we have to do what we have to do.

@cnlohr cnlohr merged commit 16a7779 into cnlohr:master Jun 1, 2025
95 checks passed
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