I'm currently designing a PCB based on a STM32 micro-controller (more precisely a STM32F722ZE).
The question is : do I need a high speed clock (or is the internal good enough)? If so, what crystal and what capacitors should I use?
In terms of timing accuracy, the manual gives 1% accuracy for the internal 16MHz RC-clock. Regarding absolute time, I don't care. But will it matter for communication protocols? I'm planning of the STM32 to be a I2C slave, and to control by UART 2 1D lidars; I might in addition use later on the STM32 as I2C or SPI master. No ethernet planed. No direct USB planned (only programming through the ST-Link V2 of a Nucleo board). So do you think I need an external clock (crystal + capacitors).
If I need some, which crystal and capacitors should I use? (Ideally, If you have a reference available for assembly at JLCPCB (through EasyEda), it would be perfect).
So far, what I tried:
the datasheet of the microcontroller: I got from there the information about the 1% accuracy (3.12). There is a bit more info about it at 6.3.9, but it isn't precise enough to enable me to find the right components
the application note about hardware development for the STM32F7 series: a quite useful document for most of the design, but still not precise enough to enable me to find the right crystal + capacitors (they discuss the clock in sections 3, 7.1 and 7.2, but the concrete example (7.1/7.2) only proposes a 25MHz crystal but without specifying which one, nor how to pick the right capacitors for it
there is a whole application note of 36 pages about choosing crystals: I suppose if one manage to understand all of it, one can pick the right crystal + capacitors. But I must admit I didn't understood much of it.
I tried to look at the schematics of the Nucleo development board I use with the same micro-controller, but the clock is provided from another micro-controller instead of using a crystal. I tried with other boards, so far without success (clock provided by other µC, or crystal not available for assembly at JLCPCB)
PS: can you confirm that I don't need the low speed external clock if I don't care about the RTC (real time clock)?
EDIT : so I got the impression from your answers that even if it might work without crystall, I should use on to be sure. So the question is how to choose it. Do you think that one will do (that one comes nearlly for free because it's a "standard" part at manufacturer, for other models they add a labor fee to load the components): https://www.lcsc.com/product-detail/Crystals_Yangxing-Tech-X322525MOB4SI_C9006.html and https://datasheet.lcsc.com/lcsc/2103291203_Yangxing-Tech-X322525MOB4SI_C9006.pdf The datasheets don't give load capacitor, but on the LCSC link, they give 12pF : you think it's safe to go for that number even if it is missing from the datasheet itself?
Then for calculating the value of the load capacitors C1 and C2 (usually C1=C2 from what I understand):
- I need a total load capacitance CL=12pf
- the oscillator choosing guide (section 3.3) gives CL=C1*C2/(C1+C2) + Cs where Cs is the stray capacitor
- hardware development for the STM32F7 series application note (section 3.1.2) gives, if I understand well, Cs=10pF as a rough estimate
- so I get 12pF=C1/2 + 10pF -> C1=4pF Does that seem OK for you? Do you think I can just go allong with the Cs=10pF estimation? (C1 is quite sensitive to it : if Cs is 20% bigger, C1 becomes 0, if Cs is 20% smaller, it doubles C1) Or should I try to find another crystal with bigger load capacitance to be safer?
Once this calculation done, is there anything else to take into account?
For the capacitors, can I take whatever capacitor around 2pF, or should I be carefull about some other factors (tight tolerance? temperature stability? ...)