Driverlib PGA API

Module: Driverlib (AM13E230X) APIs

Structures

Name

struct

DL_PGA_FilterConfig
Filter configuration structure.

struct

DL_PGA_ChopperConfig
Chopper configuration structure.

struct

DL_PGA_Config
Main configuration structure for the PGA.

Types

Name

enum

DL_PGA_GAIN_VALUE { DL_PGA_GAIN_1 = 0x0U, DL_PGA_GAIN_2 = 0x20U, DL_PGA_GAIN_4 = 0x40U, DL_PGA_GAIN_8 = 0x60U, DL_PGA_GAIN_16 = 0x80U, DL_PGA_GAIN_32 = 0xA0U, DL_PGA_GAIN_64 = 0xC0U}
PGA Gain Values.

enum

DL_PGA_LOW_PASS_RESISTOR_VALUE { DL_PGA_LOW_PASS_FILTER_DISABLED = 0U, DL_PGA_LOW_PASS_FILTER_RESISTOR_50_OHM = 2U, DL_PGA_LOW_PASS_FILTER_RESISTOR_100_OHM = 4U, DL_PGA_LOW_PASS_FILTER_RESISTOR_200_OHM = 6U, DL_PGA_LOW_PASS_FILTER_RESISTOR_400_OHM = 8U, DL_PGA_LOW_PASS_FILTER_RESISTOR_800_OHM = 10U}
PGA Low Pass Filter Resistor Values.

enum

DL_PGA_PMUX_INPUT { DL_PGA_PMUX_INP0 = 0x00U, DL_PGA_PMUX_INP1 = 0x01U, DL_PGA_PMUX_INP2 = 0x02U, DL_PGA_PMUX_INP3 = 0x03U, DL_PGA_PMUX_INP4 = 0x04U, DL_PGA_PMUX_INP5 = 0x05U, DL_PGA_PMUX_INP6 = 0x06U, DL_PGA_PMUX_INP7 = 0x07U, DL_PGA_PMUX_INP8 = 0x08U}
PGA PMUX Input Selection.

enum

DL_PGA_NMUX_INPUT { DL_PGA_NMUX_RTOP = 0x00U, DL_PGA_NMUX_RTAP = 0x01U, DL_PGA_NMUX_INM0 = 0x02U, DL_PGA_NMUX_INM1 = 0x03U, DL_PGA_NMUX_INM2 = 0x04U, DL_PGA_NMUX_INM3 = 0x05U}
PGA NMUX Input Selection.

enum

DL_PGA_MMUX_INPUT { DL_PGA_MMUX_NAKED_OPAMP = 0x00U, DL_PGA_MMUX_NON_INVERTING_GAIN_VSSA = 0x01U, DL_PGA_MMUX_INM0 = 0x02U, DL_PGA_MMUX_INM1 = 0x03U, DL_PGA_MMUX_INM2 = 0x04U, DL_PGA_MMUX_INM3 = 0x05U, DL_PGA_MMUX_INM4 = 0x06U, DL_PGA_MMUX_INM5 = 0x07U}
PGA MMUX Input Selection.

enum

DL_PGA_CHOP { DL_PGA_CHOP_DISABLED = 0x00U, DL_PGA_CHOP_ADC_ASSISTED_ADCSOC = 0x02U, DL_PGA_CHOP_ADC_ASSISTED_EXTCTRL = 0x03U}
PGA Chopping Mode Selection.

Functions

Name

__STATIC_INLINE void

DL_PGA_enable(PGA_Regs * pga)
Enables the Programmable Gain Amplifier (PGA)

__STATIC_INLINE void

DL_PGA_disable(PGA_Regs * pga)
Disables the Programmable Gain Amplifier (PGA)

__STATIC_INLINE void

DL_PGA_setGain(PGA_Regs * pga, DL_PGA_GAIN_VALUE gainValue)
Sets the Programmable Gain Amplifier (PGA) gain value.

__STATIC_INLINE void

