MSP430 DriverLib for MSP430FR5xx_6xx Devices  2.91.13.01
sdhs

Functions

void SDHS_init (uint16_t baseAddress, SDHS_initParam *param)
 Initializes the SDHS module. More...
 
void SDHS_setWindowComp (uint16_t baseAddress, uint16_t highThreshold, uint16_t lowThreshold)
 Sets the high and low threshold for the window comparator feature. More...
 
void SDHS_setTotalSampleSize (uint16_t baseAddress, uint16_t sampleSize)
 Sets total sample size. More...
 
void SDHS_enableTrigger (uint16_t baseAddress)
 Enables the SDHS Trigger. More...
 
void SDHS_disableTrigger (uint16_t baseAddress)
 Disables the SDHS Trigger. More...
 
void SDHS_enable (uint16_t baseAddress)
 Turn On Module. More...
 
void SDHS_disable (uint16_t baseAddress)
 Turn Off Module. More...
 
uint16_t SDHS_getInterruptStatus (uint16_t baseAddress, uint16_t interruptMask)
 Returns the status of the selected interrupt flags. More...
 
uint16_t SDHS_getInterruptMaskStatus (uint16_t baseAddress, uint16_t interruptMask)
 Returns the mask status of the selected interrupt. More...
 
void SDHS_enableInterrupt (uint16_t baseAddress, uint16_t interruptMask)
 Enable SDHS selected interrupt masks. More...
 
void SDHS_disableInterrupt (uint16_t baseAddress, uint16_t interruptMask)
 Disable SDHS selected interrupt masks. More...
 
void SDHS_clearInterrupt (uint16_t baseAddress, uint16_t interruptMask)
 Clears SDHS selected interrupt flags. More...
 
void SDHS_setInterrupt (uint16_t baseAddress, uint16_t interruptMask)
 Set SDHS selected interrupts. More...
 
void SDHS_setPGAGain (uint16_t baseAddress, uint16_t gain)
 Set PGA Gain. More...
 
void SDHS_setModularOptimization (uint16_t baseAddress, uint16_t optimization)
 Set Modular Optimization. More...
 
uint16_t SDHS_getRegisterLockStatus (uint16_t baseAddress)
 Returns the lock status of the registers. More...
 
void SDHS_startConversion (uint16_t baseAddress)
 Start Conversion. More...
 
void SDHS_endConversion (uint16_t baseAddress)
 End Conversion. More...
 
uint16_t SDHS_getResults (uint16_t baseAddress)
 Returns the contents of the Data Conversion Register. More...
 
void SDHS_setDTCDestinationAddress (uint16_t baseAddress, uint16_t address)
 Sets the DTC destination address. More...
 

Detailed Description

Function Documentation

§ SDHS_clearInterrupt()

void SDHS_clearInterrupt ( uint16_t  baseAddress,
uint16_t  interruptMask 
)

Clears SDHS selected interrupt flags.

Parameters
baseAddressis the base address of the SDHS module.
interruptMaskMask value is the logical OR of any of the following: Valid values are:
  • SDHS_INCOMPLETE_STOP_INTERRUPT
  • SDHS_WINDOW_LOW_INTERRUPT
  • SDHS_WINDOW_HIGH_INTERRUPT
  • SDHS_DATA_READY_INTERRUPT
  • SDHS_START_CONVERSION_TRIGGER_INTERRUPT
  • SDHS_ACQUISITION_DONE_INTERRUPT
  • SDHS_DATA_OVERFLOW_INTERRUPT

Modified registers are SDHSICR

Returns
None

§ SDHS_disable()

void SDHS_disable ( uint16_t  baseAddress)

Turn Off Module.

Turn Off Module

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

§ SDHS_disableInterrupt()

void SDHS_disableInterrupt ( uint16_t  baseAddress,
uint16_t  interruptMask 
)

Disable SDHS selected interrupt masks.

Parameters
baseAddressis the base address of the SDHS module.
interruptMaskMask value is the logical OR of any of the following: Valid values are:
  • SDHS_WINDOW_LOW_INTERRUPT
  • SDHS_WINDOW_HIGH_INTERRUPT
  • SDHS_DATA_READY_INTERRUPT
  • SDHS_START_CONVERSION_TRIGGER_INTERRUPT
  • SDHS_ACQUISITION_DONE_INTERRUPT
  • SDHS_DATA_OVERFLOW_INTERRUPT

