-
Notifications
You must be signed in to change notification settings - Fork 8.2k
clock_control: nRF5x: Non-blocking 32KHz crystal oscillator startup #8803
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
clock_control: nRF5x: Non-blocking 32KHz crystal oscillator startup #8803
Conversation
Added Kconfig option and implementation to support a non-blocking startup of 32KHz crystal oscillator. This will reduce the time from boot to application start while the crystal startup happens in background. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #8803 +/- ##
==========================================
- Coverage 52.34% 52.32% -0.02%
==========================================
Files 195 195
Lines 24723 24730 +7
Branches 5139 5140 +1
==========================================
Hits 12941 12941
- Misses 9708 9715 +7
Partials 2074 2074
Continue to review full report at Codecov.
|
pizi-nordic
left a comment
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.
Unfortunately this change will break Bluetooth, as clock might be not stable when connection is established.
IMHO until BLE stack is not handling clock switch-over we should still wait for stable clock. Of course this could be done in thread initializing BLE instead of system startup which still be better than current solution.
Fix the implementation to correctly check the status of HFCLK and LFCLK states with respect to the requested sources. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Added implementation to check and wait for stable 32KHz clock source before starting connectable/directed advertising state and initiating state. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
|
@pizi-nordic added implementation to wait for a stable 32KHz source before connected role establishment. |
| DEBUG_RADIO_CLOSE(0); | ||
| } | ||
|
|
||
| #define DRV_NAME CONFIG_CLOCK_CONTROL_NRF5_K32SRC_DRV_NAME |
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 this will behave on non-Nordic chips?
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.
Current upstream controller is nRF specific, the newer architecture in development separates vendor specifics in lower layer modules.
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.
Ok
Added Kconfig option and implementation to support a
non-blocking startup of 32KHz crystal oscillator.
This will reduce the time from boot to application start
while the crystal startup happens in background.
Signed-off-by: Vinayak Kariappa Chettimada [email protected]