DL_PGA_setFilterResistor(PGA_Regs * pga, DL_PGA_LOW_PASS_RESISTOR_VALUE resistorValue)
Sets the PGA output filter resistor value.

__STATIC_INLINE void

DL_PGA_enableOutput(PGA_Regs * pga)
Enables the PGA output on the pin.

__STATIC_INLINE void

DL_PGA_disableOutput(PGA_Regs * pga)
Disables the PGA output on the pin.

__STATIC_INLINE void

DL_PGA_enableInternalGainOutput(PGA_Regs * pga)
Enables PGA internal gain output on the pin.

__STATIC_INLINE void

DL_PGA_disableInternalGainOutput(PGA_Regs * pga)
Disables PGA internal gain output on the pin.

__STATIC_INLINE void

DL_PGA_enableExternalChop(PGA_Regs * pga)
Enables the external chopping signal for the PGA.

__STATIC_INLINE void

DL_PGA_disableExternalChop(PGA_Regs * pga)
Disables the external chopping signal for the PGA.

__STATIC_INLINE void

DL_PGA_selectPMUXInput(PGA_Regs * pga, DL_PGA_PMUX_INPUT pmuxInput)
Selects PGA positive input mux source.

__STATIC_INLINE void

DL_PGA_selectNMUXInput(PGA_Regs * pga, DL_PGA_NMUX_INPUT nmuxInput)
Selects PGA negative input multiplexer (NMUX) source.

__STATIC_INLINE void

DL_PGA_selectMMUXInput(PGA_Regs * pga, DL_PGA_MMUX_INPUT mmuxInput)
Selects the input source for the M-Mux.

__STATIC_INLINE void

DL_PGA_enableFeedbackOnPin(PGA_Regs * pga)
Enable feedback to PGA negative input pin.

__STATIC_INLINE void

DL_PGA_disableFeedbackOnPin(PGA_Regs * pga)
Disable feedback to PGA negative input pin.

__STATIC_INLINE void

DL_PGA_chop(PGA_Regs * pga, DL_PGA_CHOP chop)
Selects PGA chop mode.

__STATIC_INLINE uint16_t

DL_PGA_getRevision(PGA_Regs * pga)
Returns the PGA revision number.

__STATIC_INLINE uint16_t

DL_PGA_getType(PGA_Regs * pga)
Returns the PGA type number.

__STATIC_INLINE void

DL_PGA_lockRegisters(PGA_Regs * pga, uint16_t registerType)
Locks PGA registers.

void

DL_PGA_initParamsSetDefault(DL_PGA_Config * config)
Initializes the PGA configuration parameters.

void

DL_PGA_init(PGA_Regs * pga, DL_PGA_Config * config)
Initializes the PGA module.

Defines

Name

DL_PGA_REG_LOCK_PGACTL
PGA Control Register Lock.

DL_PGA_REG_LOCK_MUXSEL
PGA Multiplexer Selection Register Lock.

Types Documentation

enum DL_PGA_GAIN_VALUE

Enumerator

Value

Description

DL_PGA_GAIN_1

0x0U

PGA gain value of 1

DL_PGA_GAIN_2

0x20U

PGA gain value of 2 or -1

DL_PGA_GAIN_4

0x40U

PGA gain value of 4 or -3

DL_PGA_GAIN_8

0x60U

PGA gain value of 8 or -7

DL_PGA_GAIN_16

0x80U

PGA gain value of 16 or -15

DL_PGA_GAIN_32

0xA0U

PGA gain value of 32 or -31

DL_PGA_GAIN_64

0xC0U

PGA gain value of 64 or -63

PGA Gain Values.

enum DL_PGA_LOW_PASS_RESISTOR_VALUE

Enumerator

Value

Description

DL_PGA_LOW_PASS_FILTER_DISABLED

0U

Low pass filter disabled (open circuit)

DL_PGA_LOW_PASS_FILTER_RESISTOR_50_OHM

2U

Resistor value of 50 Ohm

DL_PGA_LOW_PASS_FILTER_RESISTOR_100_OHM

4U

Resistor value of 100 Ohm

