MSP430 DriverLib for MSP430FR5xx_6xx Devices  2.91.13.01
saph

Functions

void SAPH_unlock (uint16_t baseAddress)
 Unlocks certain SAPH registers. More...
 
void SAPH_lock (uint16_t baseAddress)
 Locks certain SAPH registers. More...
 
void SAPH_clearInterrupt (uint16_t baseAddress, uint8_t mask)
 Clears SAPH interrupts. More...
 
void SAPH_enableInterrupt (uint16_t baseAddress, uint8_t mask)
 Enables SAPH interrupts. More...
 
void SAPH_disableInterrupt (uint16_t baseAddress, uint8_t mask)
 Disables selected SAPH interrupt sources. More...
 
uint8_t SAPH_getInterruptStatus (uint16_t baseAddress, uint8_t mask)
 Gets the current SAPH interrupt status. More...
 
void SAPH_configurePHY (uint16_t baseAddress, SAPH_configPHYParam *config)
 Configures physical interface output and trim values. More...
 
void SAPH_configurePHYMultiplexer (uint16_t baseAddress, uint16_t dummyLoad, uint16_t source, uint16_t input)
 Configures physical interface multiplexer. More...
 
void SAPH_configurePHYBias (uint16_t baseAddress, SAPH_configPHYBiasParam *config)
 Configures physical interface bias. More...
 
void SAPH_configurePPGCount (uint16_t baseAddress, SAPH_configPPGCountParam *config)
 Configures pulse generator count. More...
 
void SAPH_setPPGLowPeriod (uint16_t baseAddress, uint16_t period)
 Sets pulse generator low period. More...
 
void SAPH_setPPGHighPeriod (uint16_t baseAddress, uint16_t period)
 Sets pulse generator high period. More...
 
void SAPH_configurePPG (uint16_t baseAddress, SAPH_configPPGParam *config)
 Configures pulse generator. More...
 
void SAPH_triggerPPG (uint16_t baseAddress)
 Triggers pulse generator. More...
 
void SAPH_stopPPG (uint16_t baseAddress)
 Stops pulse generator. More...
 
void SAPH_configureASQ (uint16_t baseAddress, SAPH_configASQParam *config)
 Configures acquisition sequencer. More...
 
void SAPH_triggerASQ (uint16_t baseAddress)
 Triggers acquisition sequencer. More...
 
void SAPH_stopASQ (uint16_t baseAddress)
 Stops acquisition sequencer. More...
 
uint8_t SAPH_getASQPingCounter (uint16_t baseAddress)
 Gets ping counter of acquisition sequencer. More...
 
void SAPH_configureASQPing (uint16_t baseAddress, SAPH_configASQPingParam *config)
 Configures acquisition sequencer ping parameters. More...
 
void SAPH_configureASQTimeBase (uint16_t baseAddress, uint16_t prescalerStartValue)
 Configures acquisition sequencer time base parameters. More...
 
void SAPH_startASQTimer (uint16_t baseAddress)
 Starts acquisition timer. More...
 
void SAPH_stopASQTimer (uint16_t baseAddress)
 Stops acquisition timer. More...
 
void SAPH_clearASQTimer (uint16_t baseAddress)
 Clears acquisition timer. More...
 
void SAPH_configureMode (uint16_t baseAddress, SAPH_configModeParam *config)
 Configures certain mode configuration parameters. More...
 
void SAPH_enableLowPowerBiasMode (uint16_t baseAddress)
 Enables low power bias operation mode. More...
 
void SAPH_disableLowPowerBiasMode (uint16_t baseAddress)
 Disables low power bias operation mode. More...
 
void SAPH_enableChargePumpAlways (uint16_t baseAddress)
 Keeps charge pump of the input multiplexer always on. More...
 
void SAPH_enableChargePumpOnAcquisitionOnly (uint16_t baseAddress)
 Charge pump of input multiplexer is only turned on by data acquisition. More...
 
void SAPH_setBiasGeneratorImpedance (uint16_t baseAddress, uint16_t biasImpedance)
 Sets impedance of the buffers for RxBias and TxBias. More...
 

