2023-04-20 05:28 PM - edited 2023-11-20 07:33 AM
STM32F407
Usually the signal is taken from the PH1-OSC_OUT pin if it is a parallel resonant oscillator circuit.
The signal for clocking the microcontroller is formed on the Crystal oscillator X2, fed to the microcontroller and amplified in the microcontroller.
If so, why is PH0-OSC_IN also connected to the microcontroller?
The MCO(PH0-OSC_IN) signal is needed only to generate a signal on the Crystal oscillator X2, why is this signal fed to the microcontroller?
If you disable PH0-OSC_IN from the microcontroller, then the signal from the Crystal oscillator X2 will continue to be fed to the microcontroller via PH1-OSC_OUT.
Why is PH0-OSC_IN connected to the microcontroller then?
Solved! Go to Solution.
2023-05-20 01:52 AM
>From which output of the Crystal oscillator is the signal for clocking the microcontroller taken?
what you ask about ? disco board? ok, i assume: STM32F407G-DISC1
so see manual->schematic -> clk for F407 (osz-in) is coming from st-link F103 (MCO).
as long as F103 is powered and send MCO (8MHz) clk, F407 oszillator and X2 crystal are just "decoration" .
question answered. - ok ?
2023-04-20 10:27 PM
In your 2nd picture there is only a passive crystal which does nothing on its own, only with the MCU's internal "amp" it's becoming an oscillator. Both IN and OUT are needed to create a positive feedback loop to keep it oscillating.
If you are using an external active oscillator (which usually has voltage supply, GND, and an output), then you connect it only to the IN of the MCU - and must set that in software accordingly (HSE_BYPASS or so).
The external active oscillator basically consists of a crystal and the amplifier circuit integrated in the MCU, usually with a stronger driver.
2023-05-19 09:28 PM - edited 2023-11-20 07:34 AM
If this is an input, then why does the Pierce generator need a signal on PH0-OSC_IN?
The Pierce oscillator generates a signal using an inverter, a quartz resonator and capacitors.
2023-05-19
10:08 PM
- last edited on
2023-12-06
05:20 AM
by
Laurids_PETERSE
MCO - Main Clock Output.
I don't understand the signs very well.
MCO should be an output, what does the yellow MCO arrow pointing to the microcontroller mean then?
2023-05-19 11:29 PM
There is such a description, but it is not clear from it exactly where the MCO signal is generated.
The description says: MCO from ST-LINK. MCO generated in ST-LINK?
------------------
MCO from ST-LINK: MCO output of ST-LINK MCU is used as input clock. This frequency cannot be changed, it is fixed at 8 MHz and connected to PF0/PD0/PH0-OSC_IN of STM32 microcontroller.
2023-05-20 12:08 AM
Of course, I may be wrong and most likely it is, but maybe there is an error in the circuit notation and the MCO signal is generated on the Pierce generator in the STM32F407VGT6 microcontroller and then goes to ST_LINK_V2 STM32F103C8T6?
(The description says the opposite: MCO FROM ST-LINK)
When I need to change the frequency, then I need to change the X2 Crystal, and do not disassemble the ST_LINK controller to change the frequency.
But it is strange that it is written that this frequency cannot be changed, because this frequency can be changed if the Crystal is replaced.
2023-05-20 01:52 AM
>From which output of the Crystal oscillator is the signal for clocking the microcontroller taken?
what you ask about ? disco board? ok, i assume: STM32F407G-DISC1
so see manual->schematic -> clk for F407 (osz-in) is coming from st-link F103 (MCO).
as long as F103 is powered and send MCO (8MHz) clk, F407 oszillator and X2 crystal are just "decoration" .
question answered. - ok ?
2023-05-20 02:57 AM
What is X2 for then?
2023-05-20 03:23 AM - edited 2023-11-20 07:34 AM
I soldered R68 out and the 8 MHz signal disappeared on PH0-OSC_IN.
X2 does not start generating signal after the MCO signal is lost.
2023-05-20
03:23 AM
- last edited on
2023-12-06
05:22 AM
by
Laurids_PETERSE
now : useless.
if you remove/de-solder R68 (= disconnect MCO ), X2 + F407 set to external clock are the 8MHz source then.
the designer was probably drunk, because this clk circuit looks like.
also on my F407 board LSE , 32kHz crystal, is fitted, but in diagram is marked as "not fitted" .
on some newer boards the circuit is clear: (nucleo-G0B1RE MB 1360 )
clk coming from st-link MCO and other parts not fitted.
but to try, can fit missing parts and open SB17 , then local crystal is clk source.
on (old) F407 boards this "switch" SB is missing.