DL_PGA_LOW_PASS_FILTER_RESISTOR_200_OHM

6U

Resistor value of 200 Ohm

DL_PGA_LOW_PASS_FILTER_RESISTOR_400_OHM

8U

Resistor value of 400 Ohm

DL_PGA_LOW_PASS_FILTER_RESISTOR_800_OHM

10U

Resistor value of 800 Ohm

PGA Low Pass Filter Resistor Values.

enum DL_PGA_PMUX_INPUT

Enumerator

Value

Description

DL_PGA_PMUX_INP0

0x00U

PGA_INP0 as non-inverting input

DL_PGA_PMUX_INP1

0x01U

PGA_INP1 as non-inverting input

DL_PGA_PMUX_INP2

0x02U

PGA_INP2 as non-inverting input

DL_PGA_PMUX_INP3

0x03U

PGA_INP3 as non-inverting input

DL_PGA_PMUX_INP4

0x04U

PGA_INP4 as non-inverting input

DL_PGA_PMUX_INP5

0x05U

PGA_INP5 as non-inverting input

DL_PGA_PMUX_INP6

0x06U

PGA_INP6 as non-inverting input

DL_PGA_PMUX_INP7

0x07U

PGA_INP7 as non-inverting input

DL_PGA_PMUX_INP8

0x08U

PGA_INP8 as non-inverting input

PGA PMUX Input Selection.

enum DL_PGA_NMUX_INPUT

Enumerator

Value

Description

DL_PGA_NMUX_RTOP

0x00U

RTOP (Inter Gain Resistor Tap Point) as inverting input

DL_PGA_NMUX_RTAP

0x01U

RTAP (Pre Gain Resistor Tap Point) as inverting input

DL_PGA_NMUX_INM0

0x02U

PGA_INM0 as inverting input

DL_PGA_NMUX_INM1

0x03U

PGA_INM1 as inverting input

DL_PGA_NMUX_INM2

0x04U

PGA_INM2 as inverting input

DL_PGA_NMUX_INM3

0x05U

PGA_INM3 as inverting input

PGA NMUX Input Selection.

enum DL_PGA_MMUX_INPUT

Enumerator

Value

Description

DL_PGA_MMUX_NAKED_OPAMP

0x00U

Stand alone op-amp or G=1 mode select

DL_PGA_MMUX_NON_INVERTING_GAIN_VSSA

0x01U

Non-Inverting gain mode select, feeback resistors have path to VSSA

DL_PGA_MMUX_INM0

0x02U

Inverting gain mode select, feedback resistors have path to local PGA_INM0 pin

DL_PGA_MMUX_INM1

0x03U

Inverting gain mode select, feedback resistors have path to local PGA_INM1 pin

DL_PGA_MMUX_INM2

0x04U

Inverting gain mode select, feedback resistors have path to local PGA_INM2 pin

DL_PGA_MMUX_INM3

0x05U

Inverting gain mode select, feedback resistors have path to local PGA_INM3 pin

DL_PGA_MMUX_INM4

0x06U

Inverting gain mode select, feedback resistors have path to global PGA_INMx pin

DL_PGA_MMUX_INM5

0x07U

Inverting gain mode select, feedback resistors have path to global PGA_INMx pin

PGA MMUX Input Selection.

enum DL_PGA_CHOP

Enumerator

Value

Description

DL_PGA_CHOP_DISABLED

0x00U

Chopping is disabled

DL_PGA_CHOP_ADC_ASSISTED_ADCSOC

0x02U

ADC assisted chop using ADC Start of Conversion (SOC)

DL_PGA_CHOP_ADC_ASSISTED_EXTCTRL

0x03U

ADC assisted chop using External PGA Chop Control Signal

PGA Chopping Mode Selection.

Functions Documentation

function DL_PGA_enable

__STATIC_INLINE void DL_PGA_enable(
    PGA_Regs * pga
)

Enables the Programmable Gain Amplifier (PGA)

Parameters:

  • pga Pointer to the register overlay for the peripheral

function DL_PGA_disable

