How to set external clock value for STM32F1?
If you are using CubeMX there is a tab dedicated to clock setup. On the left there will be a field for the HSE value. Then you either set the PLLs manually or run the clock solver.