-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
timers: Increase test variation, increase EFM32 flexibility #18052
base: master
Are you sure you want to change the base?
Conversation
The configured frequency for the board is the one that is required to pass; the other common frequencies are tried, and reported for the user to get an impression of the timer's flexibility.
Maybe I can interest you in #16349 - but I think currently it is waiting for me to fix some issues. |
It's a good addition (esp. for testing), but I think the pressing need for that is more at build time. If it becomes unblocked, I'll be happy to adjust the new tests to that instead. |
I ran the test on a set of BOARD, results are here, I did not look into the details of any test, but in master only |
The build failures were due to some |
... rather than just triping an assertion.
I think I found what samr21-xpro tripped over (another assert similar to the removed EFM32 one); could you trigger that test run again? |
(Belaying tests until ... WAAH can we please have a version of C in which the number hierarchy and literals is not messed up?) |
#17654 might be of interest adding a second periph-timer (LP/LE however one wants to call it) to the ztimer initialization |
…erent frequencies
…th different frequencies
The only remaining test failure that does not appear to be a fluke is run_test/tests/periph_timer/esp32-wroom-32:gnu, where the timer0 initialization fails -- odd, because I didn't touch the ESP32 code. And the number of other tests failing "just so" is worrying:
|
Contribution description
Timers appear to be written with a strong focus on providing for XTimer; requirements have changed with the advent of ZTimer. In particular, EFM32 timers encoded a few of these choices rather hardly.
This PR contains small changes for making them test- and usable in a more versatile manner:
Testing procedure
To test the last commit, we currently have no boards that are configured with single timers, so apply this and run on stk3700:
and then run the periph_timers test. It will formally fail (because for automatable testing we'd need to give a per-timer known-good frequency, but there are no such boards right now so it's pointless anyway), but you can observe that timer 2 fails the 32kiHz test and the others, but then passes the 3MHz test.
Issues/PRs references
(I previously had a lot of potential follow-ups in here that are now all in this PR).