-
Notifications
You must be signed in to change notification settings - Fork 3k
Cypress: us_ticker fixes #13130
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
Cypress: us_ticker fixes #13130
Conversation
A running timer will block DeepSleep, which would normally be good because we don't want the timer to accidentally lose counts. We don't care about that for us_ticker (If we're requesting deepsleep the upper layers already determined that they are okay with that), so explicitly stop the us_ticker timer before we go to sleep and start it back up afterwards.
This allows the application to inject its own resource reservations immmediately after the BSP (and therefore HAL) is initialized, ensuring that they can claim require resources before mbed tries to use them for more flexible purposes. For example, the application might want to claim a particular timer to make sure that it doesn't get picked for us_ticker (which can use any arbitrary timer instance).
@kyle-cypress, 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.
Makes sense to me. I like the justification for "post-bsp init" hook better than the equivalent hook when it was put in for STM - there was a vague idea about it being for "extra RAM init" then, which wouldn't really work.
cc FYI @ARMmbed/team-st-mcd |
CI started |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
Summary of changes
A running timer will block DeepSleep, which would normally be good because we don't want the timer to accidentally lose counts. We don't care about that for us_ticker (If we're requesting deepsleep the upper layers already determined that they are okay with that), so explicitly stop the us_ticker timer before we go to sleep and start it back up afterwards.
This allows the application to inject its own resource reservations immmediately after the BSP (and therefore HAL) is initialized, ensuring that they can claim require resources before mbed tries to use them for more flexible purposes. For example, the application might want to claim a particular timer to make sure that it doesn't get picked for us_ticker (which can use any arbitrary timer instance).
Impact of changes
NA
Migration actions required
NA
Documentation
NA
Pull request type
Test results
All failures are either transient or pre-existing
CY8CPROTO_062S3_4343W_GCC_ARM-NET.txt
CY8CPROTO_062S3_4343W-GCC_ARM.txt
CY8CKIT_062_WIFI_BT-GCC_ARM.txt
CY8CKIT_062_WIFI_BT-GCC_ARM-NETWORK.txt
CY8CPROTO_062_4343W_GCC_ARM-NET.txt
CY8CPROTO_062_4343W-GCC_ARM.txt
Reviewers
@ARMmbed/team-cypress