-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Extends test set for Ticker class #5006
Conversation
0535115
to
dc10cc4
Compare
TESTS/mbed_drivers/ticker/main.cpp
Outdated
ticker.detach(); | ||
|
||
int time_diff = timer.read_us(); | ||
printf("SystemCoreClock: %d\n", SystemCoreClock); |
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.
do we want all these print by default (not for instance only for debug builds?)
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.
fixed
TESTS/mbed_drivers/ticker/main.cpp
Outdated
@@ -171,8 +380,19 @@ utest::v1::status_t two_ticker_case_teardown_handler_t(const Case *const source, | |||
|
|||
// Test cases | |||
Case cases[] = { | |||
Case("Timers: 1x ticker", one_ticker_case_setup_handler_t,test_case_1x_ticker, one_ticker_case_teardown_handler_t), | |||
Case("Timers: 2x callbacks", two_ticker_case_setup_handler_t,test_case_2x_callbacks, two_ticker_case_teardown_handler_t), | |||
Case("Test attache for 0.001s and time measure", test_attach_time<1000>), |
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.
Test attach
not attache
?
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.
fixed
Is the first character in the commit message some non ascii character? please remove it |
dc10cc4
to
4ac7711
Compare
Github still shows some unknow character in the commit msg (first one) ? |
7ac3919
to
8dabdec
Compare
8dabdec
to
c1c0f1e
Compare
For NUCLEO_F070RB TOLERANCE = (10000 / 48000000) * 1000000 = 208[us] | ||
For NRF51_DK TOLERANCE = (10000 / 16000000) * 1000000 = 625[us] | ||
*/ | ||
#define TOLERANCE ((TOLERANCE_FACTOR / (float)SystemCoreClock) * US_FACTOR) |
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.
What about setting the tolerance for the slowest device? It would make this simpler. Its good as you have it as well.
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.
The tolerance is scaled according CPU clock so it fits slow devices too. nrf51_dk is one of the slowest devices (form mbed compatible list).
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
This commit reverts commit c1c0f1e because it causes nightly builds to fail. This is because extra tests added in tests-mbed_drivers-ticker fail on some targets, such as the KL46Z, MAX32625MBED, MAX32630FTHR, NCS36510, NRF51 and NRF52_DK.
@maciejbocianski Please check the above reference, the test needs more work (fixing) |
This commit reverts commit c1c0f1e because it causes nightly builds to fail. This is because extra tests added in tests-mbed_drivers-ticker fail on some targets, such as the KL46Z, MAX32625MBED, MAX32630FTHR, NCS36510, NRF51 and NRF52_DK.
Description
New test suite for Ticker class
Status
READY
Test fails on NUCLEO_F070RB board
Waiting fix for #5004