Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
avtolstoy authored and keeramis committed Sep 28, 2021
1 parent 8f2af29 commit 3a26233
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hal/src/stm32f2xx/rtc_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ static bool hal_rtc_enable_lse() {

static bool hal_rtc_switch_clock_source(uint32_t source)
{
#if HAL_PLATFORM_INTERNAL_LOW_SPEED_CLOCK
if ((RCC->BDCR & RTC_CLOCK_SOURCE_MASK) != (source & RTC_CLOCK_SOURCE_MASK) && (RCC->BDCR & RTC_CLOCK_SOURCE_MASK) != 0x000)
{
// Unforunately the only way to reconfigure clock source is to reset
Expand Down Expand Up @@ -256,6 +257,7 @@ static bool hal_rtc_switch_clock_source(uint32_t source)
HAL_enable_irq(state);
}
else
#endif // HAL_PLATFORM_INTERNAL_LOW_SPEED_CLOCK
{
if (source == RCC_RTCCLKSource_LSE) {
if (!hal_rtc_enable_lse()) {
Expand Down

0 comments on commit 3a26233

Please sign in to comment.