2013-05-20 03:22 AM
Hello,
I'm currently designing my own schematic based on the STM32F4DISCOVERY board with a STM32F407.
The quartz implanted on this demo board is a 8MHz. But there is a possibility to put a 25Mhz quartz. What is the difference, is the 25MHz quartz more accurate for the system clock ?Thanks !Jean2013-05-20 06:18 AM
Any accuracy difference can be obtained from the oscillator's data sheet. Since the processor frequency is determined by the pll settings. it is possible to run the processor at the same frequency with either oscillator.
The practical difference that occurs with forum participants is that the peripheral library examples are coded for the evaluation board oscillator. Cheers, Hal2013-05-20 09:31 AM
Thanks Hal,
But why is there two different inputs for the quartz ?PH0 & PH1 are for the 8MHz quartz, what are PC14 & PC15 (OSC32_IN & OSC32_OUT) reserved for ? On the STM32F4DISCOVERY schematic we can see that we can add another quartz...Thanks !2013-05-20 09:45 AM
The others are for a 32.768 KHz watch crystal part used by the LSE. If you want the RTC to function from VBAT you must have this watch crystal as the LSI is turned off in STANDBY.
You'll need to review the crystal specs to know the precision. The choice of the MHz HSE will depend greatly on your application and other clock sources. If you have a high precision TCXO for Ethernet or WiFi you might want to use that as a source. This could be because you want your sources to be synchronous (multiple sources will drift wrt each other), or that a specific/magic HSE may be desirable, or routable to other parts of the clock tree. There is an app note on external crystal for the STM32/STM8 which you should review.2013-05-22 08:06 AM
Thanks clive1, I'm gonna read the app note !
2013-05-24 08:18 AM
A 25Mhz crystal is an advantage for designs that use the MII MAC ethernet interface because it's possible to chain the clock out from STM32 and into the PHY (an MII PHY requires a 25Mhz clock input).
2013-05-24 08:53 AM
Indeed.
The F2/F4 designs can push 25 or 50 MHz out the MCOx pins. The PLLI2S on MCO2 being particularly helpful if you don't want to run the core at a multiple of 25/50 MHz. Similarly there are some PHYs which can use a 50 MHz crystal/tcxo and provide a 25 MHz reference. Many factors come into play, most specifically how many sources you want, and if you want to be able to turn them off in power saving modes, etc.