Skip to content

Add low power implementations for CM3DS #8737

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 3 commits into from
Nov 24, 2018

Conversation

kapi90
Copy link
Contributor

@kapi90 kapi90 commented Nov 14, 2018

Description

This commit adds the low power implementations that are required from
Mbed 5.10 onwards. The LP ticker has been implemented using a CMSDK
Dual Timer's both timers (HW prescaler needed to operate in the
specified frequency domain), whereas the us ticker uses one CMSDK Timer.
Besides the default hal implementations (lp_ticker.c, us_ticker.c, rtc_api.c
and sleep.c), the CMSDK Dual Timer's and the PL031 RTC's native drivers needed
to be added.Due to HW limitations in SSE-050 and the CM3DS, Deep Sleep
couldn't be implemented, therefore it is functionally identical to Sleep (WFI).

Pull request type

[ ] Fix
[ ] Refactor
[x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@tamasolaszi @tkaman @ashok-rao @0xc0170

@kapi90
Copy link
Contributor Author

kapi90 commented Nov 14, 2018

Seems that I have a little more commits that I wanted to have originally, trying to fix that...

Edit: Fixed

This commit represents the first stage of the low power implementations
that are required from Mbed 5.10 onwards. The LP ticker has been
implemented using a CMSDK Dual Timer's both timers (HW prescaler needed
to operate in the specified frequency domain), whereas the us ticker
uses one CMSDK Timer. Besides the default hal implementations (lp_ticker.c
and us_ticker.c), the CMSDK Dual Timer's native driver needed to be added.

Change-Id: I0b16b93dfac7753bebf430a2ce77761cb9c43ee5
Signed-off-by: Bence Kaposzta <[email protected]>
This commit represents the second stage of the low power implementations
that are required from Mbed 5.10 onwards. Besides the default hal
implementations (rtc_api.c and sleep.c), the PL031 RTC's native driver
needed to be added. Due to HW limitations in SSE-050 and the CM3DS,
Deep Sleep couldn't be implemented, therefore it is functionally
identical to Sleep (WFI).

Change-Id: Ibed2bdb452f48c98024dc7ef07fb51a4425e0a80
Signed-off-by: Bence Kaposzta <[email protected]>
@NirSonnenschein
Copy link
Contributor

@ARMmbed/mbed-os-maintainers , who is the correct teach-lead to review this one?

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 19, 2018

@kapi90 Can you share tests results for these additions? (should be part of it - "how was this tested")

@0xc0170 0xc0170 requested a review from a team November 19, 2018 12:48
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Code approved but waiting for "how was this tested"

@kapi90
Copy link
Contributor Author

kapi90 commented Nov 20, 2018

Hi @0xc0170 it passed Greentea in the beginning of September (it's been pending since then), but when I was trying to reproduce my logs yesterday I realized that some of the tests have changed, and I got 2 minor cases failing in the Sleep and RTC api, hopefully I'll find the cause soon and push the changes today.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 20, 2018

Appreciated 👍 will wait for the update.

Change-Id: I3c687694ee924938ec08ea40d0ddbcaf20dd0a73
@kapi90 kapi90 force-pushed the cm3ds_lp_requirements branch from cc69725 to 5dd6d19 Compare November 20, 2018 18:55
@kapi90
Copy link
Contributor Author

kapi90 commented Nov 20, 2018

2 macros needed to be updated in the Sleep API that caused the failures, I've attached my Greentea logs of all 4 new components.
CM3DS tests-mbed_hal-common_ticker tests-mbed_hal-us_ticker.txt
CM3DS tests-mbed_hal-lp_ticker.txt
CM3DS tests-mbed_hal-rtc.txt
CM3DS tests-mbed_hal-sleep.txt

@cmonr
Copy link
Contributor

cmonr commented Nov 21, 2018

Merge branch 'master' into cm3ds_lp_requirements

@kapi90 Fyi, in order to update a pull request branch, we suggest that the branch be rebased instead of merged.

It's not a paticular problem for this PR because this is coming in during a feature release, just an fyi.

@kapi90
Copy link
Contributor Author

kapi90 commented Nov 21, 2018

Thanks for the heads up @cmonr, will definitely take this into account next time.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 22, 2018

@ARMmbed/mbed-os-hal Please review

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

@kapi90 can you provide HAL test results for the newly enabled APIs

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

Ah sorry the tests results are there.

@mbed-ci
Copy link

mbed-ci commented Nov 23, 2018

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 3
Build artifacts
Build logs

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 23, 2018

Restarted CI (all are now pending)

@0xc0170 0xc0170 merged commit d7f2e30 into ARMmbed:master Nov 24, 2018
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.

6 participants