Bug report: PLL configuration in HAL_RCC_OscConfig() returns HAL_ERROR, if HSE is configured and PLL is the system clock source
Working with the STM32F429 Discovery board and STMCube_FW_F4_V1.21.0 I've got the same problem several times.
If I use the main.c provided with the application examples, the code will run into an endless loop after calling HAL_RCC_OscConfig and taking care of the return value.
The program works as expected, if the return value is ignored.
The configuration of the PLL causes this behaviour:
The check, if the PLL is used as system clock source will go to the else path and returns HAL_ERROR. The calling function expects HAL_OK.