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: drivers: timer: nrf_grtc: Fix test_get_ticks #83999

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nordic-krch
Copy link
Contributor

Test was occasionally failing when two types of current time reading (sys_clock_tick_get() and z_nrf_grtc_timer_read()) occurred at different system tick. In that case they were of by one system tick and test was failing.

@zephyrbot zephyrbot added the platform: nRF Nordic nRFx label Jan 15, 2025
@nordic-krch
Copy link
Contributor Author

fyi @adamkondraciuk

Test was occasionally failing when two types of current time
reading occurred at different system tick. In that case they
were of by one system tick and test was failing.

Signed-off-by: Krzysztof Chruściński <[email protected]>
Converting absolute system ticks to GRTC ticks is simple and algorithm
can be simplified. Legacy algorithm was copied from nrf_rtc_timer which
back then was working on 32 bits only.

Signed-off-by: Krzysztof Chruściński <[email protected]>
masz-nordic
masz-nordic previously approved these changes Jan 17, 2025
@nordic-krch
Copy link
Contributor Author

I had to add fix/optimization from #84001 because without that test was failing on cpuppr (and previously was passing because test flaw was canceled by the way z_nrf_grtc_timer_get_ticks() was implemented).

@nordic-krch
Copy link
Contributor Author

fyi @adamkondraciuk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants