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

tests/periph/selftest_shield: fix invalid calls to timer_init() #21006

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maribu
Copy link
Member

@maribu maribu commented Nov 18, 2024

Contribution description

Calling timer_init() with unsupported frequencies on some MCUs just selects the closest possible frequency. But e.g. on SAM0, using an unsupported frequency will cause timer_init() to fail; which probably is the better option.

However, a failing calling to timer_init() results in a test failure. This is now worked around by using timer_query_freq() to select a suitable timer frequency that is supported.

Testing procedure

On e.g. wemos-zero or arduino-zero the test should now run to completion. (Note: It will not pass the test, though.) In master the test will abort on a failed call to timer_init() instead.

Issues/PRs references

None

@maribu maribu added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 18, 2024
Calling `timer_init()` with unsupported frequencies on some MCUs just
selects the closest possible frequency. But e.g. on SAM0, using an
unsupported frequency will cause `timer_init()` to fail; which probably
is the better option.

However, a failing calling to `timer_init()` results in a test failure.
This is now worked around by using timer_query_freq() to select a
suitable timer frequency that is supported.
@maribu maribu force-pushed the tests/periph/selftest_shield/fix-timer_init branch from 6483bc2 to c60f128 Compare November 18, 2024 20:52
@maribu maribu changed the title tests/periph/selfteest_shield: fix invalid calls to timer_init() tests/periph/selftest_shield: fix invalid calls to timer_init() Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant