2020-07-21 08:31 AM
Hi all,
I am using the STM32H755 Nucleo board to test a proof of concept clock recovery solution. I am using the CRS external GPIO sync pin with a 1kHz refclk to synchronise the HSI48, and output the synchronised clock on MCO1. The issue I am having is that the frequency is not reliable.
Here is the set-up:
Result:
I'm reasonably confident that my configuration is correct - the registers reflect the settings.
The user guide makes it sound like the HSI and CRS combination should be far more accurate than this:
The HSI48 oscillator mainly aims at providing a high precision clock to the USB peripheral by means of a special Clock Recovery System (CRS) circuitry, which could use the USB SOF signal, the LSE, or an external signal, to automatically adjust the oscillator frequency on-the-fly, in very small granularity. The HSI48 oscillator is disabled as soon as the system enters Stop or Standby mode. When the CRS is not used, this oscillator is free running and thus subject to manufacturing process variations. That is why each device is factory calibrated by STMicroelectronics to achieve an accuracy of ACCHSI48
Am I expecting too much from the CRS & HSI48, or does it sound as though I've made a mistake somewhere?
Many thanks,
Matt
2020-07-21 03:20 PM
HSI48 is not awesome accuracy. The datasheet guarantees +/- 1% with a trimming step resolution of 0.175%. At 48MHz, this comes to a step resolution of 84 kHz.
The +/- 24kHz is certainly within the tolerance. Not real sure why it's 48.1 instead of 48, but that's only 0.2% off. Maybe the input is off by this much.
If you need better performance than that, I would go to a crystal.
2020-07-22 07:36 AM
Thanks for the reply TDK,
I did some more testing today. The 0.1 offset was actually coming from the ref clk, which was clocked from the HSI. Now that it's using the HSE, the offset is gone.
The CRS appears to be doing it's job, but the HSI48 is so jittery I almost can't believe it's supposed to be like that.. It looks to me like that +/-1% in the datasheet should refer to it's nominal frequency, not the extent of it's jitter?
I would just use an external xtal, but it's the clock recovery system I was interested in and it can only be used to tweak the HSI48 sadly.
Matt