-
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
Fixes for tickless and LPTICKER_DELAY_TICKS #7524
Commits on Aug 17, 2018
-
Add an API to suspend and resume the ticker.
Configuration menu - View commit details
-
Copy full SHA for 23e6d50 - Browse repository at this point
Copy the full SHA 23e6d50View commit details -
Add test for ticker suspend and resume
Unit test the functions ticker_suspend and ticker_resume.
Configuration menu - View commit details
-
Copy full SHA for 1bbf43a - Browse repository at this point
Copy the full SHA 1bbf43aView commit details -
Update deep sleep lock check in tests
When the define LPTICKER_DELAY_TICKS is set deep sleep can be randomly disallowed when using the low power ticker. This is because a Timer object, which locks deep sleep, is used to protect from back-to-back writes to lp tickers which can't support that. This causes tests which assert that deep sleep is allowed to intermittently fail. To fix this intermittent failure this patch adds the function sleep_manager_can_deep_sleep_test_check() which checks if deep sleep is allowed over a duration. It updates all the tests to use sleep_manager_can_deep_sleep_test_check() rather than sleep_manager_can_deep_sleep() so the tests work even if deep sleep is spuriously blocked.
Configuration menu - View commit details
-
Copy full SHA for 472abab - Browse repository at this point
Copy the full SHA 472ababView commit details -
Update low power ticker wrapper
Update the low power ticker wrapper code so it does not violate any properties of the ticker specification. In specific this patch fixes the following: - Prevent spurious interrupts - Fire interrupt only when the ticker times increments to or past the value set by ticker_set_interrupt - Disable interrupts when ticker_init is called
Configuration menu - View commit details
-
Copy full SHA for adc64cc - Browse repository at this point
Copy the full SHA adc64ccView commit details -
Fix tests to work with LPTICKER_DELAY_TICKS
Fix the HAL common_tickers and sleep tests so they work correctly when the define LPTICKER_DELAY_TICKS is set.
Configuration menu - View commit details
-
Copy full SHA for f68958d - Browse repository at this point
Copy the full SHA f68958dView commit details -
Fix rollover handling in ticker frequency test
To handle timer rollovers the test tests-mbed_hal-common_tickers_freq calls intf->set_interrupt(0). For this to work correctly the ticker implementation must fire an interrupt on every rollover event though intf->set_interrupt(0) was called only once. Whether an interrupt will fire only once or multiple times is undefined behavior which cannot be relied upon. To avoid this undefined behavior this patch continually schedules an interrupt and performs overflow detection on every read. This also removes the possibility of race conditions due to overflowCounter incrementing at the wrong time.
Configuration menu - View commit details
-
Copy full SHA for 00b8e24 - Browse repository at this point
Copy the full SHA 00b8e24View commit details -
Speed optimization for LowPowerTickerWrapper
Only reschedule the Timeout object in the low power ticker wrapper if it is not already pending.
Configuration menu - View commit details
-
Copy full SHA for dc2e2c0 - Browse repository at this point
Copy the full SHA dc2e2c0View commit details