cancel
Showing results for 
Search instead for 
Did you mean: 

HSE versus HSI on nucleo boards

dieter 123
Associate III
Posted on March 31, 2017 at 11:21

Hi

There is a crystal on chip HSI and and the external one HSE.

What are the benefits? When should I use wither one?

I would like to use Nucleo F429ZI for UDP loop back. 

Which clock should I idealy use? Does it make any difference?

Thx

7 REPLIES 7
Nesrine M_O
Lead II
Posted on March 31, 2017 at 11:50

Hi

dieter.dieter

,

-Nesrine-

Posted on March 31, 2017 at 15:18

Hi

one more question:

In case of Ethernet (RMII) would you rather recommend HSE or HSI? Does it matter at all?

Thx

Posted on March 31, 2017 at 15:29

As system clock in STM32 you can use any, as long as the AHB clock is >25MHz, see RCC and ETH chapters of RM0090.

As the 50MHz ETH clock shared with PHY you have to use an external clock source (oscillator or a PHY which can generate the 50MHz clock) - the solution used with MII where the 25MHz clock is generated by the STM32 (of course from a crystal, i.e. HSE) is not recommended with RMII, see the DS.

JW

Posted on April 07, 2017 at 20:49

HSI is not a crystal, likely to be outside the specification for accuracy/stability required for Ethernet.

If you buy one crystal oscillator, get a 50 MHz one and feed it into the OSC_IN of the STM32F4, and out via MCO (PA8) to the ETHERNET PHY

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 09, 2017 at 12:44

Although using HSI may just work, but using an external crystal or even better a crystal oscillator is mandatory if you are going to use communication devices like Ethernet. Things like changes in temperature will change resistor value in RC oscillators and will change oscillation frequency, thus using crystal to stabilize generated frequence is required.

I also recommend using a low frequence external crystal oscillator. This is because using a high speed osillator on the PCB, requires specific considerations in designing tracks and placing ground planes. I think 8MHz crystal would be sufficient. Use internall PLL to multiply input frequency.

Posted on April 09, 2017 at 15:31

The internal rc oscillator can be used whenever the clock tolerances in PVT (process, voltage, temperature) is compatible. For precise timing interfaces such as high bitrate on uart, usb or ethernet, external oscillator becomes into play. Shall the exrernal clock fail, the internal one can kick in and fw manage. On some families such as L4, msi clock enables precise high frequencies from 32768 Hz lse oscillator for usb device use. 

Posted on April 09, 2017 at 19:48

The problem here would be that you'd need to run the CPU at a multiple of 25 or 50 MHz to get the desired output rate. ie 168 or 180 MHz aren't such multiples. And there has been a general argument not to use PLLs for Ethernet clock generation. I'd prefer having a singular clock source, using a TCXO, but designs have all sorts of constraints, cost, power, the ability to switch off subsets of the peripherals, etc.

Tight placement and short traces are important, you're going to have to path 25/50 back and forth to the PHY in any case, and TX/RX signals banging up and down at those rates.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..