-
Notifications
You must be signed in to change notification settings - Fork 3k
K22F/K64F: Add lp_ticker implementation and HAL lp_ticker tests #2476
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
Please share the test results (compilers + those 2 targets) - paste them here |
* limitations under the License. | ||
*/ | ||
|
||
#if DEVICE_LOWPOWERTIMER |
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.
Instead of #if
ing-out the whole code here, could you instead add the following check:
#if !DEVICE_LOWPOWERTIMER
#error [NOT_SUPPORTED] Low power timer not supported for this target
#endif
That will allow the tools to safely ignore this test for other targets that don't support the low power timer yet.
GCC_ARM:
ARM:
|
Thanks for making that change @bulislaw! /morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 663 Build failed! |
Ah some failures on the Beetle, will have a look. |
/morph test |
*/ | ||
#include "sleep_api.h" | ||
#include "cmsis.h" | ||
#include "system_core_beetle.h" |
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.
This include is not required it is already inside cmsis.h
a3c81ad
to
fd654d9
Compare
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 668 Test failed! |
298efc9
to
45d2bf3
Compare
Ok I set the timeouts to be less conservative as with big number of boards we can't really be that strict. |
Latest results:
Also the new tests are failing for Beetle board, it works allright for single waits, but there's a bug in lp_ticker implementation which makes consecutive waits hang (eg 2x1s wait, the second wait will never finish). I'll look into this now. |
/morph test |
@mbed-bot: TEST HOST_OSES=windows |
LGTM waiting for CI to finish |
The NUCLEO_F091RC is failing the new tests, I had a look and it seems that the lp_ticker implementation is broken. The IRQ handler is never called. I'm also sure there are more platforms like that, which will need to be looked at later. |
[Build 831] |
/morph test |
From the mbed CI:
Same for all toolchains @mazimkhan Please check the jobs, tests FAIL (one failure, for instance check above code snippet I shared in this comment) and report UNSTABLE but here it's green? |
@0xc0170 CI fixed to show failure if there is any test failure. |
Tracked it down to ticker init happening to late for super short waits (just on first run after board was started), now it's being done in Ticker constructor. Which removes the extra delay from measurements. |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 687 All builds and test passed! |
#define OSC32K_CLK_HZ (32768) | ||
#define MAX_LPTMR_SLEEP ((1 << 16) - 1) | ||
|
||
static int lp_ticker_inited = 0; |
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.
this could be more narrow type
API implemented using hybrid approach with RTC for longer periods and LPTMR for subsecond ones.
Having it in the attach call introduces extra latency and can break short delays, for the first usage.
@0xc0170 Could you have a look please.