-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32 RTC Init minor update #6723
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
Conversation
targets/TARGET_STM/rtc_api.c
Outdated
@@ -53,7 +53,7 @@ void rtc_init(void) | |||
__HAL_RCC_PWR_CLK_ENABLE(); | |||
HAL_PWR_EnableBkUpAccess(); | |||
|
|||
if (rtc_isenabled()) { | |||
if ( (rtc_isenabled()) && ((RTC->PRER & RTC_PRER_PREDIV_S) == PREDIV_S_VALUE) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not functional change? Why the new flags are being added? This looks like a separate change to the below code move?
Would a separate commit with description help? I think yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this additional check doesn't change the behavior as it checks that the current register configuration is the one according to the code.
Which is true 99% of time, except when you will move from master to/from ticker branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I see it now that PREDIV are being checked.
/morph build |
Build : FAILUREBuild number : 1834 |
4b6f791
to
7b5a79f
Compare
Build issue solved |
/morph build |
Build : SUCCESSBuild number : 1836 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1481 |
Test : SUCCESSBuild number : 1643 |
Description
There is no functional update.
This is mainly to prevent potential issues with CI and all test environnment when the ticker branch will be merged.
Thx
Pull request type