MSP430 DriverLib for MSP430FR2xx_4xx Devices  2.91.13.01
sac

Functions

void SAC_OA_init (uint16_t baseAddress, uint16_t positiveInput, uint16_t negativeInput)
 Initializes SAC OA with positive input and negative input. Available to at least SAC-L1. More...
 
void SAC_OA_selectPowerMode (uint16_t baseAddress, uint16_t powerMode)
 Selects power mode for OA. Available to at least SAC-L1. More...
 
void SAC_OA_enable (uint16_t baseAddress)
 Enables OA. Available to at least SAC-L1. More...
 
void SAC_OA_disable (uint16_t baseAddress)
 Disables OA. Available to at least SAC-L1. More...
 
void SAC_enable (uint16_t baseAddress)
 Enables the SAC all modules. Available to at least SAC-L1. More...
 
void SAC_disable (uint16_t baseAddress)
 Disables the SAC all modules. Available to at least SAC-L1. More...
 
void SAC_PGA_setMode (uint16_t baseAddress, uint16_t mode)
 SAC PGA mode selection. Only available to at least SAC-L2. More...
 
void SAC_PGA_setGain (uint16_t baseAddress, uint16_t gain)
 SAC PGA gain configuration. Only available to at least SAC-L2. More...
 
void SAC_DAC_enable (uint16_t baseAddress)
 SAC DAC enable. Only available to at least SAC-L3. More...
 
void SAC_DAC_disable (uint16_t baseAddress)
 SAC DAC disable. Only available to at least SAC-L3. More...
 
void SAC_DAC_interruptEnable (uint16_t baseAddress)
 SAC DAC interrupt enable. Only available to at least SAC-L3. More...
 
void SAC_DAC_interruptDisable (uint16_t baseAddress)
 SAC DAC interrupt disable. Only available to at least SAC-L3. More...
 
void SAC_DAC_DMARequestEnable (uint16_t baseAddress)
 SAC DAC DMA request enable. Only available to at least SAC-L3. More...
 
void SAC_DAC_DMARequestDisable (uint16_t baseAddress)
 SAC DAC DMA request disable. Only available to at least SAC-L3. More...
 
void SAC_DAC_selectLoad (uint16_t baseAddress, uint16_t load)
 SAC DAC load select. Only available to at least SAC-L3. More...
 
void SAC_DAC_selectRefVoltage (uint16_t baseAddress, uint16_t reference)
 SAC DAC select reference voltage. Only available to at least SAC-L3. More...
 
uint16_t SAC_DAC_getData (uint16_t baseAddress)
 Get SAC DAC data. Only available to at least SAC-L3. More...
 
void SAC_DAC_setData (uint16_t baseAddress, uint16_t data)
 Set SAC DAC data. Only available to at least SAC-L3. More...
 
bool SAC_DAC_getIFG (uint16_t baseAddress)
 Get SAC DAC data update flag. Only available to at least SAC-L3. More...
 
void SAC_DAC_clearIFG (uint16_t baseAddress)
 Clears SAC DAC data update flag. Only available to at least SAC-L3. More...
 
uint16_t SAC_getInterruptVector (uint16_t baseAddress)
 Get SAC DAC interrupt vector value. Only available to at least SAC-L3. More...
 

Detailed Description

Function Documentation

§ SAC_DAC_clearIFG()

void SAC_DAC_clearIFG ( uint16_t  baseAddress)

Clears SAC DAC data update flag. Only available to at least SAC-L3.

Clears SAC DAC data update flag by writing 1. It could also be cleared by reading SACxIV register. If DMA is enabled, this flag is automatically cleared by DMA when a new data request is accepted. Can be modified only when DACEN = 0. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_DAC_disable()

void SAC_DAC_disable ( uint16_t  baseAddress)

SAC DAC disable. Only available to at least SAC-L3.

Disables SAC DAC. Can be modified only when DACEN = 0. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_DAC_DMARequestDisable()

void SAC_DAC_DMARequestDisable ( uint16_t  baseAddress)

SAC DAC DMA request disable. Only available to at least SAC-L3.

Disables SAC DAC DMA request. Can be modified only when DACEN = 0. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_DAC_DMARequestEnable()

