STM32F411E Discovery Board Template not working due to clock issues.
So I have two STM32F11E Discovery boards and both have the same problem: When I create a project and choose this exact discovery board from the "Board Selector" so that the template software code is already loaded up and ready to compile, after succesful compilation when I run a simple blink LED programm the software doesn't reach the while loop in main because the clock setup configuration fails even though I have not changed anything except for two lines of code in the while loop which it doesn't even reach.
When I debbug the board it always fails when initiallizing the external 8MHz clock on this line of code SystemClock_Config(). When I look into this function it fails at this line: if(HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) and after looking into this function aswell the exact error source lies here:
/* Wait till HSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
{
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
{
return HAL_TIMEOUT; // Here is where the timeout error occours
}
}
So the way I understand it is that it waits for the external clock until it's ready and for some reason it times out. I am pretty sure the purpose of these templates is that they work out of the box without any tinkering, however I already tried changing the settings in the Clock Configuration tool and everything seems fine there, no warnings, no issues nothing. Additionally I tried setting the wait time for the HSE higher so that any setup time issues can be ruled out. A hardware manufacturing problem is unlikely since I have the same board twice and both have the same issue. So before I set out to debug the whole clock configuration system of this board I would like to hear if anyone already knows of this problem and has a solution already.