Detailed Description

Function Documentation

§ SAPH_clearASQTimer()

void SAPH_clearASQTimer ( uint16_t  baseAddress)

Clears acquisition timer.

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

§ SAPH_clearInterrupt()

void SAPH_clearInterrupt ( uint16_t  baseAddress,
uint8_t  mask 
)

Clears SAPH interrupts.

The SAPH interrupt source is cleared, so that it no longer asserts. If the interrupt is not enabled, the corresponding bit in the RIS register bit will be cleared. If the interrupt is enabled, the corresponding bit both MIS and RIS registers will be both cleared.

Parameters
baseAddressis the base address of the SAPH module.
maskis the logical OR of any of the following:
  • SAPH_DATA_ERROR_INTERRUPT - SAPH data error interrupt
  • SAPH_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH TMF time out interrupt
  • SAPH_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH acquistion sequencer done interrupt
  • SAPH_PING_TRANSMIT_DONE_INTERRUPT - SAPH ping transmit done interrupt
Returns
None

§ SAPH_configureASQ()

void SAPH_configureASQ ( uint16_t  baseAddress,
SAPH_configASQParam config 
)

Configures acquisition sequencer.

This configures SAPH acquisition sequencer:

  • trigger source
  • abort-on-error control
  • channel select
  • side of channel to receive
  • standby indication
  • OFF at end-of-sequence
  • early receive bias
  • channel toggle
Parameters
baseAddressis the base address of the SAPH module.
configis the pointer to the struct for acquisition sequencer configuration.
Returns
None

References SAPH_configASQParam::abortOnError, SAPH_configASQParam::channelSelect, SAPH_configASQParam::earlyReceiveBias, SAPH_configASQParam::enableChannelToggle, SAPH_configASQParam::endOfSequence, SAPH_configASQParam::sideOfChannel, SAPH_configASQParam::standByIndication, and SAPH_configASQParam::triggerSource.

§ SAPH_configureASQPing()

void SAPH_configureASQPing ( uint16_t  baseAddress,
SAPH_configASQPingParam config 
)

Configures acquisition sequencer ping parameters.

This configures SAPH acquisition sequencer ping:

  • output polarity
  • pause level
  • pause impedance
Parameters
baseAddressis the base address of the SAPH module.
configis the pointer to the struct for acquisition sequencer ping configuration.
Returns
None

References SAPH_configASQPingParam::pauseHighImpedance, SAPH_configASQPingParam::pauseLevel, and SAPH_configASQPingParam::polarity.

§ SAPH_configureASQTimeBase()

void SAPH_configureASQTimeBase ( uint16_t  baseAddress,
uint16_t  prescalerStartValue 
)

Configures acquisition sequencer time base parameters.

This configures SAPH acquisition sequencer time base parameters:

  • power state
  • prescaler start value
Parameters
baseAddressis the base address of the SAPH module.
prescalerStartValueis the ASQ prescaler start value.
Returns
None

§ SAPH_configureMode()

void SAPH_configureMode ( uint16_t  baseAddress,
SAPH_configModeParam config 
)

Configures certain mode configuration parameters.

This configures SAPH:

  • bias generator impedance
  • charge pump enable timing
  • low power bias mode
    NOTE: This will modify all elements of SAPH mode configuration register. If there are elements not specified in the config parameter, the register values will be cleared. There are other SAPH functions to modify these features individually.
Parameters
baseAddressis the base address of the SAPH module.
configis the pointer to the struct for mode configuration.
Returns
None

References SAPH_configModeParam::biasImpedance, SAPH_configModeParam::chargePump, and SAPH_configModeParam::lowPowerBiasMode.

§ SAPH_configurePHY()

void SAPH_configurePHY ( uint16_t  baseAddress,
SAPH_configPHYParam config 
)

Configures physical interface output and trim values.

This configures SAPH physical interface:

  • channel output
  • channel related trim values
Parameters
baseAddressis the base address of the SAPH module.
configis the pointer to the struct for physical interface configuration.
Returns
None