void SAC_DAC_DMARequestEnable ( uint16_t  baseAddress)

SAC DAC DMA request enable. Only available to at least SAC-L3.

Enables SAC DAC DMA request. Can be modified only when DACEN = 0. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_DAC_enable()

void SAC_DAC_enable ( uint16_t  baseAddress)

SAC DAC enable. Only available to at least SAC-L3.

Enables SAC DAC. Can be modified only when DACEN = 0. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_DAC_getData()

uint16_t SAC_DAC_getData ( uint16_t  baseAddress)

Get SAC DAC data. Only available to at least SAC-L3.

Gets from SAC DAC data. Bit 11 represents the MSB. Only word access to SACxDAT register is allowed. Byte operation may cause unexpected results. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
12-bit value from SAC DAC data.

§ SAC_DAC_getIFG()

bool SAC_DAC_getIFG ( uint16_t  baseAddress)

Get SAC DAC data update flag. Only available to at least SAC-L3.

Gets flag of SAC DAC update status. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
True or false whether DAC latch data register updated

§ SAC_DAC_interruptDisable()

void SAC_DAC_interruptDisable ( uint16_t  baseAddress)

SAC DAC interrupt disable. Only available to at least SAC-L3.

Disables SAC DAC interrupt. Can be modified only when DACEN = 0. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_DAC_interruptEnable()

void SAC_DAC_interruptEnable ( uint16_t  baseAddress)

SAC DAC interrupt enable. Only available to at least SAC-L3.

Enables SAC DAC interrupt. Can be modified only when DACEN = 0. Asynchronously enable the SAC and the SAC DAC interrupt to prevent unexpected results. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_DAC_selectLoad()

void SAC_DAC_selectLoad ( uint16_t  baseAddress,
uint16_t  load 
)

SAC DAC load select. Only available to at least SAC-L3.

Selects the load trigger for the DAC latch. DACENC must be set for the DAC to update, except when DACLSEL = 0. Can be modified only when DACEN = 0. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
loadselects DAC load. Valid values are:
  • SAC_DAC_LOAD_DACDAT_WRITTEN [Default]
  • SAC_DAC_LOAD_DEVICE_SPECIFIC_0
  • SAC_DAC_LOAD_DEVICE_SPECIFIC_1
    Modified bits are DACLSEL of SACxDAC register.
Returns
None

§ SAC_DAC_selectRefVoltage()

void SAC_DAC_selectRefVoltage ( uint16_t  baseAddress,
uint16_t  reference 
)

SAC DAC select reference voltage. Only available to at least SAC-L3.

Selects SAC DAC select reference voltage, primary or secondary. Can be modified only when DACEN = 0. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
referenceselects DAC reference voltage. Valid values are:
  • SAC_DAC_PRIMARY_REFERENCE [Default]
  • SAC_DAC_SECONDARY_REFERENCE
    Modified bits are DACSREF of SACxDAC register.
Returns
None

§ SAC_DAC_setData()

void SAC_DAC_setData ( uint16_t  baseAddress,
uint16_t  data 
)

Set SAC DAC data. Only available to at least SAC-L3.

Sets data to SAC DAC. Bit 11 represents the MSB. Only word access to SACxDAT register is allowed. Byte operation may cause unexpected results. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
datasends DAC data. Mask value is the logical OR of any of the following:
  • SAC_DAC_DATA_BIT0 [Default]
  • SAC_DAC_DATA_BIT1
  • SAC_DAC_DATA_BIT2
  • SAC_DAC_DATA_BIT3
  • SAC_DAC_DATA_BIT4
  • SAC_DAC_DATA_BIT5
  • SAC_DAC_DATA_BIT6
  • SAC_DAC_DATA_BIT7
  • SAC_DAC_DATA_BIT8
  • SAC_DAC_DATA_BIT9
  • SAC_DAC_DATA_BIT10
  • SAC_DAC_DATA_BIT11
    Modified bits are DACDATA of SACxDAT register.
Returns
None

§ SAC_disable()

void SAC_disable ( uint16_t  baseAddress)

Disables the SAC all modules. Available to at least SAC-L1.

