Skip to content
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

Merged
merged 1 commit into from Apr 26, 2019

Conversation

Projects
None yet
6 participants
@ccli8
Copy link
Contributor

commented Apr 18, 2019

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

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
[NUC472] Get around unknown error with power-down
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.

@ciarmcom ciarmcom requested review from Ronny-Liu and ARMmbed/mbed-os-maintainers Apr 18, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Apr 18, 2019

@ccli8, thank you for your changes.
@Ronny-Liu @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Member

left a comment

Is there tracking issue for this fault during startup?

@ccli8

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2019

s there tracking issue for this fault during startup?

@0xc0170 what do you mean by "startup"?

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 18, 2019

On NUC472, on wake-up from power-down mode

Sorry, wake-up I meant

@ccli8

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2019

@0xc0170 This issue was checked before, but conclude nothing. Currently, we can only use the workaround. The side effect is power consumption.

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Apr 18, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 18, 2019

I am just after: "Where is this issue being tracked" so we do not forget about it.

@ccli8

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2019

Where is this issue being tracked

@0xc0170 It is tracked internally.

@@ -49,9 +56,11 @@ void hal_deepsleep(void)
}
#endif

CLK_DisableModuleClock(nu_us_ticker_modinit()->clkidx);

This comment has been minimized.

Copy link
@Ronny-Liu

Ronny-Liu Apr 23, 2019

How about free us_ticker instead here? So that you don't risk receiving unwanted interrupt?

This comment has been minimized.

Copy link
@ccli8

ccli8 Apr 24, 2019

Author Contributor

@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.

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

ci started

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 26, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@adbridge adbridge added ready for merge and removed needs: CI labels Apr 26, 2019

@adbridge adbridge merged commit 4020c6d into ARMmbed:master Apr 26, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage Success
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8417 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8448B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.