Modified registers are SDHSIMSC

Returns
None

§ SDHS_disableTrigger()

void SDHS_disableTrigger ( uint16_t  baseAddress)

Disables the SDHS Trigger.

Disables the SDHS Trigger.

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

§ SDHS_enable()

void SDHS_enable ( uint16_t  baseAddress)

Turn On Module.

Turn On Module

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

§ SDHS_enableInterrupt()

void SDHS_enableInterrupt ( uint16_t  baseAddress,
uint16_t  interruptMask 
)

Enable SDHS selected interrupt masks.

Parameters
baseAddressis the base address of the SDHS module.
interruptMaskMask value is the logical OR of any of the following: Valid values are:
  • SDHS_WINDOW_LOW_INTERRUPT
  • SDHS_WINDOW_HIGH_INTERRUPT
  • SDHS_DATA_READY_INTERRUPT
  • SDHS_START_CONVERSION_TRIGGER_INTERRUPT
  • SDHS_ACQUISITION_DONE_INTERRUPT
  • SDHS_DATA_OVERFLOW_INTERRUPT

Modified registers are SDHSIMSC

Returns
None

§ SDHS_enableTrigger()

void SDHS_enableTrigger ( uint16_t  baseAddress)

Enables the SDHS Trigger.

Enables the SDHS Trigger.

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

§ SDHS_endConversion()

void SDHS_endConversion ( uint16_t  baseAddress)

End Conversion.

End Conversion

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

§ SDHS_getInterruptMaskStatus()

uint16_t SDHS_getInterruptMaskStatus ( uint16_t  baseAddress,
uint16_t  interruptMask 
)

Returns the mask status of the selected interrupt.

Returns the mask status of the selected interrupt flags.

Parameters
baseAddressis the base address of the SDHS module.
interruptMaskMask value is the logical OR of any of the following: Valid values are:
  • SDHS_INCOMPLETE_STOP_INTERRUPT
  • SDHS_WINDOW_LOW_INTERRUPT
  • SDHS_WINDOW_HIGH_INTERRUPT
  • SDHS_DATA_READY_INTERRUPT
  • SDHS_START_CONVERSION_TRIGGER_INTERRUPT
  • SDHS_ACQUISITION_DONE_INTERRUPT
  • SDHS_DATA_OVERFLOW_INTERRUPT
Returns
Logical OR of any of above valid values for interruptMask
indicating the status of the masked flags

§ SDHS_getInterruptStatus()

uint16_t SDHS_getInterruptStatus ( uint16_t  baseAddress,
uint16_t  interruptMask 
)

Returns the status of the selected interrupt flags.

Returns the status of the selected interrupt flags.

Parameters
baseAddressis the base address of the SDHS module.
interruptMaskMask value is the logical OR of any of the following: Valid values are:
  • SDHS_INCOMPLETE_STOP_INTERRUPT
  • SDHS_WINDOW_LOW_INTERRUPT
  • SDHS_WINDOW_HIGH_INTERRUPT
  • SDHS_DATA_READY_INTERRUPT
  • SDHS_START_CONVERSION_TRIGGER_INTERRUPT
  • SDHS_ACQUISITION_DONE_INTERRUPT
  • SDHS_DATA_OVERFLOW_INTERRUPT
Returns
Logical OR of any of above valid values for interruptMask
indicating the status of the masked flags

§ SDHS_getRegisterLockStatus()

uint16_t SDHS_getRegisterLockStatus ( uint16_t  baseAddress)

Returns the lock status of the registers.

Returns the lock status of the registers

Parameters
baseAddressis the base address of the SDHS module.
Returns
SDHS_REGISTERS_LOCKED or SDHS_REGISTERS_UNLOCKED

§ SDHS_getResults()

uint16_t SDHS_getResults ( uint16_t  baseAddress)

Returns the contents of the Data Conversion Register.

Returns the contents of the Data Conversion Register. The sign bit is extended up to the bit 15.

Parameters
baseAddressis the base address of the SDHS module.
Returns
The contents of the Data Conversion Register

