-
Notifications
You must be signed in to change notification settings - Fork 3k
lp_timer test : add a minimum delta value #5737
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
@fkjagodzinski @maciejbocianski @mprse Please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -56,8 +56,9 @@ extern uint32_t SystemCoreClock; | |||
#define US_PER_MSEC 1000 | |||
#define TOLERANCE_FACTOR 80000.0f | |||
#define US_FACTOR 1000000.0f | |||
#define CLOCK_MAX 130000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a comment based on the PR description could be added here for clarification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how was this value chosen, why is it sufficient (based on the description, this allows to set the minimum tolerance value for targets with clock freq higher that this value)
I restarted uvisor, should report soon |
/morph build |
@jeromecoutant Would you mind adding in the comment, as requested in the review? |
Build : SUCCESSBuild number : 767 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 422 |
Test : SUCCESSBuild number : 601 |
ed8c732
to
9a43912
Compare
@cmonr |
/morph build |
Build : SUCCESSBuild number : 795 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 450 |
Test : SUCCESSBuild number : 630 |
Description
In tests-mbed_drivers-lp_timer, since low power timer is less accurate than regular timer,
there is a delta time based on CPU clock frequency.
For ex, STM32F7 has a system core clock set to 216MHz, then delta time is only 370us.
With the current formula, we think that this delta time is too aggressive for high frequency targets.
So we propose to set a kind of minimum delta time around 500us.
Thx
Status
READY