HAL_RCC_OscConfig timeout
On initialisation SystemClock_Config(0 calls the function HAL_RCC_OscConfig() and this generates a timeout on the loop below:
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
/* Check the HSE State */
if(RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
/* Wait till HSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
{
if((uint32_t) (HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
{
return HAL_TIMEOUT; <<------
}
}
Any ideas what could be the cause of this and how to solve it?
thanks
