PSoC 6 Peripheral Driver Library
SysAnalog (System Analog Reference Block)

General Description

This driver provides an interface for configuring the Analog Reference (AREF) block and querying the INTR_CAUSE register of the PASS.

The functions and other declarations used in this driver are in cy_sysanalog.h. You can include cy_pdl.h to get access to all functions and declarations in the PDL.

The AREF block has the following features:

The locally generated references are the recommended sources for blocks in the PASS because they have tighter accuracy, temperature stability, and lower noise than the SRSS references. The SRSS references can be used to save power if the low accuracy and higher noise can be tolerated.


The outputs of the AREF are consumed by multiple blocks in the PASS and by the CapSense (CSDv2) block. In some cases, these blocks have the option of using the references from the AREF. This selection would be in the respective drivers for these blocks. In some cases, these blocks require the references from the AREF to function.

VREF optional optional optional
IZTAT required optional optional
IPTAT required

This driver provides a function to query the INTR_CAUSE register of the PASS. There are two interrupts in the PASS:

  1. one global interrupt for all CTBs (up to 4)
  2. one global interrupt for all CTDACs (up to 4)

Because the interrupts are global, the INTR_CAUSE register is needed to query which hardware instance triggered the interrupt.



To configure the AREF, call Cy_SysAnalog_Init and provide a pointer to the configuration structure, cy_stc_sysanalog_config_t. Three predefined structures are provided in this driver to cover a majority of use cases:

After initialization, call Cy_SysAnalog_Enable to enable the hardware.

Deep Sleep Operation

The AREF current and voltage references can be enabled to operate in Deep Sleep mode with Cy_SysAnalog_SetDeepSleepMode. There are four options for Deep Sleep operation:

Recall that the CTB requires the IPTAT reference. For the CTB to operate at the 1 uA current mode in Deep Sleep mode, the AREF must be enabled for CY_SYSANALOG_DEEPSLEEP_IPTAT_IZTAT_VREF. For the CTB to operate at the 100 nA current mode in Deep Sleep mode, the AREF must be enabled for CY_SYSANALOG_DEEPSLEEP_IPTAT_2 minimum. In this lower current mode, the AREF IPTAT must be redirected to the CTB IZTAT. See the high level function Cy_CTB_SetCurrentMode in the CTB PDL driver.

If the CTDAC is configured to use the VREF in Deep Sleep mode, the AREF must be enabled for CY_SYSANALOG_DEEPSLEEP_IPTAT_IZTAT_VREF.

The SRSS references are not available to the AREF in Deep Sleep mode. When operating in Deep Sleep mode, the local or external references must be selected.

More Information

For more information on the AREF, refer to the technical reference manual (TRM).

MISRA-C Compliance]

This driver does not have any specific deviations.


VersionChangesReason for Change
1.10.1 Minor documentation updates. Documentation enhancement.
1.10 Flattened the organization of the driver source code into the single source directory and the single include directory. Driver library directory-structure simplification.
Added register access layer. Use register access macros instead of direct register access using dereferenced pointers. Makes register access device-independent, so that the PDL does not need to be recompiled for each supported part number.
1.0 Initial version

API Reference

 Global Variables
 Data Structures
 Enumerated Types