I have build a code of Mcu driver for STM32F407 DISCOVERY board. During Flashing my HSE or HSI works fine but PLL doesn't works on. I will attach the the mcu.c and mai.c file for your reference.
Like @waclawek.jan, I find the coding style impenetrable.
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
To ensure that your clock configuration is correct and to isolate the issue with your controller,
Create a new project with CubeMX then enable your oscillator and configure your clock tree.
After that enable an MCO pin to visualize your clock with analyzer/scope.
To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL