2025-09-01 6:53 PM
It was working fine before, but has now stopped working. Upon investigation, we found that the RTC crystal oscillator is not oscillating. It won't return to normal with a reset. An investigation with the crystal oscillator manufacturer found no problems. Debugging showed a timeout at the following code. Do you know what the cause might be?
/* Get Start Tick*/
tickstart = HAL_GetTick();
/* Wait till LSE is ready */
while (READ_BIT(RCC->BDCR1, RCC_BDCR1_LSERDY) == 0U)
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
{
return HAL_TIMEOUT;
}
}