Skip to main content
JZhu.13
Visitor II
March 11, 2020
Question

Why does HAL_RCC_OscConfig return error after exit STOP MODE?

  • March 11, 2020
  • 3 replies
  • 1218 views

Hello all,

 I have an STM32L073 using the HSE to clock and LSE for the RTC. Aalarm A & B interrupt are both activated and the device will wakeup from stop mode by them. It works fine at the most of time, but it returns HAL_ERROR sometimes. I checked the program and found that the macro __HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK in function HAL_RCC_OscConfig(). It is abnormal but I cannot find out the reason.

I think the clock souce will switch to MIS after stop mode and I need to reconfigure it after wakeup. Why it was happened in this case ?

Thanks very much.

This topic has been closed for replies.

3 replies

CRica
Visitor II
May 18, 2020

Hi,

I have the same problem like you. Did you solve?

Thanks!!

ebjör.1
Visitor II
June 23, 2020

Same issue here, usually when i wake up quite quick.

waclawek.jan
Super User
June 23, 2020

Cube/HAL is open source. Instrument the function in question and find out where does it throw the error.

JW