Revert "STM32 RTC : skip rtc_write if possible" #9180
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
rtc_write
must start the RTC.time()
usesrtc_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
Reviewers
@jeromecoutant