Skip to content
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

Revert "STM32 RTC : skip rtc_write if possible" #9180

Merged
merged 1 commit into from
Dec 24, 2018

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Dec 21, 2018

Description

rtc_write must start the RTC. time() uses rtc_write(0) to start the RTC if it is not already enabled, but this check made that not work.

There's no point trying to optimise this case in a HAL - if we wanted set_time() to protect against users making pointless adjustments, the implementation should be there. But even then, you might want different levels of hysteresis depending on application, so it's probably best left to applications.

This reverts commit 9da5e48.

Fixes #9176, which is caused by PR #8777 which is currently labelled for 5.11.1.

Pull request type

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

Reviewers

@jeromecoutant

`rtc_write` must start the RTC. `time()` uses `rtc_write(0)` to start
the RTC if it is not already enabled, but this check made that not
work.

There's no point trying to optimise this case in a HAL - if we wanted
`set_time()` to protect against users making pointless adjustments, the
implementation should be there. But even then, you might want different
levels of hysteresis depending on application, so it's probably best
left to applications.

This reverts commit 9da5e48.
@0xc0170
Copy link
Contributor

0xc0170 commented Dec 21, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 21, 2018

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@mbed-ci
Copy link

mbed-ci commented Dec 22, 2018

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@adbridge adbridge merged commit 52a45e7 into ARMmbed:master Dec 24, 2018
@kjbracey kjbracey deleted the stm_dont_skip_rtc_write branch January 2, 2019 09:04
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