Skip to content
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

Updates all Tier 1 BSP examples to use RTIC v2 and the RTC monotonic where applicable #817

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

kyp44
Copy link
Contributor

@kyp44 kyp44 commented Jan 30, 2025

Summary

Some Tier 1 BSP RTIC examples used RTIC v1 and others v2. When delays are required, they all used the inefficient SysTick monotonic.

This updates all Tier 1 BSP RTIC examples to use RTIC v2 and the recently released RTC monotonic instead. It also ensures that all Tier 1 BSPs feature at least one RTIC example, adding a blinky_rtic example as needed.

See the commit message for details on what was done for each BSP.

Note that I was only able to test the example changes for the metro_m0 and pygamer BSPs. If others are able/willing to test on other boards that would definitely be a good thing.

Checklist

  • All new or modified code is well documented, especially public items
  • No new warnings or clippy suggestions have been introduced - CI will deny clippy warnings by default! You may #[allow] certain lints where reasonable, but ideally justify those with a short comment.

…monotonic where applicable

* Ensures that all Tier 1 BSPs have all examples listed in Cargo.toml in alphabetical order.
* Tier 1 BSP changes:
  * samd11_bare
    * Adds the `blinky_rtic` example.
  * metro_m0
    * Updates the `blinky_rtic` example to use RTIC v2 and the RTC monotonic.
  * feather_m0
    * Updates the `blinky_rtic` example to use the RTC monotonic.
    * Renames the `blinky_monotonic` example to `blinky_embassy`, which is more apt since they both use a monotonic.
    * Updates the `blinky_embassy` example to use the RTC monotonic as well, showing that this can be done despite it being a monotonic written for RTIC.
  * pygamer
    * Adds the `blinky_rtic` example.
  * metro_m4
    * Adds the `blinky_rtic` example.
  * feather_m4
    * Adds the `blinky_rtic` example.
    * Updates the `clocking_v2` example to use RTIC v2.
  * atsame54_xpro
    * Updates the `blinky_rtic` example to use RTIC v2 and the RTC monotonic.
    * Updates the `mcan` example to use RTIC v2 and the RTC monotonic.
@jbeaurivage
Copy link
Contributor

Good stuff, thanks @kyp44. Is there any more work to be done in this PR or is it ready to merge?

@kyp44
Copy link
Contributor Author

kyp44 commented Jan 30, 2025

Thanks! It's ready to merge as far as I am concerned.

@jbeaurivage jbeaurivage merged commit 7f409d1 into atsamd-rs:master Jan 31, 2025
111 checks passed
@github-actions github-actions bot mentioned this pull request Jan 31, 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