The AFE20408 features a FLEXIO pin that can be independently configured as a
GPIO or a special function pin. The function performed by the FLEXIO pin depends on
the value written to the FLEXIO_FUNC field of the GEN_CFG_1 register (located in the
General Configuration page of the register map).
On the AFE20408, the following functions are performed by the FLEXIO pin. To
enable FLEXIO special functions on any DAC, the corresponding bits in the FLEXIO_EN
register (located in the DAC Configuration register page) must be set.
- RESET:
When FLEXIO_FUNC is 0x01, the FLEXIO pin acts as an active-low external
reset. This is the default function of the FLEXIO pin
- ALARMOUT: When FLEXIO_FUNC is set to 0x02, the FLEXIO
pin acts as an active-low alarm output. The ALARMOUT
pin is by default active-low, push-pull, but both the active level and the
drive type can be configured by writing to the FLEXIO_OUT_POL and
FLEXIO_OUT_ODE bits; see also Section 7.2.1.4. The
ALARMOUT_SRC registers (addresses 0x48 and 0x49 in the General Configuration
register page) are used to configure the alarms that assert the pin; see
also Section 7.2.
- GPIO: When FLEXIO_FUNC is set
to 0x04, the FLEXIO pin acts as a GPIO pin. The GPIO acts as an output
during write operations, and as an input during read operations. When a GPIO
pin acts as an output, the pin state can be set by writing to the GPIO bit
in the GPIO_DATA register, located in the global register map. As with the
ALARMOUT function, the GPIO output is by default
active-low, push-pull, but both the active level and the drive type can be
configured by writing to the FLEXIO_OUT_POL and FLEXIO_OUT_ODE bits. When a
GPIO pin acts as input, the digital value on the pin is acquired by reading
the GPIO_DATA register address. After a power-on reset or any forced reset,
all GPIO_DATA bits are reset to 1.
- LDAC:
When FLEXIO_FUNC is set to 0x08, the FLEXIO pin acts as a trigger input for
DAC outputs DACA0 and DACA2. Specifically, when these DACs are configured to
operate in synchronous mode, the active data registers for these DACs only
update once the pin has been pulled to logic 0.
- ALARMIN:
When FLEXIO_FUNC is set to 0x10, the FLEXIO pin acts as an active-low alarm
input pin. On the AFE20408, the
ALARMIN inputs can trigger DAC auto-power-down and
OUT pin auto-power-down events by setting the appropriate bits in the
DAC_APD_SRC and OUT_APD_SRC registers, located in the DAC Configuration
register page.
- DRVEN: When FLEXIO_FUNC is
set to 0x20, the FLEXIO pin acts as an additional switch control input
DRVEN2, in addition to the existing DRVEN0 and DRVEN1 pins on the device. By
writing to the respective bits in the FLEXIO_EN register (located in the DAC
Configuration register map) DRVEN2 control can be enabled on any desired
DAC.