-
Notifications
You must be signed in to change notification settings - Fork 3k
Provide fixes for HAL ticker test #6472
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
Provide fixes for HAL ticker test #6472
Conversation
@stevew817 Please review |
Tested with EFM32PG12_STK3402 👍 After merging #6471 |
I added also fix for DEVICE_LOWPOWERTIMER symbol which has been changed to DEVICE_LPTICKER. |
Echoing @geky 's findings, LGTM |
afd66ab
to
6daa7fc
Compare
@mprse done |
bb71c25
to
4cbace4
Compare
@0xc0170 done |
Increment test proves that ticker counter is incremented by one. This is done indirectly for high frequency counters where it is impossible to read 'value' and 'value + 1' in two successive ticker reads. This check is done indirectly by counting ticker ticks elapsed during execution of N cycles of empty while loop. Unfortunately on slow boards with fast tickers like NRF51_DK(16 MHz CPU/1MHz hf ticker) it is possible that for the same N cycles measured number of elapsed ticks in two successive calls is greater than 1. This patch provides fix for such case - measure operation is repeated with the same number of cycles.
On slow targets with fast high frequency tickers like NRF51_DK (16 Mhz CPU/1MHz ticker) time window for test case execution without overflow needs to be increased. Add parameter to `overflow_protect` function to be able to set different time window without overflow for us ticker and lp ticker.
…instead test setup handler. This is done to bypass green-tea setup handler which takes additional time.
- count_ticks: fix counter overflow handling, - count_ticks: use reg_cycles variable in while loop, - increment test: reduce number of cycles for slow cores if measure process needs to be repeated (difference is greater than 1).
4cbace4
to
42ffc3f
Compare
Rebased this PR and removed |
Will soon CI soon |
/morph build |
Build : SUCCESSBuild number : 1592 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1229 |
Test : SUCCESSBuild number : 1380 |
Description
Provide fixes for HAL lp/us ticker test.
Pull request type
[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change