327
SAM4CP [DATASHEET]
43051E–ATPL–08/14
20.4
Supply Controller Functional Description
20.4.1 Supply Controller Overview
The device can be divided into two power supply areas:
The backup VDDBU_SW power supply that includes the Supply Controller, a part of the Reset Controller, the slow
clock switch, the general-purpose backup registers, the supply monitor and the clock which includes the Real-time
Timer and the Real-time Clock
The core power supply that includes the other part of the Reset Controller, the Brownout Detector, the processor,
the SRAM memory, the Flash memory and the peripherals
The Supply Controller (SUPC) controls the core power supply. The SUPC intervenes when the VDDBU_SW power
supply rises (when the system is starting) or when the backup low-power mode is entered.
The SUPC also integrates the slow clock generator which is based on a 32 kHz crystal oscillator and an embedded
32 kHz RC oscillator. The slow clock defaults to the RC oscillator, but the software can enable the crystal oscillator and
select it as the slow clock source.
The Supply Controller and the VDDBU_SW power supply have a reset circuitry based on a zero-power power-on reset
cell. The zero-power power-on reset allows the SUPC to start properly as soon as the VDDBU_SW voltage becomes
valid.
At start-up of the system, once the backup voltage VDDBU_SW is valid and the embedded 32 kHz RC oscillator is
stabilized, the SUPC starts up the core voltage regulator and ties the SHDN pin to VDDBU.Once the VDDCORE voltage
is valid, it releases the system reset signal (vddcore_nreset) to the RSTC. The RSTC module then releases the
sub-system 0 reset signals (proc_nreset and periph_nreset). Note that the sub-system 1 remains in reset after
power-up.
Once the system has started, the user can program a supply monitor and/or a brownout detector. If a powerfail condition
occurs on either VDDIO or on VDDCORE power supplies, the SUPC asserts the system reset signal (vddcore_nreset).
This signal is released when the powerfail condition is cleared.
When the backup low-power mode is entered, the SUPC sequentially asserts the system reset signal and disables the
voltage regulator, in order to maintain only the VDDBU_SW power supply. Current consumption is reduced to less than
one microamp for the backup part retention. Exit from this mode is possible on multiple wake-up sources including an
event on the FWUP pin or WKUPx pins, or a clock alarm. To exit this mode, the SUPC operates in the same way as
system start-up, in particular, the SUPC starts by enabling the core voltage regulator and the SHDN pin.
20.4.2 Slow Clock Generator
The Supply Controller embeds a slow clock generator that is supplied with the VDDBU_SW power supply. As soon as
the VDDBU_SW is supplied, both the crystal oscillator and the embedded RC oscillator are powered up, but only the
embedded RC oscillator is enabled. This allows the slow clock to be valid in a short time (about 100
μ
s).
The user can select the crystal oscillator to be the source of the slow clock, as it provides a more accurate frequency.
The command is executed by writing the Supply Controller Control register (SUPC_CR) with the XTALSEL bit at 1,
resulting in the following sequence:
1.
The crystal oscillator is enabled.
2.
A number of slow RC oscillator clock periods is counted to cover the start-up time of the crystal oscillator (refer to
the electrical characteristics for information on 32 kHz crystal oscillator start-up time).
3.
The slow clock is switched to the output of the crystal oscillator.
4.
The RC oscillator is disabled to save power.
The switching time may vary depending on the slow RC oscillator clock frequency range. The switch of the slow clock
source is glitch-free. The OSCSEL bit of the Supply Controller Status register (SUPC_SR) indicates when the switch
sequence is finished.
Coming back on the RC oscillator is only possible by shutting down the VDDBU_SW power supply.
If the user does not need the crystal oscillator, the XIN32 and XOUT32 pins should be left unconnected.
The user can also set the 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 electrical