Analog Pins

Description

General-purpose analog pins, for use with analog peripherals

This resource implements a single or an array of analog pins, for use with the analog peripheral modules. The pins are mapped in the I/O Mapping Panel .

When the SCIF driver is initialized, the pins are configured to operate in analog mode, but are not yet connected physically to the peripherals. The connection is done at run-time by calling one of the following procedures from task code:

  • adcSelectGpioInput() : Selects external input for ADC (and COMPB)
  • compaSelectGpioInput() : Selects external input for COMPA (and output for ISRC)
  • compaSelectGpioRef() : Selects external reference for COMPA

When the SCIF driver is uninitialized, the pins are returned to the MCU domain GPIO module, with no pull. Note that the uninitialization does not modify the GPIO module’s output enable settings, and it is assumed that the pins have not been configured as outputs.

Name and Label

A short name and a descriptive label must be specifed for each I/O usage:

  • The name is used for references in task code, for example as parameter to compaSelectGpioRef() . For a name XYZ:
    • If selecting accessed by constant , a single constant AUXIO_A_XYZ is created automatically
    • If selecting accessed by look-up table , a data structure member cfg.pAuxioAXyz[] is created automatically
  • The label is displayed in the I/O Mapping Panel , and is also used in automatically generated code documentation

Examples

Selecting ADC Input

// Select ADC (and COMPB) input
adcSelectGpioInput(AUXIO_A_SIGNAL);

Procedures Overview

None.

Constants

None.

Global Variables

None.

Procedures

None.