Skip to content

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

Merged
merged 1 commit into from
Jan 4, 2018

Conversation

jeromecoutant
Copy link
Collaborator

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

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 20, 2017

@fkjagodzinski @maciejbocianski @mprse Please review

Copy link
Contributor

@mprse mprse left a 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
Copy link
Member

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.

Copy link
Contributor

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)

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 21, 2017

I restarted uvisor, should report soon

@cmonr
Copy link
Contributor

cmonr commented Dec 28, 2017

/morph build

@cmonr
Copy link
Contributor

cmonr commented Dec 28, 2017

@jeromecoutant Would you mind adding in the comment, as requested in the review?

@mbed-ci
Copy link

mbed-ci commented Dec 28, 2017

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Dec 28, 2017

@mbed-ci
Copy link

mbed-ci commented Dec 29, 2017

@jeromecoutant
Copy link
Collaborator Author

@cmonr
Done
Thx

@cmonr
Copy link
Contributor

cmonr commented Jan 3, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jan 3, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Jan 3, 2018

@mbed-ci
Copy link

mbed-ci commented Jan 4, 2018

@theotherjimmy theotherjimmy merged commit c00efae into ARMmbed:master Jan 4, 2018
@jeromecoutant jeromecoutant deleted the PR_LP_TIMER_TEST branch January 4, 2018 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants