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

STM32: add lpuart_clock_source config #7326

Merged
merged 2 commits into from Jun 30, 2018

Conversation

Projects
None yet
5 participants
@bcostm
Contributor

bcostm commented Jun 26, 2018

Description

This PR allows to change the LPUART1 source clock using a JSON file. Previously the clock source was fixed to LSE and PCLK1 and it was not possible to use HSI clock. Note that the default clock configuration is the same as before this PR (i.e. LSE and PCLK1).

If you want to use only the HSI clock instead, write the following in the mbed_app.json file:

"target_overrides": {
    "NUCLEO_L476RG":  {
        "target.lpuart_clock_source": "USE_LPUART_CLK_HSI",
        "target.clock_source": "USE_PLL_HSI"
    }
}

Should fix Issue #7315

Pull request type

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

@cmonr cmonr requested a review from jeromecoutant Jun 27, 2018

@cmonr

Looks fine aside for a doc question.

@@ -730,6 +730,10 @@
"help": "Define if a Low Speed External xtal (LSE) is available on the board (0 = No, 1 = Yes). If Yes, the LSE will be used to clock the RTC, LPUART, ... otherwise the Low Speed Internal clock (LSI) will be used",
"value": "1"
},
"lpuart_clock_source": {
"help": "Define the LPUART clock source. Mask values: USE_LPUART_CLK_LSE, USE_LPUART_CLK_PCLK1, USE_LPUART_CLK_HSI",
"value": "USE_LPUART_CLK_LSE|USE_LPUART_CLK_PCLK1"

This comment has been minimized.

@cmonr

cmonr Jun 27, 2018

Contributor

Should this also list USE_LPUART_CLK_HSI?

This comment has been minimized.

@bcostm

bcostm Jun 27, 2018

Contributor

I did it on purpose to not change the actual behavior. If the HSI is added here then it has also to be added in the system clock source selection. And it is not the case for all the boards... That's why I didn't add it here...

@cmonr cmonr added the needs: review label Jun 27, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 27, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jun 28, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Jun 28, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jun 28, 2018

@jeromecoutant Happy with the changes? One note, that there is coding style update. It is ready to get in but will cause some others to be rebased in some cases. If there is any priority, let us know. Otherwise I would recommend to get that style update first and the rest rebased if needed (the biggest change goes in first as otherway around you will end up rebasing it often).

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Jun 28, 2018

Yes, please merge #7351 first...
@bcostm will rebase after :-)

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 28, 2018

@jeromecoutant @bcostm Rebase at will!

bcostm added some commits Jun 20, 2018

STM32: add lpuart_clock_source config
Keep same clock configuration as done before this PR (LSE and PCLK1).
Use a JSON file to change it.

@bcostm bcostm force-pushed the bcostm:dev_lpuart1_clock_source branch from b1c7307 to 0c417ab Jun 29, 2018

@bcostm

This comment has been minimized.

Contributor

bcostm commented Jun 29, 2018

Rebase done !

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jun 29, 2018

/morph build

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Jun 29, 2018

@mbed-ci

This comment has been minimized.

mbed-ci commented Jun 29, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

cmonr approved these changes Jun 30, 2018

@cmonr cmonr merged commit 2da597e into ARMmbed:master Jun 30, 2018

14 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
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 913 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9625 cycles (+687 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 9964B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@0xc0170 0xc0170 removed the needs: CI label Jun 30, 2018

@bcostm bcostm deleted the bcostm:dev_lpuart1_clock_source branch Jul 2, 2018

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