References SAPH_configPHYParam::channel, SAPH_configPHYParam::enableFullPull, SAPH_configPHYParam::enableOutput, SAPH_configPHYParam::enableTermination, SAPH_configPHYParam::outputFunction, SAPH_configPHYParam::outputValue, SAPH_configPHYParam::pullDownTrim, SAPH_configPHYParam::pullUpTrim, and SAPH_configPHYParam::terminationTrim.

§ SAPH_configurePHYBias()

void SAPH_configurePHYBias ( uint16_t  baseAddress,
SAPH_configPHYBiasParam config 
)

Configures physical interface bias.

This configures SAPH physical interface bias parameters:

  • excitation bias switch
  • PGA bias
  • excitation bias
  • charge pump
  • line input leakage
  • compensation
  • ASQ bias
Parameters
baseAddressis the base address of the SAPH module.
configis the pointer to the struct for physical interface bias configuration.
Returns
None

References SAPH_configPHYBiasParam::biasExcitation, SAPH_configPHYBiasParam::biasPGA, SAPH_configPHYBiasParam::biasSwitch, SAPH_configPHYBiasParam::biasSwitchASQ, SAPH_configPHYBiasParam::biasSwitchPGA, SAPH_configPHYBiasParam::enableChargePump, and SAPH_configPHYBiasParam::enableLeakageCompensation.

§ SAPH_configurePHYMultiplexer()

void SAPH_configurePHYMultiplexer ( uint16_t  baseAddress,
uint16_t  enableDummyLoad,
uint16_t  sourceControl,
uint16_t  inputChannel 
)

Configures physical interface multiplexer.

This configures SAPH physical interface mutliplexer for dummy load, channel multiplexer source control and input channel selection.

Parameters
baseAddressis the base address of the SAPH module.
enableDummyLoadindicates whether to enable/disable dummy load on non- selected multiplexer inputs. Valid values are:
  • SAPH_PHY_DUMMYLOAD_ENABLE
  • SAPH_PHY_DUMMYLOAD_DISABLE [Default]
sourceControlselects which controls the multiplexer. Valid values are:
  • SAPH_PHY_SOURCE_CONTROLLED_BY_REGISTER [Default]
  • SAPH_PHY_SOURCE_CONTROLLED_BY_ASQ
inputChannelselects input channel. Valid values are:
  • SAPH_PHY_INPUT_CHANNEL_0 [Default]
  • SAPH_PHY_INPUT_CHANNEL_1
Returns
None

§ SAPH_configurePPG()

void SAPH_configurePPG ( uint16_t  baseAddress,
SAPH_configPPGParam config 
)

Configures pulse generator.

This configures SAPH pulse generator:

  • trigger source
  • prescaler enable
  • channel select
  • control select
Parameters
baseAddressis the base address of the SAPH module.
configis the pointer to the struct for pulse generator configuration.
Returns
None

References SAPH_configPPGParam::channelSelect, SAPH_configPPGParam::enablePrescaler, SAPH_configPPGParam::portSelect, and SAPH_configPPGParam::triggerSource.

§ SAPH_configurePPGCount()

void SAPH_configurePPGCount ( uint16_t  baseAddress,
SAPH_configPPGCountParam config 
)

Configures pulse generator count.

This configures SAPH pulse generator count:

  • high impedance
  • pause level
  • pause polarity
  • stop pulse
  • excitation pulse
Parameters
baseAddressis the base address of the SAPH module.
configis the pointer to the struct for pulse generator count configuration.
Returns
None

References SAPH_configPPGCountParam::excitationPulseCount, SAPH_configPPGCountParam::highImpedance, SAPH_configPPGCountParam::pauseLevel, SAPH_configPPGCountParam::pausePolarity, and SAPH_configPPGCountParam::stopPauseCount.

§ SAPH_disableInterrupt()

void SAPH_disableInterrupt ( uint16_t  baseAddress,
uint8_t  mask 
)

Disables selected SAPH interrupt sources.

