I creating a project with the microcontroller STM32F101C8t. This microcontroller has an internal clock of 36MHz. My question is how to correctly set the external clock value, ie what crystal value should I use. I already set the external clock pins in the STM32CubeMX, now it is necessary to set the correct value for the external clock.
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.
what crystal value should I use
A common value is 8 MHz, but the chip also support other crystals in the range 8 - 32 MHz (if I recall correctly). Next you must calculate loading capacitance in order to make it oscillates stably.
A complete crystal oscillator IC can be used for the sake of convenience.
Depend on what external clock source you use, you must change