__STATIC_INLINE void DL_PGA_disable(
    PGA_Regs * pga
)

Disables the Programmable Gain Amplifier (PGA)

Parameters:

  • pga Pointer to the register overlay for the peripheral

function DL_PGA_setGain

__STATIC_INLINE void DL_PGA_setGain(
    PGA_Regs * pga,
    DL_PGA_GAIN_VALUE gainValue
)

Sets the Programmable Gain Amplifier (PGA) gain value.

Parameters:

  • pga Pointer to the register overlay for the peripheral

  • gainValue The gain value to be set, from the DL_PGA_GAIN_VALUE

This API sets the gain value for the PGA.

function DL_PGA_setFilterResistor

__STATIC_INLINE void DL_PGA_setFilterResistor(
    PGA_Regs * pga,
    DL_PGA_LOW_PASS_RESISTOR_VALUE resistorValue
)

Sets the PGA output filter resistor value.

Parameters:

Note: Setting DL_PGA_LOW_PASS_FILTER_DISABLED will disable the internal resistance

This API configures the resistor value for the PGA output low pass RC filter. The resistance for the RC low pass filter is provided within the microprocessor and is determined by the resistorValue. The capacitor must be connected outside the microprocessor.

function DL_PGA_enableOutput

__STATIC_INLINE void DL_PGA_enableOutput(
    PGA_Regs * pga
)

Enables the PGA output on the pin.

Parameters:

  • pga Pointer to the register overlay for the peripheral

This API send the PGA output to the pin.

function DL_PGA_disableOutput

__STATIC_INLINE void DL_PGA_disableOutput(
    PGA_Regs * pga
)

Disables the PGA output on the pin.

Parameters:

  • pga Pointer to the register overlay for the peripheral

This API prevents the PGA output to the pin.

function DL_PGA_enableInternalGainOutput

__STATIC_INLINE void DL_PGA_enableInternalGainOutput(
    PGA_Regs * pga
)

Enables PGA internal gain output on the pin.

Parameters:

  • pga Pointer to the register overlay for the peripheral

This API sends the PGA internal gain output to the pin.

function DL_PGA_disableInternalGainOutput

__STATIC_INLINE void DL_PGA_disableInternalGainOutput(
    PGA_Regs * pga
)

Disables PGA internal gain output on the pin.

Parameters:

  • pga Pointer to the register overlay for the peripheral

This API prevents the PGA internal gain output from being sent to the pin.

function DL_PGA_enableExternalChop

__STATIC_INLINE void DL_PGA_enableExternalChop(
    PGA_Regs * pga
)

Enables the external chopping signal for the PGA.

Parameters:

  • pga Pointer to the register overlay for the peripheral

This API enables the external chopping signal control for PGA.

function DL_PGA_disableExternalChop

__STATIC_INLINE void DL_PGA_disableExternalChop(
    PGA_Regs * pga
)

Disables the external chopping signal for the PGA.

Parameters:

  • pga Pointer to the register overlay for the PGA peripheral

This API disables the external chopping signal control for PGA.

function DL_PGA_selectPMUXInput

__STATIC_INLINE void DL_PGA_selectPMUXInput(
    PGA_Regs * pga,
    DL_PGA_PMUX_INPUT pmuxInput
)

Selects PGA positive input mux source.

Parameters:

  • pga Pointer to the register overlay for the peripheral

  • pmuxInput The positive input mux source, DL_PGA_PMUX_INPUT

This API selects the positive input mux source.

function DL_PGA_selectNMUXInput

__STATIC_INLINE void DL_PGA_selectNMUXInput(
    PGA_Regs * pga,
    DL_PGA_NMUX_INPUT nmuxInput
)

Selects PGA negative input multiplexer (NMUX) source.

Parameters:

  • pga Pointer to the register overlay for the peripheral

  • nmuxInput The negative input mux source, DL_PGA_NMUX_INPUT

This API selects the negative input mux source.

function DL_PGA_selectMMUXInput

