Skip to content

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

Conversation

mprse
Copy link
Contributor

@mprse mprse commented Mar 27, 2018

Description

Provide fixes for HAL lp/us ticker test.

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 27, 2018

@stevew817 Please review

@geky
Copy link
Contributor

geky commented Mar 27, 2018

Tested with EFM32PG12_STK3402 👍

After merging #6471

@mprse
Copy link
Contributor Author

mprse commented Mar 27, 2018

I added also fix for DEVICE_LOWPOWERTIMER symbol which has been changed to DEVICE_LPTICKER.

@0xc0170 0xc0170 requested review from bulislaw and c1728p9 March 27, 2018 10:38
@stevew817
Copy link
Contributor

Echoing @geky 's findings, LGTM

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 27, 2018

I added also fix for DEVICE_LOWPOWERTIMER symbol which has been changed to DEVICE_LPTICKER.

There is another fix from @bulislaw that came earlier and should get in before this one: #6469 . Once in, this should be rebased (along with the feature branch) and start CI asap

@mprse
Copy link
Contributor Author

mprse commented Mar 27, 2018

There is another fix from @bulislaw that came earlier and should get in before this one: #6469 . Once in, this should be rebased (along with the feature branch) and start CI asap

Ok. Please tell me when ticker branch is re-based (without this issue with serial_api.c file). I'll update this PR then.

@bulislaw bulislaw force-pushed the feature-hal-spec-ticker branch from afd66ab to 6daa7fc Compare March 27, 2018 14:06
@bulislaw
Copy link
Member

@mprse done

@bulislaw bulislaw force-pushed the feature-hal-spec-ticker_tests_fixes branch from bb71c25 to 4cbace4 Compare March 27, 2018 14:51
@bulislaw
Copy link
Member

@0xc0170 done

mprse added 4 commits March 27, 2018 17:13
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).
@mprse mprse force-pushed the feature-hal-spec-ticker_tests_fixes branch from 4cbace4 to 42ffc3f Compare March 27, 2018 15:13
@mprse
Copy link
Contributor Author

mprse commented Mar 27, 2018

Rebased this PR and removed LOWPOWERTIMER fix.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 27, 2018

Will soon CI soon

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 27, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 27, 2018

Build : SUCCESS

Build number : 1592
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6472/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Mar 27, 2018

@mbed-ci
Copy link

mbed-ci commented Mar 28, 2018

@0xc0170 0xc0170 merged commit c9ecc9b into ARMmbed:feature-hal-spec-ticker Mar 28, 2018
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.

7 participants