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... | |
void SAPH_clearASQTimer | ( | uint16_t | baseAddress | ) |
Clears acquisition timer.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |
mask | is the logical OR of any of the following:
|
void SAPH_configureASQ | ( | uint16_t | baseAddress, |
SAPH_configASQParam * | config | ||
) |
Configures acquisition sequencer.
This configures SAPH acquisition sequencer:
baseAddress | is the base address of the SAPH module. |
config | is the pointer to the struct for acquisition sequencer configuration. |
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.
void SAPH_configureASQPing | ( | uint16_t | baseAddress, |
SAPH_configASQPingParam * | config | ||
) |
Configures acquisition sequencer ping parameters.
This configures SAPH acquisition sequencer ping:
baseAddress | is the base address of the SAPH module. |
config | is the pointer to the struct for acquisition sequencer ping configuration. |
References SAPH_configASQPingParam::pauseHighImpedance, SAPH_configASQPingParam::pauseLevel, and SAPH_configASQPingParam::polarity.
void SAPH_configureASQTimeBase | ( | uint16_t | baseAddress, |
uint16_t | prescalerStartValue | ||
) |
Configures acquisition sequencer time base parameters.
This configures SAPH acquisition sequencer time base parameters:
baseAddress | is the base address of the SAPH module. |
prescalerStartValue | is the ASQ prescaler start value. |
void SAPH_configureMode | ( | uint16_t | baseAddress, |
SAPH_configModeParam * | config | ||
) |
Configures certain mode configuration parameters.
This configures SAPH:
baseAddress | is the base address of the SAPH module. |
config | is the pointer to the struct for mode configuration. |
References SAPH_configModeParam::biasImpedance, SAPH_configModeParam::chargePump, and SAPH_configModeParam::lowPowerBiasMode.
void SAPH_configurePHY | ( | uint16_t | baseAddress, |
SAPH_configPHYParam * | config | ||
) |
Configures physical interface output and trim values.
This configures SAPH physical interface:
baseAddress | is the base address of the SAPH module. |
config | is the pointer to the struct for physical interface configuration. |
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.
void SAPH_configurePHYBias | ( | uint16_t | baseAddress, |
SAPH_configPHYBiasParam * | config | ||
) |
Configures physical interface bias.
This configures SAPH physical interface bias parameters:
baseAddress | is the base address of the SAPH module. |
config | is the pointer to the struct for physical interface bias configuration. |
References SAPH_configPHYBiasParam::biasExcitation, SAPH_configPHYBiasParam::biasPGA, SAPH_configPHYBiasParam::biasSwitch, SAPH_configPHYBiasParam::biasSwitchASQ, SAPH_configPHYBiasParam::biasSwitchPGA, SAPH_configPHYBiasParam::enableChargePump, and SAPH_configPHYBiasParam::enableLeakageCompensation.
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.
baseAddress | is the base address of the SAPH module. |
enableDummyLoad | indicates whether to enable/disable dummy load on non- selected multiplexer inputs. Valid values are:
|
sourceControl | selects which controls the multiplexer. Valid values are:
|
inputChannel | selects input channel. Valid values are:
|
void SAPH_configurePPG | ( | uint16_t | baseAddress, |
SAPH_configPPGParam * | config | ||
) |
Configures pulse generator.
This configures SAPH pulse generator:
baseAddress | is the base address of the SAPH module. |
config | is the pointer to the struct for pulse generator configuration. |
References SAPH_configPPGParam::channelSelect, SAPH_configPPGParam::enablePrescaler, SAPH_configPPGParam::portSelect, and SAPH_configPPGParam::triggerSource.
void SAPH_configurePPGCount | ( | uint16_t | baseAddress, |
SAPH_configPPGCountParam * | config | ||
) |
Configures pulse generator count.
This configures SAPH pulse generator count:
baseAddress | is the base address of the SAPH module. |
config | is the pointer to the struct for pulse generator count configuration. |
References SAPH_configPPGCountParam::excitationPulseCount, SAPH_configPPGCountParam::highImpedance, SAPH_configPPGCountParam::pauseLevel, SAPH_configPPGCountParam::pausePolarity, and SAPH_configPPGCountParam::stopPauseCount.
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.
baseAddress | is the base address of the SAPH module. |
mask | is the logical OR of any of the following:
|
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.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |
mask | is the logical OR of any of the following:
|
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.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |
mask | is the logical OR of any of the following:
|
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.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |
biasImpedance | sets bias impedance for RxBias and TxBias. Valid values are:
|
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.
baseAddress | is the base address of the SAPH module. |
period | is the high period value to set. |
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.
baseAddress | is the base address of the SAPH module. |
period | is the low period value to set. |
void SAPH_startASQTimer | ( | uint16_t | baseAddress | ) |
Starts acquisition timer.
baseAddress | is the base address of the SAPH module. |
void SAPH_stopASQ | ( | uint16_t | baseAddress | ) |
Stops acquisition sequencer.
baseAddress | is the base address of the SAPH module. |
void SAPH_stopASQTimer | ( | uint16_t | baseAddress | ) |
Stops acquisition timer.
baseAddress | is the base address of the SAPH module. |
void SAPH_stopPPG | ( | uint16_t | baseAddress | ) |
Stops pulse generator.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |
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.
baseAddress | is the base address of the SAPH module. |