
DocID024597 Rev 5
279/1830
RM0351
Clock recovery system (CRS) (only valid for STM32L496xx/4A6xx devices)
289
7
Clock recovery system (CRS)
(only valid for
STM32L496xx/4A6xx devices)
7.1 Introduction
The clock recovery system (CRS) is an advanced digital controller acting on the internal
fine-granularity trimmable RC oscillator HSI48. The CRS provides a powerful means for
oscillator output frequency evaluation, based on comparison with a selectable
synchronization signal. It is capable of doing automatic adjustment of oscillator trimming
based on the measured frequency error value, while keeping the possibility of a manual
trimming.
The CRS is ideally suited to provide a precise clock to the USB peripheral. In such case, the
synchronization signal can be derived from the start-of-frame (SOF) packet signalization on
the USB bus, which is sent by a USB host at precise 1-ms intervals.
The synchronization signal can also be derived from the LSE oscillator output or it can be
generated by user software.
7.2
CRS main features
•
Selectable synchronization source with programmable prescaler and polarity:
–
External pin
–
LSE oscillator output
–
USB SOF packet reception
•
Possibility to generate synchronization pulses by software
•
Automatic oscillator trimming capability with no need of CPU action
•
Manual control option for faster start-up convergence
•
16-bit frequency error counter with automatic error value capture and reload
•
Programmable limit for automatic frequency error value evaluation and status reporting
•
Maskable interrupts/events:
–
Expected synchronization (ESYNC)
–
Synchronization OK (SYNCOK)
–
Synchronization warning (SYNCWARN)
–
Synchronization or trimming error (ERR)