Skip to main content
Pintoo
Associate II
December 7, 2021
Question

is it possible to use another output than MCO to generate an arbitrary clock (16.777216MHz) from an internal PLL block?

  • December 7, 2021
  • 6 replies
  • 2581 views

I want to use a different PLL block than PLL1 to leave PLL1 specific to SYSCLK generation; and for example use PLL2 to generate my arbitrary clock.

I see that SAI blocks use for example PLL2 or PLL3 but I don't know if it is possible to make an arbitrary clock at this speed continuously out of these blocks.

This topic has been closed for replies.

6 replies

Sebastiaan
Associate II
December 7, 2021

Hi,

'Arbitrary' is a confusing word: does it need to be exactly 16.777216 MHz?

For sure you can use the other PLLs and output them on MCO (make sure to select the correct output speed of the GPIOs). So you can get close relatively close to what you want.

If you would share the STM32 MCU type, clock diagram and exact clock requirements, maybe we can give more advice.

Pintoo
PintooAuthor
Associate II
December 7, 2021

Hi, reading the reference manual m0456 v2 (chapter 11.8.6 RCC clock configuration register 1 RCC_CFGR1)),

I understand that only PLL1_r_ck can be used to drive the MCO output, no possibilities to use other PLLs.

Is my understanding correct?

Peter BENSCH
Technical Moderator
December 7, 2021

Correct.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
waclawek.jan
Super User
December 7, 2021

Which STM32?

What hardware? What are the input clocks?

JW

Pintoo
PintooAuthor
Associate II
December 7, 2021

STM32U585

I think using VCXO at 10MHz and use STM internal PLL to increase the frequency to 16,777216 MHz (2^24Hz).

In my system my need is to have a VCXO to lock an ADC sampling clock to an external time reference, the 10MHz is one of common frequencies found in VCXO components.

Peter BENSCH
Technical Moderator
December 7, 2021

The PLLs are freely programmable using the given hardware.

In this specific case, PLL2R is the only PLL that clocks the ADCs. As mentioned, their factors and dividers are fixed by hardware and do not allow a direct generation of 2^24Hz from 10MHz (2^7 * 5^7) when the VCXO is connected to HSE.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Muhammed Güler
Senior III
December 7, 2021

You can find crystal and oscillator at the frequency you want.

If you get an oscillator, you can connect it to the MCU and your other equipment with 100 ohm resistors.

If you get crystal you can set HSE for MCO clock source.You can even do this on STM32F0s with MCO outputs.

Or you need to find an MCU (such as H7 Series) with a 2nd PLL circuit and find out which DIVM DIVN DIVP fracn coefficients will get the frequency you want.

Uwe Bonnes
Chief
December 7, 2021

Having an NCO unit in STM32 could help in some situations.

waclawek.jan
Super User
December 7, 2021

According to RM0456 rev.2 chapter 11.4.6 PLL, the PLLs are fractional, i.e. you might be able to achieve an output frequency close to your target frequency even from 10MHz HSE. We don't know how precise the output has to be and what jitter is tolerable.

> 1/ But can I output this frequency on SAI_SCK or SAI_MCLK for example ?

You should be able to output SAI's input clock (divided by some value, maybe 1) onto SAI_MCLK, but to avoid any unpleasant surprise, you may want to run a quick test on a Nucleo board or similar, before you commit yourself to custom hardware.

JW

Piranha
Principal III
December 26, 2021

Take a look on Si5351 and CS2100. :)

LCE
Principal II
March 8, 2022

Thanks for these!

Interesting that these are advertised as low jitter.

Single freq. MEMS VCXOs have much lower jitter, I recently tested Si515 and SiT3808.

Amazing performance, tested these with the STM32 SAI TX SPDIF and a generated sine, connected to CS8422 (SPDIF RX and SRC) and saw that one's limits concerning noise and THD.