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

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

Merged
merged 1 commit into from Aug 24, 2018

Conversation

Projects
None yet
5 participants
@andrewleech
Contributor

andrewleech commented Jul 31, 2018

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 Jul 31, 2018

@@ -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.

This comment has been minimized.

@0xc0170

0xc0170 Jul 31, 2018

Member

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

This comment has been minimized.

@andrewleech

andrewleech Jul 31, 2018

Contributor

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

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 9, 2018

@marcuschangarm Mind taking a look?

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

@andrewleech

This comment has been minimized.

Contributor

andrewleech commented Aug 9, 2018

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

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 13, 2018

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

@andrewleech andrewleech force-pushed the andrewleech:nrf5x_config_lfclk branch from 6cdb6d1 to e9b0c38 Aug 13, 2018

@andrewleech

This comment has been minimized.

Contributor

andrewleech commented Aug 13, 2018

It's pushed now

@andrewleech andrewleech force-pushed the andrewleech:nrf5x_config_lfclk branch from e9b0c38 to 74b65f5 Aug 14, 2018

@cmonr

cmonr approved these changes Aug 14, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 14, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Aug 14, 2018

@andrewleech

This comment has been minimized.

Contributor

andrewleech commented Aug 14, 2018

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

@cmonr cmonr added needs: work and removed needs: CI labels Aug 14, 2018

@andrewleech andrewleech force-pushed the andrewleech:nrf5x_config_lfclk branch from 74b65f5 to 6293572 Aug 22, 2018

@andrewleech

This comment has been minimized.

Contributor

andrewleech commented Aug 22, 2018

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

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 22, 2018

/morph build

@mbed-ci

This comment has been minimized.

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

This comment has been minimized.

@0xc0170 0xc0170 added needs: review and removed needs: work labels Aug 22, 2018

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 23, 2018

/morph mbed2-build

@0xc0170 0xc0170 merged commit 2d33053 into ARMmbed:master Aug 24, 2018

15 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0.0%) RAM(+0.0%)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/cloud_client_smoke_test Test job was successful
Details
travis-ci/astyle Passed, 584 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10284 cycles (-203 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 29, 2018

Merge pull request ARMmbed#7652 from andrewleech/nrf5x_config_lfclk
NRF5x: Fix config of LFCLK source / settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment