15.4.2 Slow Clock Generator

As soon as VDD3V3 is supplied, both the 32.768 kHz crystal oscillator and the slow RC oscillator are powered, but only the slow RC oscillator is enabled. The slow RC oscillator provides a faster start-up time than the 32.768 kHz crystal oscillator.

The user can select the 32.768 kHz crystal oscillator to be the source of TD_SLCK, as it provides higher accuracy than the slow RC oscillator especially when an RTC is required by the application. The slow crystal oscillator is selected when SUPC_CR.TDXTALSEL=1.

For MD_SLCK clock, the slow RC oscillator is always the source. There is no way to modify the source of this clock. This ensures a reliable monitoring clock for the system due to the monolithic nature of the slow RC oscillator.

The following sequences must be followed to switch from the slow RC oscillator to the 32.768 kHz crystal oscillator:

Case 1: The 32.768 kHz crystal oscillator was not previously enabled.

  1. Start and select the 32.768 kHz crystal oscillator as the source of TD_SLCK by setting SUPC_CR.TDXTALSEL.
  2. The switching of TD_SLCK is effective when TDOSCSEL is set in the Status register (SUPC_SR).
    Note: This flag is set at the end of the 32.768 kHz crystal oscillator start-up period, which can last from a few hundreds of millisecond to a few seconds.

Case 2: The 32.768 kHz crystal oscillator is already enabled.

  1. Select the 32.768 kHz crystal oscillator as the source of TD_SLCK by setting SUPC_CR.TDXTALSEL.
  2. The switching of TD_SLCK is effective when SUPC_SR.TDOSCSEL is set.

The switching time may vary depending on the slow RC oscillator output frequency. The switch of the slow clock source is glitch-free.

Reverting to the slow RC oscillator as the clock source of TD_SLCK is only possible by powering down the selected voltage source of VDDBU (VDD3V3 or VBAT).

The user can also set the 32.768 kHz crystal oscillator in Bypass mode instead of connecting a crystal. In this case, the user has to provide the external clock signal on XIN32. The input characteristics of the XIN32 pin are given in the section “Electrical Characteristics”. To enter Bypass mode, SUPC_MR.OSCBYPASS must be set to 1 before setting TDXTALSEL.