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

MCUXpresso: Ensure the RTC OSC is running at bootup on Kinetis platforms #8272

Merged
merged 1 commit into from Oct 18, 2018

Conversation

Projects
None yet
6 participants
@mmahadevan108
Contributor

mmahadevan108 commented Sep 27, 2018

Description

This is a fix for Issue #5348. The RTC 32K oscillator is used by the LPTicker, this change ensures that the oscillator is running before we start using it.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change
@mmahadevan108

This comment has been minimized.

Contributor

mmahadevan108 commented Sep 27, 2018

cc @maclobdell @ fkjagodzinski @MateuszMaz @0xc0170

@cmonr

This comment has been minimized.

Contributor

cmonr commented Sep 27, 2018

Interesting changeset. Looks alright, but kinds odd to have the RTC intiailization unconditionally in the sdk init.

@mmahadevan108

This comment has been minimized.

Contributor

mmahadevan108 commented Sep 27, 2018

@cmonr . I have reported this to the SDK team

@mmahadevan108

This comment has been minimized.

Contributor

mmahadevan108 commented Sep 27, 2018

Some more details can be found in the below link posted by the NXP application team.

https://community.nxp.com/docs/DOC-335568?q=32

@MateuszMaz

This comment has been minimized.

Contributor

MateuszMaz commented Sep 28, 2018

I tested it on K22F, K64F, K82F. PR fixed the issue.

@fkjagodzinski

I can confirm this patch fixes #5348 when compiled with arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437].

However, when I use the newer arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907], only the debug profile behaves correctly. With the default, develop profile the timeout never fires and I get:

# Power applied to OpenSDA port
2999879
# Power applied to OpenSDA port
2999879
@fkjagodzinski

Ok, since the Mbed OS does not officially support the GCC_ARM toolchain version 7 or higher I think this patch is fine.

@fkjagodzinski

This comment has been minimized.

Member

fkjagodzinski commented Oct 1, 2018

@0xc0170, @cmonr In case we add GCC v7 support to Mbed OS the issue mentioned above should be caught with tests-mbed_drivers-lp_ticker test suite.

@mmahadevan108 mmahadevan108 force-pushed the NXPmicro:Ensure_RTC_OSC_Start branch from 71b4061 to 478eb6f Oct 3, 2018

@mmahadevan108

This comment has been minimized.

Contributor

mmahadevan108 commented Oct 3, 2018

I have updated this PR to init the RTC OSC only if it is not already initialized. This will ensure the RTC reset tests do not fail.

@0xc0170

0xc0170 approved these changes Oct 4, 2018

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Oct 4, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 13, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 13, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr added needs: work and removed needs: CI labels Oct 13, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 13, 2018

Please take a look at the single failure. It looks quite interesting.

@mmahadevan108

This comment has been minimized.

Contributor

mmahadevan108 commented Oct 15, 2018

Its seems to be failing on the master branch as well so not related to this PR. I will look at it and submit a separate PR.

@mmahadevan108

This comment has been minimized.

Contributor

mmahadevan108 commented Oct 15, 2018

PR #8437 should address the mbed-ci Failure

MCUXpresso: Ensure the RTC OSC is running at bootup on Kinetis platforms
This is a fix for Issue 5348.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>

@mmahadevan108 mmahadevan108 force-pushed the NXPmicro:Ensure_RTC_OSC_Start branch from 478eb6f to ebf31c6 Oct 18, 2018

@mmahadevan108

This comment has been minimized.

Contributor

mmahadevan108 commented Oct 18, 2018

I have rebased and updated this PR to include the fix for the failure

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 18, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 18, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr merged commit 3d859ca into ARMmbed:master Oct 18, 2018

15 checks passed

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(+184 bytes) RAM(+0 bytes)
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-test Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Passed, 672 files (+0 files)
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 8926 cycles (-995 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

@cmonr cmonr removed the needs: CI label Oct 18, 2018

@mmahadevan108 mmahadevan108 deleted the NXPmicro:Ensure_RTC_OSC_Start branch Oct 18, 2018

cmonr added a commit to cmonr/mbed-os that referenced this pull request Nov 20, 2018

Revert "Merge pull request ARMmbed#8272 from NXPmicro/Ensure_RTC_OSC_…
…Start"

This reverts commit 3d859ca, reversing
changes made to 03f4623.

0xc0170 added a commit that referenced this pull request Nov 21, 2018

Merge pull request #8826 from cmonr/revert-8272
Revert "Merge pull request #8272 from NXPmicro/Ensure_RTC_OSC_Start"

TeemuKultala added a commit to TeemuKultala/mbed-os that referenced this pull request Dec 5, 2018

Revert "Merge pull request ARMmbed#8272 from NXPmicro/Ensure_RTC_OSC_…
…Start"

This reverts commit 3d859ca, reversing
changes made to 03f4623.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment