-
Notifications
You must be signed in to change notification settings - Fork 3k
NUC472: Workaround for unknown error with power-down #10436
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
NUC472: Workaround for unknown error with power-down #10436
Conversation
On NUC472, on wake-up from power-down mode, we may meet hard fault or some other unknown error. Before its cause is found, we enter idle mode instead for a workaround. To simulate power-down mode with idle mode, we also disable us_ticker during power-down period.
@ccli8, thank you for your changes. |
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.
Is there tracking issue for this fault during startup?
@0xc0170 what do you mean by "startup"? |
Sorry, wake-up I meant |
@0xc0170 This issue was checked before, but conclude nothing. Currently, we can only use the workaround. The side effect is power consumption. |
I am just after: "Where is this issue being tracked" so we do not forget about it. |
@0xc0170 It is tracked internally. |
@@ -49,9 +56,11 @@ void hal_deepsleep(void) | |||
} | |||
#endif | |||
|
|||
CLK_DisableModuleClock(nu_us_ticker_modinit()->clkidx); |
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 about free us_ticker instead here? So that you don't risk receiving unwanted interrupt?
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.
@Ronny-Liu The sequence of us_ticker_free()
> CLK_Idle()
> us_ticker_init()
in hal_deepsleep()
will reset us_ticker counter. Some tests like mbed-os-tests-mbed_hal-sleep
and mbed-os-tests-mbed_hal-sleep_manager
require us_ticker counter to continue on wake-up from power-down. Besides, hal_deepsleep()
is called in interrupt-disabled context by sleep_manager_sleep_auto()
, so the unwanted interrupt can be avoided.
ci started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
On NUC472, on wake-up from power-down mode, we may meet hard fault or some other unknown error. Before its cause is found, this PR tries to give a workaround by entering idle mode instead. To simulate power-down mode with idle mode, us_ticker clock is also disabled during power-down period.
Pull request type