Skip to content

STM32 LPTICKER : RTC wake up timer is reset before setting a new one #7790

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
Aug 22, 2018

Conversation

jeromecoutant
Copy link
Collaborator

Description

Affected targets : targets supporting LPTICKER and using RTC wake up timer.

Patch:

  • timer is now reset before setting a new value
  • LPTICKER_DELAY_TICKS is decreased to only 1 for targets with low frequency system clock
  • LPTICKER_DELAY_TICKS seems to be no more needed for targets with high frequency system clock

NB:

  • LPTICKER_DELAY_TICKS is not changed for targets using LPTIM

@c1728p9 @LMESTM

Tests

Patch tested with ARM tool chain with 1 board per STM32 family

Tests with TICKLESS look OK with NUCLEO_F401RE

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Feature
[ ] Breaking change

@@ -270,7 +270,7 @@ void rtc_write(time_t t)

#if DEVICE_LPTICKER && !MBED_CONF_TARGET_LPTICKER_LPTIM
/* Need to update LP_continuous_time value before new RTC time */
uint32_t current_lp_time = rtc_read_lp();
rtc_read_lp();
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be nice to (void) the return of this function to show that you are purposefully ignoring the return value ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In this very specific case, we don't need to get the return value.
Function is called because global variable LP_continuous_time is updated there.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 20, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Aug 20, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Aug 20, 2018

@mbed-ci
Copy link

mbed-ci commented Aug 20, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 21, 2018

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

@mbed-ci
Copy link

mbed-ci commented Aug 21, 2018

@mbed-ci
Copy link

mbed-ci commented Aug 21, 2018

@0xc0170 0xc0170 merged commit d28d13c into ARMmbed:master Aug 22, 2018
pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
STM32 LPTICKER : RTC wake up timer is reset before setting a new one
@jeromecoutant jeromecoutant deleted the PR_LPTICKER_RTC branch September 4, 2018 16:07
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.

7 participants