Disables the indicated SAPH interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

Parameters
baseAddressis the base address of the SAPH module.
maskis the logical OR of any of the following:
  • SAPH_DATA_ERROR_INTERRUPT - SAPH data error interrupt
  • SAPH_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH TMF time out interrupt
  • SAPH_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH acquistion sequencer done interrupt
  • SAPH_PING_TRANSMIT_DONE_INTERRUPT - SAPH ping transmit done interrupt
Returns
None

§ SAPH_disableLowPowerBiasMode()

void SAPH_disableLowPowerBiasMode ( uint16_t  baseAddress)

Disables low power bias operation mode.

Enters manual bias mode and regular ASQ bias mode. In this configuration, the user controls by the ASQBSW has full control over TxBias and RxBias switches.
NOTE: Avoid changing operation mode unless PSQ is in OFF state. Otherwise, it can cause corrupt measurement results and irregular triggers of sub modules by ASQ.

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

§ SAPH_enableChargePumpAlways()

void SAPH_enableChargePumpAlways ( uint16_t  baseAddress)

Keeps charge pump of the input multiplexer always on.

The charge pump of the input multiplexer is on regardless of SDHS and ASQ requests. This setting will override other USS charge pump settings elsewhere.

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

§ SAPH_enableChargePumpOnAcquisitionOnly()

void SAPH_enableChargePumpOnAcquisitionOnly ( uint16_t  baseAddress)

Charge pump of input multiplexer is only turned on by data acquisition.

The charge pump of the input multiplexer is turned on by SDHS and ASQ related requests only. This will also require the charge pump to be enabled explicitly through other methods [controlled by CPDA bit or SAPH_configurePHYBias()] in the SAPH module.

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

§ SAPH_enableInterrupt()

void SAPH_enableInterrupt ( uint16_t  baseAddress,
uint8_t  mask 
)

Enables SAPH interrupts.

Enables the indicated SAPH interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor. Does not clear interrupt flags.

Parameters
baseAddressis the base address of the SAPH module.
maskis the logical OR of any of the following:
  • SAPH_DATA_ERROR_INTERRUPT - SAPH data error interrupt
  • SAPH_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH TMF time out interrupt
  • SAPH_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH acquistion sequencer done interrupt
  • SAPH_PING_TRANSMIT_DONE_INTERRUPT - SAPH ping transmit done interrupt
Returns
None

§ SAPH_enableLowPowerBiasMode()

void SAPH_enableLowPowerBiasMode ( uint16_t  baseAddress)

Enables low power bias operation mode.

In this mode, the SAPH acquisition sequencer (ASQ) uses the CHxEBSW and PGABSW as auxiliary values to achieve faster channel setting on reactive input loads. The ASQ has full controls over the bias switch multiplexer.
NOTE: Avoid changing operation mode unless PSQ is in OFF state. Otherwise, it can cause corrupt measurement results and irregular triggers of sub modules by ASQ.

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

§ SAPH_getASQPingCounter()

uint8_t SAPH_getASQPingCounter ( uint16_t  baseAddress)

Gets ping counter of acquisition sequencer.

This function returns ping counter which represents the number of acquistion turns regardless if up/down direction is changed. The acquistion stops if this count decrements from zero.

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

§ SAPH_getInterruptStatus()

uint8_t SAPH_getInterruptStatus ( uint16_t  baseAddress,
uint8_t  mask 
)

Gets the current SAPH interrupt status.

This returns the interrupt status for the SAPH module based on which flag is passed.

Parameters
baseAddressis the base address of the SAPH module.
maskis the logical OR of any of the following:
  • SAPH_DATA_ERROR_INTERRUPT - SAPH data error interrupt
  • SAPH_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH TMF time out interrupt
  • SAPH_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH acquistion sequencer done interrupt
  • SAPH_PING_TRANSMIT_DONE_INTERRUPT - SAPH ping transmit done interrupt