__STATIC_INLINE void DL_PGA_selectMMUXInput(
    PGA_Regs * pga,
    DL_PGA_MMUX_INPUT mmuxInput
)

Selects the input source for the M-Mux.

Parameters:

  • pga Pointer to the register overlay for the peripheral

  • mmuxInput The M-Mux input mux source, DL_PGA_MMUX_INPUT

This function configures the M-Mux input source. Valid values are as following:

  • DL_PGA_MMUX_NAKED_OPAMP - Stand alone op-amp or G=1 mode select

  • DL_PGA_MMUX_NON_INVERTING_GAIN_VSSA - VSSA_RESARRAY connected to M-Mux input for non-inverting gain settings

  • DL_PGA_MMUX_INVERTING_GAIN_NEG - PGA_NEG pin connected as M-Mux input source for inverting gain settings

  • DL_PGA_MMUX_INVERTING_GAIN_NEG_SHARED - PGA_NEG_SHARED connected as M-Mux input source for inverting gain settings

function DL_PGA_enableFeedbackOnPin

__STATIC_INLINE void DL_PGA_enableFeedbackOnPin(
    PGA_Regs * pga
)

Enable feedback to PGA negative input pin.

Parameters:

  • pga Pointer to the register overlay for the peripheral

This API enables feedback to the PGA negative input pin and connects PGA_INM to the PGA inverting input.

function DL_PGA_disableFeedbackOnPin

__STATIC_INLINE void DL_PGA_disableFeedbackOnPin(
    PGA_Regs * pga
)

Disable feedback to PGA negative input pin.

Parameters:

  • pga Pointer to the register overlay for the peripheral

This API disables feedback to the PGA negative input pin and connects PGA_INM to the PGA inverting input.

function DL_PGA_chop

__STATIC_INLINE void DL_PGA_chop(
    PGA_Regs * pga,
    DL_PGA_CHOP chop
)

Selects PGA chop mode.

Parameters:

  • pga Pointer to the register overlay for the PGA peripheral

  • chop The chop mode to be selected, DL_PGA_CHOP

This API selects the chopping mode to reduce the input offset to a very small number (~uV level).

function DL_PGA_getRevision

__STATIC_INLINE uint16_t DL_PGA_getRevision(
    PGA_Regs * pga
)

Returns the PGA revision number.

Parameters:

  • pga Pointer to the register overlay for the peripheral

Return: PGA revision number (8-bit value)

function DL_PGA_getType

__STATIC_INLINE uint16_t DL_PGA_getType(
    PGA_Regs * pga
)

Returns the PGA type number.

Parameters:

  • pga Pointer to the register overlay for the peripheral

Return: PGA type number (8-bit value)

function DL_PGA_lockRegisters

__STATIC_INLINE void DL_PGA_lockRegisters(
    PGA_Regs * pga,
    uint16_t registerType
)

Locks PGA registers.

Parameters:

  • pga Pointer to the register overlay for the peripheral

  • registerType The PGA register(s) to be locked, [DL_PGA_REG_LOCK]

This API locks the PGA registers specified by registerType.

function DL_PGA_initParamsSetDefault

void DL_PGA_initParamsSetDefault(
    DL_PGA_Config * config
)

Initializes the PGA configuration parameters.

Parameters:

  • config Pointer to the PGA configuration structure.

This function initializes all the parameters of the PGA configuration structure to their default values.

function DL_PGA_init

void DL_PGA_init(
    PGA_Regs * pga,
    DL_PGA_Config * config
)

Initializes the PGA module.

Parameters:

  • pga Pointer to the PGA register overlay

  • config Pointer to the PGA configuration structure

This function configures the PGA module according to the provided configuration.

Macros Documentation

define DL_PGA_REG_LOCK_PGACTL

#define DL_PGA_REG_LOCK_PGACTL PGA_PGALOCK_PGACTL_MASK

PGA Control Register Lock.

define DL_PGA_REG_LOCK_MUXSEL

#define DL_PGA_REG_LOCK_MUXSEL PGA_PGALOCK_MUXSEL_MASK

PGA Multiplexer Selection Register Lock.