2017-03-31 02:21 AM
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
2017-03-31 02:50 AM
Hi
dieter.dieter
,-Nesrine-
2017-03-31 08:18 AM
Hi
one more question:
In case of Ethernet (RMII) would you rather recommend HSE or HSI? Does it matter at all?
Thx
2017-03-31 08:29 AM
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
2017-04-07 01:49 PM
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
2017-04-09 05:44 AM
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.
2017-04-09 08:31 AM
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.
2017-04-09 12:48 PM
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.