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

Add low power timer fallback for platforms without RTC #6878

Merged
merged 1 commit into from May 22, 2018

Conversation

Projects
None yet
7 participants
@bulislaw
Member

bulislaw commented May 11, 2018

Description

Low power timer will be used as RTC for platforms that don't have HW RTC
capabilities. It will help maintain compatibility between targets and will ensure backward compatibility for targets that will lose RTC support when new HAL RTC API is merged to master.

Pull request type

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

@bulislaw bulislaw requested review from 0xc0170 and SenRamakri May 11, 2018

@bulislaw bulislaw self-assigned this May 11, 2018

#else
#else /* DEVICE_RTC */

#if DEVICE_LOWPOWERTIMER

This comment has been minimized.

@cmonr

cmonr May 14, 2018

Contributor

Is there any particular reason this and line 30 aren't merged?

This comment has been minimized.

@bulislaw

bulislaw May 14, 2018

Member

Fixed.

@cmonr cmonr added the needs: review label May 14, 2018

Add low power timer fallback for platforms without RTC
Low power timer will be used as RTC for platforms that don't have HW RTC
capabilities.

@bulislaw bulislaw force-pushed the bulislaw:rtc_lp_ticker branch from 09174db to ac92764 May 14, 2018

@bulislaw

This comment has been minimized.

Member

bulislaw commented May 15, 2018

Can we start the testing please.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented May 18, 2018

/morph build

@0xc0170 0xc0170 added needs: CI and removed needs: review labels May 18, 2018

@0xc0170 0xc0170 requested a review from c1728p9 May 18, 2018

@mbed-ci

This comment has been minimized.

mbed-ci commented May 18, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@bulislaw

This comment has been minimized.

Member

bulislaw commented May 18, 2018

This PR doesn't touch anything around F401 or lptimer.
/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented May 18, 2018

Build : SUCCESS

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

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.

@mbed-ci

This comment has been minimized.

@adbridge adbridge added needs: review and removed needs: CI labels May 21, 2018

@adbridge

This comment has been minimized.

Contributor

adbridge commented May 21, 2018

@cmonr Are you happy with this?

Testing has passed but this still needs a review from one of the following:
@c1728p9 @SenRamakri Could one of you please review this ASAP.

@c1728p9

Do devices without an RTC typically have a low power timer? If not, the low power timer may need to fall back to the microsecond timer.

#include "drivers/LowPowerTimer.h"

static SingletonPtr<mbed::LowPowerTimer> _rtc_lp_timer;
static uint64_t _rtc_lp_base;

This comment has been minimized.

@SenRamakri

SenRamakri May 21, 2018

Contributor

I see that _rtc_lp_base is getting written in the write function below, how is it used?

This comment has been minimized.

@bulislaw

bulislaw May 22, 2018

Member

_rtc_lp_base is used as a start time and then we add the actual timer value to it as timer starts from 0.

@SenRamakri

Overall it looks good to me. I have one question which I have commented.

@adbridge

This comment has been minimized.

Contributor

adbridge commented May 21, 2018

@bulislaw Could you please answer the questions asked ? Though this has not been blocked on them.

@cmonr cmonr added needs: review and removed needs: review labels May 21, 2018

@bulislaw

This comment has been minimized.

Member

bulislaw commented May 22, 2018

Done

@0xc0170 0xc0170 merged commit 23d8085 into ARMmbed:master May 22, 2018

13 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, 845 warnings (+0 warnings)
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10217 cycles (+1200 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/littlefs Passed, code size is 9964B (+0.00%)
Details
travis-ci/tools Local tools testing has passed
Details

@cmonr cmonr removed the ready for merge label May 23, 2018

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