Skip to content

NRF5x: Fix config of LFCLK source / settings. #7652

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

Merged
merged 1 commit into from
Aug 24, 2018

Conversation

andrewleech
Copy link
Contributor

Description

The NRF5x targets all have config entries to set the low frequency clock source and a couple of settings for the RC source.
https://github.com/ARMmbed/mbed-os/blob/6634e4606d49c298be896cdf3c8aa9942067c5a2/targets/TARGET_NORDIC/TARGET_NRF5x/LF_Clock_config.md
https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L3744

The defines these map through to no longer exist in SDK14 / TARGET_NRF5x however:
https://github.com/ARMmbed/mbed-os/blob/2104d8ab5b6be5ce382b3b0e74085e1c2c677f85/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/btle/btle_clock.h

Nordic changed their defines for these things to NRF_SDH_CLOCK_LF_SRC, NRF_SDH_CLOCK_LF_RC_CTIV & NRF_SDH_CLOCK_LF_RC_TEMP_CTIV which are currently hardcoded in each softdevice mbed_lib.json


These settings are required if you want to run a nrf5x system without the external 32K crystal.

This PR maps these existing config entries through to the new defines used in nordic code.

### Pull request type

    [ ] Fix
    [ ] Refactor
    [ ] New target
    [X] Feature
    [ ] Breaking change

@0xc0170 0xc0170 requested a review from marcuschangarm July 31, 2018 09:47
@@ -40,21 +40,58 @@

#ifndef MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC
#define MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC (NRF_LF_SRC_XTAL)
#warning No configuration for LF clock source. Xtal source will be used as a default configuration.
#error No configuration for LF clock source. Xtal source will be used as a default configuration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this error now? The text indicates that default config would be used (should not be an error?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, that was changed for debugging only, didn't mean to commit it. I'll fix in the morning.

@cmonr
Copy link
Contributor

cmonr commented Aug 9, 2018

@marcuschangarm Mind taking a look?

@andrewleech A reminder that this is still awaiting an update.

@andrewleech
Copy link
Contributor Author

Oh, yeah. I thought I did push that update, clearly not.

@cmonr
Copy link
Contributor

cmonr commented Aug 13, 2018

@andrewleech Was there suppose to be an update commit attached to your last comment?

@andrewleech
Copy link
Contributor Author

It's pushed now

@cmonr
Copy link
Contributor

cmonr commented Aug 14, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Aug 14, 2018

@andrewleech
Copy link
Contributor Author

Drats, I'll look into the build fails next week as well then

@andrewleech
Copy link
Contributor Author

Ok that previous build failure should be fixed. I'd stripped out some old defines I erroneously thought were no longer used.

@cmonr
Copy link
Contributor

cmonr commented Aug 22, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Aug 22, 2018

Build : SUCCESS

Build number : 2860
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7652/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Aug 22, 2018

@mbed-ci
Copy link

mbed-ci commented Aug 23, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 23, 2018

/morph mbed2-build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants