Skip to main content
Associate
August 12, 2026
Solved

Using Two STM32 IC in one board

  • August 12, 2026
  • 6 replies
  • 97 views

Hello everyone,

I need to design a board featuring two STM32 microcontrollers that must operate in sync. To ensure clock synchronization, I plan to use a single external crystal.

My proposed hardware approach is:

  1. Connect the standard external crystal (HSE) to MCU 1.

  2. Route the MCO (Microcontroller Clock Output) pin of MCU 1 to the OSC_IN pin of MCU 2.

  3. Configure MCU 2 to use HSE Bypass Mode, leaving its OSC_OUT pin floating.

  4. Place a series damping resistor on the trace between MCO and OSC_IN to prevent ringing.

Could you please confirm if this topology is the correct and officially recommended approach for STM32 devices? Thanks in advance for your time and suggestions!

Best answer by Andrew Neil

To ensure clock synchronization, I plan to use a single external crystal.

This will not ensure that the applications run in sync.

You will need to provide some separate application-level synchronisation mechanism.

 

Your proposal will certainly achieve the goal of having the two MCUs running from the same clock source: look at the Nucleo board schematics - this is how the target MCU is clocked from the ST-Link.

But, again, this will not ensure that the applications on the MCUs run in sync.

 

#4 may not be necessary.

 

PS:

 

PPS:

Another way to share a common clock would be to have an external clock source (crystal oscillator, MEMS, whatever) and feed that to both of the STM32s in Bypass mode.

Still won’t synchronise the applications.

6 replies

Andrew Neil
Andrew NeilBest answer
Super User
August 12, 2026

To ensure clock synchronization, I plan to use a single external crystal.

This will not ensure that the applications run in sync.

You will need to provide some separate application-level synchronisation mechanism.

 

Your proposal will certainly achieve the goal of having the two MCUs running from the same clock source: look at the Nucleo board schematics - this is how the target MCU is clocked from the ST-Link.

But, again, this will not ensure that the applications on the MCUs run in sync.

 

#4 may not be necessary.

 

PS:

 

PPS:

Another way to share a common clock would be to have an external clock source (crystal oscillator, MEMS, whatever) and feed that to both of the STM32s in Bypass mode.

Still won’t synchronise the applications.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate
August 12, 2026

Thank you for the detailed clarification, Andrew!

Andrew Neil
Super User
August 12, 2026

You’re welcome.

If your issue is now solved, please mark the solution on the post which provided the answer - not this one!

 

You might want to start a separate thread on the separate issue of how to “synchronise” the applications on two different microcontrollers.

You would need to give more details on what, exactly, you mean by “synchronise” in this particular case…

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
MM..1
Super User
August 12, 2026

Question is , how sync type you require. Long time equal freq is guaranted exactly. If PLL is used on both exist residual jitter. And based on real electric phase is always shifted. For example SPI from STM A is shifted against SPI B on same speed...

LCE
Principal II
August 12, 2026

In case you might need software sync in the future, I would use some extra interface / GPIOs to connect both controllers.

At least one or 2 GPIOs with EXTI enabled on the sync slave, e.g. to reset the SysTick as a simple example.

David Littell
Senior II
August 12, 2026

I’d suggest that the OP’s concept needs a serious re-think.  The implied approach is doomed from the outset by caches, interrupts, and pipelines.