cpu/stm32: fix RTC init and disable outputs#7326
Closed
vincent-d wants to merge 2 commits intoRIOT-OS:masterfrom
Closed
cpu/stm32: fix RTC init and disable outputs#7326vincent-d wants to merge 2 commits intoRIOT-OS:masterfrom
vincent-d wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
aabadie
reviewed
Aug 18, 2017
Contributor
aabadie
left a comment
There was a problem hiding this comment.
Changes look valid here. Do you have any advice for testing this (I have a L0 board with me) ?
| /* Configure the RTC PRER */ | ||
| RTC->PRER = RTC_SYNC_PRESCALER; | ||
| RTC->PRER |= (RTC_ASYNC_PRESCALER << 16); | ||
| /* Set 24-h clock */ |
Contributor
There was a problem hiding this comment.
According to the datasheet, this should be done after prescaler configuration.
f54826a to
f16c2e1
Compare
Member
Author
You need a board with Vbackup connected, and do some power down / power up cycles (reboot command is not enough from my experience. You really need to power down). |
haukepetersen
requested changes
Aug 21, 2017
Contributor
haukepetersen
left a comment
There was a problem hiding this comment.
Except the indention the code looks valid to me.
Member
Author
What's wrong with it? |
Contributor
|
nothing, my bad - the diff played a trick no me. So never mind -> ACK |
haukepetersen
approved these changes
Aug 21, 2017
8 tasks
Member
Author
|
Closing as #7504 is reworking the driver in a better way |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes a delay each time the mcu boots.
If the RTC is powered with a V_bckp, there was ~800ms lost in the RTC counter at each power on.
The RTC alternate function outputs are also disabled, to make PC13 usable as gpio.