Returns
Logical OR of any of the following:
  • SAPH_DATA_ERROR_INTERRUPT - SAPH data error interrupt
  • SAPH_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH TMF time out interrupt
  • SAPH_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH acquistion sequencer done interrupt
  • SAPH_PING_TRANSMIT_DONE_INTERRUPT - SAPH ping transmit done interrupt

§ SAPH_lock()

void SAPH_lock ( uint16_t  baseAddress)

Locks certain SAPH registers.

Locks SAPH registers with offset address of 0xF or higher. IIDX, MIS, RIS, IMSC, ICR, ISR, DESCLO, and DESCHI registers are not affected and the registers are not locked. Utilize this function after SAPH_unlock() after necessary registers have been modified. SAPH registers, with the exception of the list in paragraph above, are locked by default.

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

§ SAPH_setBiasGeneratorImpedance()

void SAPH_setBiasGeneratorImpedance ( uint16_t  baseAddress,
uint16_t  biasImpedance 
)

Sets impedance of the buffers for RxBias and TxBias.

While for resistive loads the lowest impedance shows the fastest settling; this is not the case for reactive loads.

Parameters
baseAddressis the base address of the SAPH module.
biasImpedancesets bias impedance for RxBias and TxBias. Valid values are:
  • SAPH_MCNF_500_OHMS_RXBIAS_450_OHMS_TXBIAS
  • SAPH_MCNF_900_OHMS_RXBIAS_850_OHMS_TXBIAS
  • SAPH_MCNF_1500_OHMS_RXBIAS_1450_OHMS_TXBIAS [Default]
  • SAPH_MCNF_2950_OHMS_RXBIAS_2900_OHMS_TXBIAS
Returns
None

§ SAPH_setPPGHighPeriod()

void SAPH_setPPGHighPeriod ( uint16_t  baseAddress,
uint16_t  period 
)

Sets pulse generator high period.

The high phase of period of generator pulses defines the length of high phase of the pulses in units of high speed clocks. The minimum count is two regardless of the value set in this register.

Parameters
baseAddressis the base address of the SAPH module.
periodis the high period value to set.
Returns
None

§ SAPH_setPPGLowPeriod()

void SAPH_setPPGLowPeriod ( uint16_t  baseAddress,
uint16_t  period 
)

Sets pulse generator low period.

The low phase of period of generator pulses defines the length of low phase of the pulses in units of high speed clocks. The minimum count is two regardless of the value set in this register.

Parameters
baseAddressis the base address of the SAPH module.
periodis the low period value to set.
Returns
None

§ SAPH_startASQTimer()

void SAPH_startASQTimer ( uint16_t  baseAddress)

Starts acquisition timer.

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

§ SAPH_stopASQ()

void SAPH_stopASQ ( uint16_t  baseAddress)

Stops acquisition sequencer.

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

§ SAPH_stopASQTimer()

void SAPH_stopASQTimer ( uint16_t  baseAddress)

Stops acquisition timer.

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

§ SAPH_stopPPG()

void SAPH_stopPPG ( uint16_t  baseAddress)

Stops pulse generator.

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

§ SAPH_triggerASQ()

void SAPH_triggerASQ ( uint16_t  baseAddress)

Triggers acquisition sequencer.

This function triggers the acquisition sequencer if SAPH_ASQ_TRIGGER_SOURCE_SOFTWARE is selected as the trigger sourcce.

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

§ SAPH_triggerPPG()

void SAPH_triggerPPG ( uint16_t  baseAddress)

Triggers pulse generator.

This function triggers the pulse generator if SAPH_PPG_TRIGGER_SOURCE_SOFTWARE is selected as the trigger sourcce.

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

§ SAPH_unlock()

void SAPH_unlock ( uint16_t  baseAddress)

Unlocks certain SAPH registers.

Unlock SAPH registers with offset address of 0xF or higher. IIDX, MIS, RIS, IMSC, ICR, ISR, DESCLO, and DESCHI registers are not affected and the registers are not locked. Utilize this function if those registers need to be modified.
NOTE: Most of the SAPH APIs will not work unless SAPH is unlocked.

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

Copyright 2020, Texas Instruments Incorporated