Reset and clock control (RCC)
Product voltage
range
Range 1
Range 2
6.2.9
Clock security system (CSS)
Clock Security System can be activated by software. In this case, the clock detector is
enabled after the HSE oscillator startup delay, and disabled when this oscillator is stopped.
If a failure is detected on the HSE clock, the HSE oscillator is automatically disabled, a clock
failure event is sent to the break input of the advanced-control timers (TIM1/TIM8 and
TIM15/16/17) and an interrupt is generated to inform the software about the failure (Clock
Security System Interrupt CSSI), allowing the MCU to perform rescue operations. The CSSI
is linked to the Cortex
Note:
Once the CSS is enabled and if the HSE clock fails, the CSS interrupt occurs and a NMI is
automatically generated. The NMI will be executed indefinitely unless the CSS interrupt
pending bit is cleared. As a consequence, in the NMI ISR user must clear the CSS interrupt
by setting the CSSC bit in the
If the HSE oscillator is used directly or indirectly as the system clock (indirectly means: it is
used as PLL input clock, and the PLL clock is used as system clock), a detected failure
causes a switch of the system clock to the MSI or the HSI16 oscillator depending on the
STOPWUCK configuration in the
disabling of the HSE oscillator. If the HSE clock (divided or not) is the clock entry of the PLL
used as system clock when the failure occurs, the PLL is disabled too.
6.2.10
Clock security system on LSE
A Clock Security System on LSE can be activated by software writing the LSECSSON bit in
the
Control/status register
RTC software reset, or after a failure detection on LSE. LSECSSON must be written after
LSE and LSI are enabled (LSEON and LSION enabled) and ready (LSERDY and LSIRDY
set by hardware), and after the RTC clock has been selected by RTCSEL.
The CSS on LSE is working in all modes except VBAT. It is working also under system reset
(excluding power on reset). If a failure is detected on the external 32 kHz oscillator, the LSE
clock is no longer supplied to the RTC but no hardware action is made to the registers. If the
MSI was in PLL-mode, this mode is disabled.
In Standby mode a wakeup is generated. In other modes an interrupt can be sent to wakeup
the software (see
(RCC_CIFR),
The software MUST then disable the LSECSSON bit, stop the defective 32 kHz oscillator
(disabling LSEON), and change the RTC clock source (no clock or LSI or HSE, with
RTCSEL), or take any required action to secure the application.
190/1693
Table 30. Clock source frequency
MSI
48 MHz
16 MHz
24 MHz range
16 MHz
®
-M4 NMI (Non-Maskable Interrupt) exception vector.
Clock interrupt clear register
Clock configuration register
(RCC_CSR). This bit can be disabled only by a hardware reset or
Clock interrupt enable register
Clock interrupt clear register
DocID024597 Rev 3
Clock frequency
HSI16
HSE
48 MHz
26 MHz
(RCC_CICR).
(RCC_CIER),
(RCC_CICR)).
PLL/PLLSAI1/PLLSAI2
80 MHz
(VCO max = 344 MHz)
26 MHz
(VCO max = 128 MHz)
(RCC_CFGR), and the
Clock interrupt flag register
RM0351
Need help?
Do you have a question about the STM32L4x6 and is the answer not in the manual?