STM32F412 clock configuration

Even though your SystemClock_Config() function may be executed and setup the correct PLL parameters, if the STM32 HAL / system function for getting the current clock speed (SystemCoreClockUpdate()) returns the wrong value (e.g., because the macro HSE_VALUE is set incorrectly), as happened e.g. here, you will still end up with the wrong speed.

Can you post your exact project files, e.g. as a github repo?