This will disable SAC all modules. Available to at least SAC-L1. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_enable()

void SAC_enable ( uint16_t  baseAddress)

Enables the SAC all modules. Available to at least SAC-L1.

This will enable SAC all modules. Available to at least SAC-L1. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_getInterruptVector()

uint16_t SAC_getInterruptVector ( uint16_t  baseAddress)

Get SAC DAC interrupt vector value. Only available to at least SAC-L3.

Get SAC DAC interrupt vector value. Only word access to the SACIVx register is recommended. Only available to at least SAC-L3. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
SAC DAC interrupt vector value

§ SAC_OA_disable()

void SAC_OA_disable ( uint16_t  baseAddress)

Disables OA. Available to at least SAC-L1.

This will disable OA and OA outputs high impedance. Available to at least SAC-L1. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_OA_enable()

void SAC_OA_enable ( uint16_t  baseAddress)

Enables OA. Available to at least SAC-L1.

This will enables OA for normal mode. Available to at least SAC-L1. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
Returns
None

§ SAC_OA_init()

void SAC_OA_init ( uint16_t  baseAddress,
uint16_t  positiveInput,
uint16_t  negativeInput 
)

Initializes SAC OA with positive input and negative input. Available to at least SAC-L1.

This function initializes SAC OA with positive input and negative input. Available to at least SAC-L1. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
positiveInputselects the positive input source Valid values are:
  • SAC_OA_POSITIVE_INPUT_SOURCE_EXTERNAL [Default]
  • SAC_OA_POSITIVE_INPUT_SOURCE_DAC
  • SAC_OA_POSITIVE_INPUT_SOURCE_PAIR_OA
  • SAC_OA_POSITIVE_INPUT_SOURCE_DISCONNECTED
    Modified bits are PSEL and PMUXEN of SACxOA register.
negativeInputselects the negative input source Valid values are:
  • SAC_OA_NEGATIVE_INPUT_SOURCE_EXTERNAL [Default]
  • SAC_OA_NEGATIVE_INPUT_SOURCE_PGA
  • SAC_OA_NEGATIVE_INPUT_SOURCE_DISCONNECTED
    Modified bits are NSEL and NMUXEN of SACxOA register.
Returns
None

§ SAC_OA_selectPowerMode()

void SAC_OA_selectPowerMode ( uint16_t  baseAddress,
uint16_t  powerMode 
)

Selects power mode for OA. Available to at least SAC-L1.

This function selects power mode for OA. Available to at least SAC-L1. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
powerModeselects OA power mode. Valid values are:
  • SAC_OA_POWER_MODE_HIGH_SPEED_HIGH_POWER [Default]
  • SAC_OA_POWER_MODE_LOW_SPEED_LOW_POWER
    Modified bits are OAPM of SACxOA register.
Returns
None

§ SAC_PGA_setGain()

void SAC_PGA_setGain ( uint16_t  baseAddress,
uint16_t  gain 
)

SAC PGA gain configuration. Only available to at least SAC-L2.

Allows different SAC PGA gain configurations. Only available to at least SAC-L2. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
gainselects PGA gain configuration. Mask value is the logical OR of any of the following:
  • SAC_PGA_GAIN_BIT0 [Default]
  • SAC_PGA_GAIN_BIT1
  • SAC_PGA_GAIN_BIT2
    Modified bits are GAIN of SACxPGA register.
Returns
None

§ SAC_PGA_setMode()

void SAC_PGA_setMode ( uint16_t  baseAddress,
uint16_t  mode 
)

SAC PGA mode selection. Only available to at least SAC-L2.

Allows selection of different SAC PGA modes. Only available to at least SAC-L2. Please consult your device-specific datasheet to see what SAC level is available.

Parameters
baseAddressis the base address of the SAC module.
modeselects PGA mode. Valid values are:
  • SAC_PGA_MODE_INVERTING
  • SAC_PGA_MODE_BUFFER [Default]
  • SAC_PGA_MODE_NONINVERTING
  • SAC_PGA_MODE_CASCADE_OA_INVERTING
    Modified bits are MSEL of SACxPGA register.
Returns
None

Copyright 2020, Texas Instruments Incorporated