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

Select the clock source dynamically on SoftDevice initialisation #32

Merged
merged 1 commit into from
Aug 5, 2015

Conversation

jpbrucker
Copy link
Contributor

Note: this patch refers to the following pull request: ARMmbed/mbed-os#1276
If that change gets merged into mbed, this patch will be necessary for a proper clock source compatibility. Otherwise, #ifdef can be kept to select the oscillator in btle_init, but the tested macro will need to be changed to TARGET_NRF_LFCLK_RC.
Note: request cloned from #31 (comment)

Instead of relying on build macros to know which oscillator we're
supposedly using, check the value of LFCLKSRC register. This way, we can
trust mbed's init code to fallback on the internal clock if the user
specified a wrong target.
This change, along with the mbed patch that selects clock source
dynamically, will allow lots of application to still run and provide
FOTA, when the wrong Nordic platform is specified.

Signed-off-by: Jean-Philippe Brucker [email protected]

Instead of relying on build macros to know which oscillator we're
supposedly using, check the value of LFCLKSRC register. This way, we can
trust mbed's init code to fallback on the internal clock if the user
specified a wrong target.
This change, along with the mbed patch that selects clock source
dynamically, will allow lots of application to still run and provide
FOTA, when the wrong Nordic platform is specified.

Signed-off-by: Jean-Philippe Brucker <[email protected]>
rgrover added a commit that referenced this pull request Aug 5, 2015
Select the clock source dynamically on SoftDevice initialisation
@rgrover rgrover merged commit 27cd45a into ARMmbed:develop Aug 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants