SAM D21 System Controller (SYSCTRL) Overview

Last modified by Microchip on 2023/11/09 09:01

Module Overview

The System Controller (SYSCTRL) provides a user interface to the clock sources, brownout detectors, on-chip voltage regulator and voltage reference of the device. It is the central control for the SAM device. Through its interface registers, it is possible to enable, disable, calibrate, and monitor all the SYSCTRL sub-peripherals shown in the block diagram.

sysctrl.png

System Driver

The System driver provides an interface for the configuration and management of the device's system relation functionality (such as clocks, reset cause determination, etc.) that is required for all applications. This is not limited to a single peripheral but extends across multiple hardware peripherals. It contains several sub-modules that control one specific aspect of the device.

The following peripherals are used by the System driver:

Voltage References

The various analog modules within the SAM devices (such as AC, ADC, and DAC) require a voltage reference to be configured to act as a reference point for comparisons and conversions. The SAM devices contain multiple references, including an internal temperature sensor and a fixed bandgap voltage source. When enabled, the associated voltage reference can be selected within the desired peripheral where applicable.

System Reset Cause

In some applications, there may be a need to execute a different program flow based on how the device was reset. For example, if the cause of the reset was the Watchdog timer (WDT), this might indicate an error in the application, and a form of error handling or error logging might be needed.

For this reason, an API is provided to retrieve the cause of the last system reset, so that appropriate action can be taken.

Sleep Modes

SAM devices have several sleep modes. The sleep mode controls which clock systems on the device remain enabled or disabled when the device enters a low power sleep mode. The table below lists the clock settings of the different sleep modes.

SleepCPU clockAHB clockAPB clocksClock sourcesSystem clock32 KHzReg modeRAM mod
Idle 0StopRunRunRunRunRunNormalNormal
Idle 1StopStopRunRunRunRunNormalNormal
Idle 2StopStopStopRunRunRunNormalNormal
StandbyStopStopStopStopStopStopLow PowerSource/Drain biasing

Before entering device sleep, one of the available sleep modes must be set. The device automatically wakes up in response to an interrupt being generated or upon any other sleep mode exit condition.

Some peripheral clocks remain enabled during sleep, depending on their configuration. If desired, the modules can remain clocked during sleep to allow them to continue to operate while other parts of the system are powered down to save power.