cancel
Showing results for 
Search instead for 
Did you mean: 

Why does HAL_RCC_OscConfig return error after exit STOP MODE?

JZhu.13
Associate

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.

3 REPLIES 3
CRica
Associate

Hi,

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

Thanks!!

ebjör.1
Associate

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

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

JW