cancel
Showing results for 
Search instead for 
Did you mean: 

HSI48 and CRS accuracy issue

MJack.1
Associate III

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:

  • CRS enabled and initialised with HAL
  • RELOAD = 4799 ((48000000/1000)-1)
  • 1kHz ref sync input clock is very stable
  • HSI48 calibration value is 32
  • FELIM is 34

Result:

  • On MCO 1 I see 48.100MHz +/-25kHz, constantly darting around. I've checked this on both a 2GHz scope and 500MHz logic analyser. This is nowhere near accurate enough for my application

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

2 REPLIES 2
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
MJack.1
Associate III

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