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 LOWPOWERTIMER : introduce LPTIM feature #5749

Merged
merged 1 commit into from Jan 15, 2018

Conversation

Projects
None yet
6 participants
@jeromecoutant
Contributor

jeromecoutant commented Dec 21, 2017

Description

STM32L0, L4, F7 and few F4 chip are supporting STM32 LPTIM feature.
We propose to allow user to use LPTIM for MBED LowPowerTimer API instead of using RTC wakeup timers.

By default, all targets that are supporting this feature have been configured.

Status

READY

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Dec 21, 2017

By default, all targets that are supporting this feature have been configured.

@jeromecoutant Can we get more details for this change. It's bringing implementation to tickers HAL for 2 different peripherals. What are pros and cons?

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Jan 4, 2018

Hi

What are pros and cons?

Pro LPT feature can be used without RTC

Ex : mbed_drivers/lp_timer test with NUCLEO_F410RB/ARM :

Configuration RAM FLASH
LPTIM disabled (RTC only) 9805 67845
LPTIM enabled (RTC present, but not used) 9863 64533
LPTIM enabled (RTC capability removed) 9833 64411

Pro
The LPTIM is a 16-bit timer that benefits from the ultimate developments in power
consumption reduction. Thanks to its diversity of clock sources, the LPTIM is able to keep
running in all power modes except for Standby mode. Given its capability to run even with
no internal clock source, the LPTIM can be used as a “Pulse Counter” which can be useful
in some applications. Also, the LPTIM capability to wake up the system from low-power
modes, makes it suitable to realize “Timeout functions” with extremely low power
consumption.

Con Available only with STM32L4/STM32L1/STM32F7 et very few STM32F4

@ithinuel ithinuel referenced this pull request Jan 4, 2018

Closed

relax max frequency requirement on lp_ticker. #5788

2 of 2 tasks complete
if(lp_Fired) {
lp_Fired = 0;
if (irq_handler) irq_handler();

This comment has been minimized.

@0xc0170

0xc0170 Jan 9, 2018

Member
if (irq_handler) {
  irq_handler();
}

same line 173

space if () not if(), line 165 and others

@jeromecoutant jeromecoutant force-pushed the jeromecoutant:PR_LPT_LPTIM branch from 06b27b2 to b639305 Jan 9, 2018

STM32 LOWPOWERTIMER : introduce LPTIM feature
STM32L0, L4, F7 and few F4 chip are supporting LPTIM feature.
We propose to allow user to use LPTIM for MBED LowPowerTimer API instead of using RTC wakeup timers.

By default, all targets that are supporting this feature have been configured.

@jeromecoutant jeromecoutant force-pushed the jeromecoutant:PR_LPT_LPTIM branch from b639305 to a816e93 Jan 9, 2018

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Jan 9, 2018

Coding style corrected.
(I apply astyle with --style=kr --indent=spaces=4 --indent-switches -p -xg -H -j -c options)

Rebase also done to solve the conflict

@0xc0170

one question that is not a blocker

#endif /* TARGET_STM32L4 */
if (HAL_LPTIM_Init(&LptimHandle) != HAL_OK) {
error("HAL_LPTIM_Init ERROR\n");

This comment has been minimized.

@0xc0170

0xc0170 Jan 12, 2018

Member

is this \n needed ? an app can deal with it or via config (there is an option fr the new line for stdio?)

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jan 12, 2018

/morph build

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Jan 12, 2018

@mbed-ci

This comment has been minimized.

mbed-ci commented Jan 12, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr added ready for merge and removed needs: CI labels Jan 12, 2018

@0xc0170 0xc0170 merged commit 6700776 into ARMmbed:master Jan 15, 2018

19 checks passed

ARM mbed CI Verification build successful.
Details
AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter 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/docs Local docs testing has passed
Details
travis-ci/events Local events testing has passed
Details
travis-ci/littlefs Local littlefs testing has passed
Details
travis-ci/mbed2-ATMEL Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-RENESAS Local mbed2-RENESAS testing has passed
Details
travis-ci/mbed2-SILICON_LABS Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM Local mbed2-STM testing has passed
Details
travis-ci/tools Local tools testing has passed
Details

@jeromecoutant jeromecoutant deleted the jeromecoutant:PR_LPT_LPTIM branch Jan 16, 2018

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