Skip to main content
Associate II
April 17, 2024
Solved

STM32F4 OSC Problem

  • April 17, 2024
  • 3 replies
  • 5543 views

Hi everyone

I'm currently using the NUCLEO-F429ZI development board. I'm planning to create a PCB using the STM32F429ZIT6, but I've encountered some questions during the planning stage.

  1. According to the datasheet, HSE_OSC is specified to provide 8MHz, and CubeIDE also indicates "Input Freq HSE = 8MHz." However, on the NUCLEO-F429ZI development board, the JFVNY 25.000 oscillator supplies 25MHz. I have verified that the SPI clock indeed derives from multiplying and dividing an 8MHz source, but when I measure the JFVNY 25.000 oscillator on the development board, it does indeed supply 25MHz. Why are these two frequencies inconsistent, or am I misunderstanding something?
  2. Referring to the Clock tree and considering, if not using the RTC section, is it possible to omit providing the external LSE_OSE?
This topic has been closed for replies.
Best answer by Andrew Neil

@Scarlet wrote:


Okay, I will research the differences between the two.


Unfortunately, the link in that AVRFreaks post that I referenced seems to be broken.

But here is a description of what's inside a Crystal Oscillator:

https://www.avrfreaks.net/s/topic/a5C3l000000UcE1EAK/t160729

As you can see, an oscillator is a complete active electronic circuit:

 

AndrewNeil_1-1713513145485.png

It contains a crystal plus  all the active circuitry necessary to make it oscillate and give a nice, clean digital clock signal as output.

 

The crystal itself is just a passive component:

 

AndrewNeil_3-1713513282266.png

it requires extra active electronic circuitry to make it oscillate.

In the case of a microcontroller, the oscillator  circuitry is usually inside the microcontroller chip (eg, the HSE within the STM32) - so you just need to provide the crystal externally.

 

Update:

From an article from SiTime describing the difference between a crystal oscillator (XO) and just a crystal (XTAL):

AndrewNeil_1-1730305596522.png

 

https://www.sitime.com/company/newsroom/articles/do-you-know-when-use-crystal-or-oscillator-wrong-answer-can-cost-you

 

#CrystalVsOscillator #OscillatorVsCrystal

 

3 replies

Tesla DeLorean
Guru
April 17, 2024

Sure that's not driving the Ethernet PHY?

I might check the schematic later.

Check the EVAL or DISCO boards, the might use a 25 MHz clock.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ScarletAuthor
Associate II
April 17, 2024

I think I misunderstood. In the UM1974 User Manual, it states that "JFVNY 25.000" is the X4 oscillator. Although it doesn't specify what part of the oscillation it provides, the document indicates that X3 is the HSE oscillator.

Andrew Neil
Super User
April 17, 2024

@Scarlet wrote:

In the UM1974 User Manual, it states that "JFVNY 25.000" is the X4 oscillator. 


Does it?

I don't see "JFVNY" mentioned anywhere in that document:

AndrewNeil_1-1713363587461.png

I also don't see "X4" anywhere.

That's Rev 10 (Aug 2023) - What revisions of board & manual do you have?

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.
Andrew Neil
Super User
April 17, 2024

@Scarlet wrote:
  1. According to the datasheet, HSE_OSC is specified to provide 8MHz, ?

That'll be when it's used as an oscillator - with an external crystal.

 


@Scarlet wrote:
  1. However, on the NUCLEO-F429ZI development board, the JFVNY 25.000 oscillator supplies 25MHz?

There you're using an external oscillator, and just feeding a clock signal into the chip - bypassing the chip's own HSE oscillator.

 

EDIT:

The datasheet actually says that the HSE Oscillator can do 4-26 MHz:

AndrewNeil_0-1713358053122.png

AndrewNeil_1-1713358108718.png

 

With an external oscillator - ie, bypassing HSE - the clock input can be 1-50 MHz:

AndrewNeil_2-1713358191853.png

AndrewNeil_3-1713358238207.png

 

 

 

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.
ScarletAuthor
Associate II
April 17, 2024

Yes, I saw in the datasheet that it states "the HSE Oscillator can do 4-26 MHz."

To avoid affecting other timing, I'll start with setting the input HSE to 8MHz as indicated in the IDE. I'll further study the external oscillator section.

Although I have high-speed requirements, I'm currently limited by the SPI maximum timing of 45MHz. I'm not sure if an external oscillator can help me increase the speed.

Thank you very much.

mƎALLEm
ST Technical Moderator
April 17, 2024

Although I have high-speed requirements, I'm currently limited by the SPI maximum timing of 45MHz. I'm not sure if an external oscillator can help me increase the speed.

PLL is there to do that. No need to increase the Crystal frequency to boost the one of the system.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
mƎALLEm
ST Technical Moderator
April 17, 2024

Hello,


  1. According to the datasheet, HSE_OSC is specified to provide 8MHz,

Could you please indicate the page or a screenshot of the page? 8MHz could be generated by the STLink MCO and used in BYPASS mode from your target MCU.

As stated by @Andrew Neil the datasheet indicates that HSE could be in the range of 4-26MHz.

  1. However, on the NUCLEO-F429ZI development board, the JFVNY 25.000 oscillator supplies 25MHz. I have verified that the SPI clock indeed derives from multiplying and dividing an 8MHz source, but when I measure the JFVNY 25.000 oscillator on the development board, it does indeed supply 25MHz.

According to the schematics there is no even the crystal PCB footprint on the board of the HSE. Could you please tell us which from which reference you did conclude this information. Could it be X3 (the crystal used for the ethernet PHY?

SofLit_0-1713361713841.png

 


Referring to the Clock tree and considering, if not using the RTC section, is it possible to omit providing the external LSE_OSE?

Yes and you can use PC14(OSC32_IN) and PC15(OSC32_OUT) as GPIOs if you remove R37 and R38.

 

Edit: "no even the crystal PCB footprint on the board of the HSE" Yes it does but no restriction to populate it with 25MHz crystal.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
ScarletAuthor
Associate II
April 17, 2024


Could you please indicate the page or a screenshot of the page?

 



I found the "Input Freq HSE 8MHz" setting in the CubeIDE Clock Config. I don't have the development environment at hand currently, but I'll provide a screenshot of the source later.

 


8MHz could be generated by the STLink MCO and used in BYPASS mode from your target MCU.

So I can use STLink to program the microcontroller without providing an external oscillator externally?

However, the MCU requires an HSE of 8MHz for execution. Right?

 


According to the schematics there is no even the crystal PCB footprint on the board of the HSE. Could you please tell us which from which reference you did conclude this information. Could it be X3 (the crystal used for the ethernet PHY?

Yes, I mistook X4 for the HSE OSC. I found in the UM1974 User Manual that X3 is the HSE OSC. However, I'm still unclear about the meaning of 'not provided'. 

Scarlet_0-1713364809450.png

 

Andrew Neil
Super User
April 18, 2024

@Scarlet wrote:

My current understanding is that there is no X3 OSC on the development board, and the 8MHz is currently provided by the STLink. Right!?


Again, X3 is just a crystal - it's not an oscillator:

  • The oscillator is within the STM32 - so that is always present;
  • The crystal needs to be provided externally - it is not present on the NUCLEO-F429ZI board.

https://www.avrfreaks.net/s/topic/a5C3l000000UYYQEA4/t146620?comment=P-1401006

 


@Scarlet wrote:

 the 8MHz is currently provided by the STLink. Right!?


Yes.

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.