Figure 24. Crs Counter Behavior - ST STM32G4 Series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32G4 Series:
Table of Contents

Advertisement

RM0440
8.4.3
Frequency error measurement
The frequency error counter is a 16-bit down/up counter which is reloaded with the RELOAD
value on each SYNC event. It starts counting down till it reaches the zero value, where the
ESYNC (expected synchronization) event is generated. Then it starts counting up to the
OUTRANGE limit where it eventually stops (if no SYNC event is received) and generates a
SYNCMISS event. The OUTRANGE limit is defined as the frequency error limit (FELIM field
of the CRS_CFGR register) multiplied by 128.
When the SYNC event is detected, the actual value of the frequency error counter and its
counting direction are stored in the FECAP (frequency error capture) field and in the FEDIR
(frequency error direction) bit of the CRS_ISR register. When the SYNC event is detected
during the downcounting phase (before reaching the zero value), it means that the actual
frequency is lower than the target (and so, that the TRIM value must be incremented), while
when it is detected during the upcounting phase it means that the actual frequency is higher
(and that the TRIM value must be decremented).
CRS counter value
RELOAD
OUTRANGE
(128 x FELIM)
WARNING LIMIT
(3 x FELIM)
TOLERANCE LIMIT
(FELIM)
Trimming action:
CRS event:

Figure 24. CRS counter behavior

0
SYNCERR
SYNCWARN
RM0440 Rev 4
Clock recovery system (CRS)
ESYNC
Down
+2
+1
0
-1
SYNCOK
SYNCWARN
Up
Frequency
error counter
stopped
-2
0
SYNCMISS
MSv32122V1
341/2126
349

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32G4 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF