2018-05-23 11:07 PM
On a board I have stm32f3 and stm32f0, they are close and space is limited, I would like to share a single 8mhz crystal across both mcu, I would like somebody to simply indicate to me proper pinout so I may finish a pcb and debug the software later thank you
I understand that the f3 will have the external crystal connected to it and will drive one of its ouput to a dedicated input pin on the f0, thus the f0 will be receiving a purely digital clock just as accurate, but wich pins will be involved in this process?
As in this post?
2018-05-23 11:16 PM
this is the recommended way to share a crystal.
2018-05-23 11:27 PM
Ok I see that my M0 will be receiving something at OSC_IN pin, that covers 1 end of the connection.
But the f3, is it gonna be absolutely 'Master clock output' pin??
2018-05-23 11:36 PM
If both processors are on the one PCB,
You could just run one crystal 8MHz on one processor
and from the OSC_out pin, close to the pin, put the 100R-10k resistor feed into the OSC-In on the other processor.
You would better to test the circuit before you lay out the PCB.
only necessary if you have USB peripherals or need the RTC.
Otherwise you don't need either crystal.
2018-05-23 11:59 PM
I honestly prefer keeping the crystal circuit intact and just feed from MCO, master clock output, of the correct GPIO pin that performs such a task.
To deal with such and such constraints for the crystal circuit double loading is not what I had in mind.
I already use a 4 PAD SMD passive crystal that is 8mhz and 0.75$.
It seems this is possible and has been done before.
Thus I have contradicting info.
Quote from link
What I have done when I needed to share a clock between micros is to have the crystal drive the oscillator on one micro and then use the oscillator output pin (typically CLKOUT or OSCOUT) from that micro to drive the second micro.
I would expect problems trying to drive two oscillators from the same crystal, if for no other reason than that the capacitance of the long PCB traces required to go between the two processors would cause a malfunction.
________________ Attachments : cOAQ0.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxZ0&d=%2Fa%2F0X0000000azv%2FNFvnbcDzINHit8VGEs9PTAmqYNgpboFPxpxK9WIV0kw&asPdf=false2018-05-24 12:15 AM
feed from MCO is the best result
is it divide by two ?
2018-05-24 01:47 AM
Exactly, I have 2 x usb device across 2x very inexpensive chips. internal oscillator is not accurate enough.
Both MCU's are very close by, a 100r resistor in series is no problem.
OSC out, are you sure?
2018-05-24 01:54 AM
The loading on OSC_out cannot be capacitive.
a 1k may work just as well, I would try the 1k first.
then lick your finger,
place damp finger on the OscIn of the second processor.
and see if you can stop it easily of not.
The value 100R was recommended in an obscure document.
2018-05-24 02:46 AM
No, it gives divide by 1.
I just discovered this.
So now, would it be ok to use this mco pin for a 3rd mcu, that is like 4 inches away?
I guess if I run with medium speed rise tme I can use this.
2018-05-24 02:52 AM
Feeding one MCU from the MCO signal of the other has one disadvantage, as I see it. The second MCU receives it's proper clock signals only when the first has finished it's clock setup. With the ST-Link at the Discoveries/Nucleos, this is usually guaranteed.
This might not pose a problem, though.
Else one could use an external quartz driver chip, to feed both in parallel. Pretty sure those exist (I'm no hardware guy ...)
BTW, 50 is not divisible by 8 without remainder. Just in case you want to use USB or ethernet.