AnsweredAssumed Answered

HAL_ERROR in HAL_RCC_OscConfig()

Question asked by Andres Cao on Sep 29, 2017
Latest reply on Oct 4, 2017 by Andres Cao

Hi all!

 

I have an STM32L0 using the HSI to clock at 6MHz, and a LSE for the RTC.

 

Devices goes to sleep (STOP mode) and wakes up just fine.

 

But if I activate the RTC Alarm A interrupt, while restoring clocks I get a HAL_ERROR in the HAL_RCC_OscConfig() function.

 

More precisely here:

 

 

/* Check if the PLL is used as system clock or not */
if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
{

   .....

}

else
{
   return HAL_ERROR;
}

 

 

Any clues into this? 

Thanks!!!

Outcomes