Functions | |
void | SAPH_A_unlock (uint16_t baseAddress) |
Unlocks certain SAPH_A registers. More... | |
void | SAPH_A_lock (uint16_t baseAddress) |
Locks certain SAPH_A registers. More... | |
void | SAPH_A_clearInterrupt (uint16_t baseAddress, uint8_t mask) |
Clears SAPH_A interrupts. More... | |
void | SAPH_A_enableInterrupt (uint16_t baseAddress, uint8_t mask) |
Enables SAPH_A interrupts. More... | |
void | SAPH_A_disableInterrupt (uint16_t baseAddress, uint8_t mask) |
Disables selected SAPH_A interrupt sources. More... | |
uint8_t | SAPH_A_getInterruptStatus (uint16_t baseAddress, uint8_t mask) |
Gets the current SAPH_A interrupt status. More... | |
void | SAPH_A_configurePHY (uint16_t baseAddress, SAPH_A_configPHYParam *config) |
Configures physical interface output and trim values. More... | |
void | SAPH_A_configurePHYMultiplexer (uint16_t baseAddress, uint16_t dummyLoad, uint16_t source, uint16_t input) |
Configures physical interface multiplexer. More... | |
void | SAPH_A_configurePHYBias (uint16_t baseAddress, SAPH_A_configPHYBiasParam *config) |
Configures physical interface bias. More... | |
void | SAPH_A_configurePPGCount (uint16_t baseAddress, SAPH_A_configPPGCountParam *config) |
Configures pulse generator count. More... | |
void | SAPH_A_setPPGLowPeriod (uint16_t baseAddress, uint16_t period) |
Sets pulse generator low period. More... | |
void | SAPH_A_setPPGHighPeriod (uint16_t baseAddress, uint16_t period) |
Sets pulse generator high period. More... | |
void | SAPH_A_configurePPG (uint16_t baseAddress, SAPH_A_configPPGParam *config) |
Configures pulse generator. More... | |
void | SAPH_A_triggerPPG (uint16_t baseAddress) |
Triggers pulse generator. More... | |
void | SAPH_A_stopPPG (uint16_t baseAddress) |
Stops pulse generator. More... | |
void | SAPH_A_configureASQ (uint16_t baseAddress, SAPH_A_configASQParam *config) |
Configures acquisition sequencer. More... | |
void | SAPH_A_triggerASQ (uint16_t baseAddress) |
Triggers acquisition sequencer. More... | |
void | SAPH_A_stopASQ (uint16_t baseAddress) |
Stops acquisition sequencer. More... | |
uint8_t | SAPH_A_getASQPingCounter (uint16_t baseAddress) |
Gets ping counter of acquisition sequencer. More... | |
void | SAPH_A_configureASQPing (uint16_t baseAddress, SAPH_A_configASQPingParam *config) |
Configures acquisition sequencer ping parameters. More... | |
void | SAPH_A_configureASQTimeBase (uint16_t baseAddress, uint16_t prescalerStartValue) |
Configures acquisition sequencer time base parameters. More... | |
void | SAPH_A_startASQTimer (uint16_t baseAddress) |
Starts acquisition timer. More... | |
void | SAPH_A_stopASQTimer (uint16_t baseAddress) |
Stops acquisition timer. More... | |
void | SAPH_A_clearASQTimer (uint16_t baseAddress) |
Clears acquisition timer. More... | |
void | SAPH_A_configureMode (uint16_t baseAddress, SAPH_A_configModeParam *config) |
Configures certain mode configuration parameters. More... | |
void | SAPH_A_enableLowPowerBiasMode (uint16_t baseAddress) |
Enables low power bias operation mode. More... | |
void | SAPH_A_disableLowPowerBiasMode (uint16_t baseAddress) |
Disables low power bias operation mode. More... | |
void | SAPH_A_enableChargePumpAlways (uint16_t baseAddress) |
Keeps charge pump of the input multiplexer always on. More... | |
void | SAPH_A_enableChargePumpOnAcquisitionOnly (uint16_t baseAddress) |
Charge pump of input multiplexer is only turned on by data acquisition. More... | |
void | SAPH_A_setBiasGeneratorImpedance (uint16_t baseAddress, uint16_t biasImpedance) |
Sets impedance of the buffers for RxBias and TxBias. More... | |
void | SAPH_A_configureExtendedPPG (uint16_t baseAddress, SAPH_A_configXPGParam *config) |
Configures extended pulse generator. More... | |
void | SAPH_A_setXPGLowPeriod (uint16_t baseAddress, uint16_t period) |
Sets extended pulse generator low period. More... | |
void | SAPH_A_setXPGHighPeriod (uint16_t baseAddress, uint16_t period) |
Sets extended pulse generator high period. More... | |
uint16_t | SAPH_A_getPPGPhaseStatus (uint16_t baseAddress) |
Returns the phase status of PPG. More... | |
void SAPH_A_clearASQTimer | ( | uint16_t | baseAddress | ) |
Clears acquisition timer.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_clearInterrupt | ( | uint16_t | baseAddress, |
uint8_t | mask | ||
) |
Clears SAPH_A interrupts.
The SAPH_A 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_A module. |
mask | is the logical OR of any of the following:
|
void SAPH_A_configureASQ | ( | uint16_t | baseAddress, |
SAPH_A_configASQParam * | config | ||
) |
Configures acquisition sequencer.
This configures SAPH_A acquisition sequencer:
baseAddress | is the base address of the SAPH_A module. |
config | is the pointer to the struct for acquisition sequencer configuration. |
References SAPH_A_configASQParam::abortOnError, SAPH_A_configASQParam::channelSelect, SAPH_A_configASQParam::earlyReceiveBias, SAPH_A_configASQParam::enableChannelToggle, SAPH_A_configASQParam::endOfSequence, SAPH_A_configASQParam::sideOfChannel, SAPH_A_configASQParam::standByIndication, and SAPH_A_configASQParam::triggerSource.
void SAPH_A_configureASQPing | ( | uint16_t | baseAddress, |
SAPH_A_configASQPingParam * | config | ||
) |
Configures acquisition sequencer ping parameters.
This configures SAPH_A acquisition sequencer ping:
baseAddress | is the base address of the SAPH_A module. |
config | is the pointer to the struct for acquisition sequencer ping configuration. |
References SAPH_A_configASQPingParam::pauseHighImpedance, SAPH_A_configASQPingParam::pauseLevel, and SAPH_A_configASQPingParam::polarity.
void SAPH_A_configureASQTimeBase | ( | uint16_t | baseAddress, |
uint16_t | prescalerStartValue | ||
) |
Configures acquisition sequencer time base parameters.
This configures SAPH_A acquisition sequencer time base parameters:
baseAddress | is the base address of the SAPH_A module. |
prescalerStartValue | is the ASQ prescaler start value. |
void SAPH_A_configureExtendedPPG | ( | uint16_t | baseAddress, |
SAPH_A_configXPGParam * | config | ||
) |
Configures extended pulse generator.
This configures SAPH_A extended pulse generator:
baseAddress | is the base address of the SAPH_A module. |
config | is the pointer to the struct for extended pulse generator configuration. |
References SAPH_A_configXPGParam::eventType, SAPH_A_configXPGParam::extendedMode, and SAPH_A_configXPGParam::extraPulses.
void SAPH_A_configureMode | ( | uint16_t | baseAddress, |
SAPH_A_configModeParam * | config | ||
) |
Configures certain mode configuration parameters.
This configures SAPH:
baseAddress | is the base address of the SAPH_A module. |
config | is the pointer to the struct for mode configuration. |
References SAPH_A_configModeParam::biasImpedance, SAPH_A_configModeParam::chargePump, and SAPH_A_configModeParam::lowPowerBiasMode.
void SAPH_A_configurePHY | ( | uint16_t | baseAddress, |
SAPH_A_configPHYParam * | config | ||
) |
Configures physical interface output and trim values.
This configures SAPH_A physical interface:
baseAddress | is the base address of the SAPH_A module. |
config | is the pointer to the struct for physical interface configuration. |
References SAPH_A_configPHYParam::channel, SAPH_A_configPHYParam::enableFullPull, SAPH_A_configPHYParam::enableOutput, SAPH_A_configPHYParam::enableTermination, SAPH_A_configPHYParam::outputFunction, SAPH_A_configPHYParam::outputValue, SAPH_A_configPHYParam::pullDownTrim, SAPH_A_configPHYParam::pullUpTrim, and SAPH_A_configPHYParam::terminationTrim.
void SAPH_A_configurePHYBias | ( | uint16_t | baseAddress, |
SAPH_A_configPHYBiasParam * | config | ||
) |
Configures physical interface bias.
This configures SAPH_A physical interface bias parameters:
baseAddress | is the base address of the SAPH_A module. |
config | is the pointer to the struct for physical interface bias configuration. |
References SAPH_A_configPHYBiasParam::biasExcitation, SAPH_A_configPHYBiasParam::biasPGA, SAPH_A_configPHYBiasParam::biasSwitch, SAPH_A_configPHYBiasParam::biasSwitchASQ, SAPH_A_configPHYBiasParam::biasSwitchPGA, SAPH_A_configPHYBiasParam::enableChargePump, and SAPH_A_configPHYBiasParam::enableLeakageCompensation.
void SAPH_A_configurePHYMultiplexer | ( | uint16_t | baseAddress, |
uint16_t | enableDummyLoad, | ||
uint16_t | sourceControl, | ||
uint16_t | inputChannel | ||
) |
Configures physical interface multiplexer.
This configures SAPH_A physical interface mutliplexer for dummy load, channel multiplexer source control and input channel selection.
baseAddress | is the base address of the SAPH_A 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_A_configurePPG | ( | uint16_t | baseAddress, |
SAPH_A_configPPGParam * | config | ||
) |
Configures pulse generator.
This configures SAPH_A pulse generator:
baseAddress | is the base address of the SAPH_A module. |
config | is the pointer to the struct for pulse generator configuration. |
References SAPH_A_configPPGParam::channelSelect, SAPH_A_configPPGParam::enablePrescaler, SAPH_A_configPPGParam::portSelect, and SAPH_A_configPPGParam::triggerSource.
void SAPH_A_configurePPGCount | ( | uint16_t | baseAddress, |
SAPH_A_configPPGCountParam * | config | ||
) |
Configures pulse generator count.
This configures SAPH_A pulse generator count:
baseAddress | is the base address of the SAPH_A module. |
config | is the pointer to the struct for pulse generator count configuration. |
References SAPH_A_configPPGCountParam::excitationPulseCount, SAPH_A_configPPGCountParam::highImpedance, SAPH_A_configPPGCountParam::pauseLevel, SAPH_A_configPPGCountParam::pausePolarity, and SAPH_A_configPPGCountParam::stopPauseCount.
void SAPH_A_disableInterrupt | ( | uint16_t | baseAddress, |
uint8_t | mask | ||
) |
Disables selected SAPH_A interrupt sources.
Disables the indicated SAPH_A 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_A module. |
mask | is the logical OR of any of the following:
|
void SAPH_A_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_A module. |
void SAPH_A_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_A module. |
void SAPH_A_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_A_configurePHYBias()] in the SAPH_A module.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_enableInterrupt | ( | uint16_t | baseAddress, |
uint8_t | mask | ||
) |
Enables SAPH_A interrupts.
Enables the indicated SAPH_A 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_A module. |
mask | is the logical OR of any of the following:
|
void SAPH_A_enableLowPowerBiasMode | ( | uint16_t | baseAddress | ) |
Enables low power bias operation mode.
In this mode, the SAPH_A 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_A module. |
uint8_t SAPH_A_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_A module. |
uint8_t SAPH_A_getInterruptStatus | ( | uint16_t | baseAddress, |
uint8_t | mask | ||
) |
Gets the current SAPH_A interrupt status.
This returns the interrupt status for the SAPH_A module based on which flag is passed.
baseAddress | is the base address of the SAPH_A module. |
mask | is the logical OR of any of the following:
|
uint16_t SAPH_A_getPPGPhaseStatus | ( | uint16_t | baseAddress | ) |
Returns the phase status of PPG.
Returns the phase status of PPG. Reads from SAPH_AXPGCTL.XSTAT.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_lock | ( | uint16_t | baseAddress | ) |
Locks certain SAPH_A registers.
Locks SAPH_A 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_A_unlock() after necessary registers have been modified. SAPH_A registers, with the exception of the list in paragraph above, are locked by default.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_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_A module. |
biasImpedance | sets bias impedance for RxBias and TxBias. Valid values are:
|
void SAPH_A_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_A module. |
period | is the high period value to set. |
void SAPH_A_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_A module. |
period | is the low period value to set. |
void SAPH_A_setXPGHighPeriod | ( | uint16_t | baseAddress, |
uint16_t | period | ||
) |
Sets extended pulse generator high period.
The high phase of period of generator pulses defines the length of high phase of the extra 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_A module. |
period | is the high period value to set. |
void SAPH_A_setXPGLowPeriod | ( | uint16_t | baseAddress, |
uint16_t | period | ||
) |
Sets extended pulse generator low period.
The low phase of period of generator pulses defines the length of low phase of the extra pulses in units of high speed clocks. The minimum count is two regardless of the value set in this register. Reset type: PUC
baseAddress | is the base address of the SAPH_A module. |
period | is the low period value to set. |
void SAPH_A_startASQTimer | ( | uint16_t | baseAddress | ) |
Starts acquisition timer.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_stopASQ | ( | uint16_t | baseAddress | ) |
Stops acquisition sequencer.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_stopASQTimer | ( | uint16_t | baseAddress | ) |
Stops acquisition timer.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_stopPPG | ( | uint16_t | baseAddress | ) |
Stops pulse generator.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_triggerASQ | ( | uint16_t | baseAddress | ) |
Triggers acquisition sequencer.
This function triggers the acquisition sequencer if SAPH_A_ASQ_TRIGGER_SOURCE_SOFTWARE is selected as the trigger sourcce.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_triggerPPG | ( | uint16_t | baseAddress | ) |
Triggers pulse generator.
This function triggers the pulse generator if SAPH_A_PPG_TRIGGER_SOURCE_SOFTWARE is selected as the trigger sourcce.
baseAddress | is the base address of the SAPH_A module. |
void SAPH_A_unlock | ( | uint16_t | baseAddress | ) |
Unlocks certain SAPH_A registers.
Unlock SAPH_A 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_A APIs will not work unless SAPH_A is unlocked.
baseAddress | is the base address of the SAPH_A module. |