§ SDHS_init()

void SDHS_init ( uint16_t  baseAddress,
SDHS_initParam param 
)

Initializes the SDHS module.

Initializes the SDHS moduleress

Parameters
baseAddressis the base address of the SDHS module.
paramsis the pointer to the initialization structure

At the end of this call the TRIGEN and SDHS_LOCK bits are reset

Returns
None

References SDHS_initParam::autoSampleStart, SDHS_initParam::dataAlignment, SDHS_initParam::dataFormat, SDHS_initParam::dataTransferController, SDHS_initParam::interruptDelayGeneration, SDHS_initParam::msbShift, SDHS_initParam::outputBitResolution, SDHS_initParam::oversamplingRate, SDHS_initParam::sampleSizeCounting, SDHS_initParam::triggerSourceSelect, and SDHS_initParam::windowComparator.

§ SDHS_setDTCDestinationAddress()

void SDHS_setDTCDestinationAddress ( uint16_t  baseAddress,
uint16_t  address 
)

Sets the DTC destination address.

Sets the DTC Destination Address

Parameters
baseAddressis the base address of the SDHS module.
addressis the destination address to be set
Returns
None

§ SDHS_setInterrupt()

void SDHS_setInterrupt ( uint16_t  baseAddress,
uint16_t  interruptMask 
)

Set SDHS selected interrupts.

Parameters
baseAddressis the base address of the SDHS module.
interruptMaskMask value is the logical OR of any of the following: Valid values are:
  • SDHS_WINDOW_LOW_INTERRUPT
  • SDHS_WINDOW_HIGH_INTERRUPT
  • SDHS_DATA_READY_INTERRUPT
  • SDHS_START_CONVERSION_TRIGGER_INTERRUPT
  • SDHS_ACQUISITION_DONE_INTERRUPT
  • SDHS_DATA_OVERFLOW_INTERRUPT

Modified registers are SDHSISR

Returns
None

§ SDHS_setModularOptimization()

void SDHS_setModularOptimization ( uint16_t  baseAddress,
uint16_t  optimization 
)

Set Modular Optimization.

Set Modular Optimization. Upper bound of optimization parameter label is non-inclusive. For example, if your PLL output frequency is 77 MHz, you should select SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_77_80MHz for optimization parameter.

Parameters
baseAddressis the base address of the SDHS module.
optimizationis the Modular Optimization value Valid values are:
  • SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_77_80MHz
  • SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_74_77MHz
  • SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_71_74MHz
  • SDHS_OPTIMIZE_PLL_OUTPUT_FREQUENCY_68_71MHz [Default]
Returns
None

§ SDHS_setPGAGain()

void SDHS_setPGAGain ( uint16_t  baseAddress,
uint16_t  gain 
)

Set PGA Gain.

Set PGA Gain

Parameters
baseAddressis the base address of the SDHS module.
gainis the PGA Gain control value
Returns
None

§ SDHS_setTotalSampleSize()

void SDHS_setTotalSampleSize ( uint16_t  baseAddress,
uint16_t  sampleSize 
)

Sets total sample size.

Note that SDHSCTL2.SMPSZ includes the samples skipped by SDHSCTL0.INTDLY:

  • The total number of samples SDHS generates = sampleSize + 1.
  • The number of samples SDHS generates via SDHSDT register = sampleSize - INTDLY + 1. If sampleSize - INTDLY + 1 <= 0, then no data output to SDHSDT register
Parameters
baseAddressis the base address of the SDHS module.
sampleSizeis the total number of samples SDHS generates + 1
Returns
None

§ SDHS_setWindowComp()

void SDHS_setWindowComp ( uint16_t  baseAddress,
uint16_t  highThreshold,
uint16_t  lowThreshold 
)

Sets the high and low threshold for the window comparator feature.

Sets the high and low threshold for the window comparator feature.

Parameters
baseAddressis the base address of the SDHS module.
highThresholdis the upper bound that could trip an interrupt for the window comparator.
lowThresholdis the lower bound that could trip on interrupt for the window comparator.
Returns
None

§ SDHS_startConversion()

void SDHS_startConversion ( uint16_t  baseAddress)

Start Conversion.

Start Conversion

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

Copyright 2020, Texas Instruments Incorporated