7 #ifndef __MSP430WARE_SAPH_A_H__ 8 #define __MSP430WARE_SAPH_A_H__ 10 #include "inc/hw_memmap.h" 12 #ifdef __MSP430_HAS_SAPH_A__ 31 #define SAPH_A_PHY_CHANNEL_COUNT 2 33 typedef struct _phy_param {
73 typedef struct _phy_bias {
78 uint16_t biasSwitch[SAPH_A_PHY_CHANNEL_COUNT];
115 typedef struct _ppg_count
138 typedef struct _ppg_config
163 typedef struct _asq_config
209 typedef struct _asq_ping_config
219 typedef struct _mcnf_config
240 typedef struct _xpg_config
265 #define SAPH_A_DATA_ERROR_INTERRUPT DATAERR 266 #define SAPH_A_TIMEMARK_F_TIMEOUT_INTERRUPT TMFTO 267 #define SAPH_A_ACQUISITION_SEQUENCER_DONE_INTERRUPT SEQDN 268 #define SAPH_A_PING_TRANSMIT_DONE_INTERRUPT PNGDN 276 #define SAPH_A_PHY_CHANNEL_1 0 277 #define SAPH_A_PHY_CHANNEL_2 1 285 #define SAPH_A_PHY_OUTPUT_HIGH CH0OUT_1 286 #define SAPH_A_PHY_OUTPUT_LOW CH0OUT_0 294 #define SAPH_A_PHY_OUTPUT_ENABLE CH0OE_1 295 #define SAPH_A_PHY_OUTPUT_DISABLE CH0OE_0 303 #define SAPH_A_PHY_FULLPULL_ENABLE CH0FP_1 304 #define SAPH_A_PHY_FULLPULL_DISABLE CH0FP_0 312 #define SAPH_A_PHY_TERMINATION_ENABLE CH0TERM_1 313 #define SAPH_A_PHY_TERMINATION_DISABLE CH0TERM_0 321 #define SAPH_A_PHY_OUTPUT_GENERAL_PURPOSE PCH0SEL_0 322 #define SAPH_A_PHY_OUTPUT_PULSEGENERATOR_SINGLE_DRIVE PCH0SEL_1 323 #define SAPH_A_PHY_OUTPUT_PULSEGENERATOR_DIFFERENTIAL_DRIVE PCH0SEL_2 331 #define SAPH_A_PHY_DUMMYLOAD_ENABLE DUMEN_1 332 #define SAPH_A_PHY_DUMMYLOAD_DISABLE DUMEN_0 340 #define SAPH_A_PHY_SOURCE_CONTROLLED_BY_REGISTER MUXCTL_0 341 #define SAPH_A_PHY_SOURCE_CONTROLLED_BY_ASQ MUXCTL_1 349 #define SAPH_A_PHY_INPUT_CHANNEL_0 MUXSEL__CH0IN 350 #define SAPH_A_PHY_INPUT_CHANNEL_1 MUXSEL__CH1IN 358 #define SAPH_A_PHY_BIAS_SWITCH_OPEN CH0EBSW_0 359 #define SAPH_A_PHY_BIAS_SWITCH_CLOSED CH0EBSW_1 367 #define SAPH_A_PHY_PGA_BIAS_GROUNDED PGABIAS_0 368 #define SAPH_A_PHY_PGA_BIAS_LOW_VALUE PGABIAS_1 369 #define SAPH_A_PHY_PGA_BIAS_NOMINAL_VALUE PGABIAS_2 370 #define SAPH_A_PHY_PGA_BIAS_HIGH_VALUE PGABIAS_3 378 #define SAPH_A_PHY_EXCITATION_BIAS_GROUNDED EXCBIAS_0 379 #define SAPH_A_PHY_EXCITATION_BIAS_LOW_VALUE EXCBIAS_1 380 #define SAPH_A_PHY_EXCITATION_BIAS_NOMINAL_VALUE EXCBIAS_2 381 #define SAPH_A_PHY_EXCITATION_BIAS_HIGH_VALUE EXCBIAS_3 389 #define SAPH_A_PHY_MULTIPLEXER_CHARGEPUMP_ENABLE CPDA_1 390 #define SAPH_A_PHY_MULTIPLEXER_CHARGEPUMP_DISABLE CPDA_0 398 #define SAPH_A_PHY_LEAKAGE_COMPENSATION_ENABLE LILC_1 399 #define SAPH_A_PHY_LEAKAGE_COMPENSATION_DISABLE LILC_0 407 #define SAPH_A_PHY_PGA_BIAS_SWITCH_OPEN PGABSW_0 408 #define SAPH_A_PHY_PGA_BIAS_SWITCH_CLOSED PGABSW_1 416 #define SAPH_A_PHY_BIAS_SWITCH_CONTROLLED_BY_REGISTER ASQBSC_0 417 #define SAPH_A_PHY_BIAS_SWITCH_CONTROLLED_BY_ASQ ASQBSC_1 425 #define SAPH_A_PPG_HIGH_IMPEDANCE_ON_PAUSE_HIGH PHIZ_1 426 #define SAPH_A_PPG_HIGH_IMPEDANCE_ON_PAUSE_LOW PHIZ_0 434 #define SAPH_A_PPG_PAUSE_LEVEL_HIGH PLEV_1 435 #define SAPH_A_PPG_PAUSE_LEVEL_LOW PLEV_0 443 #define SAPH_A_PPG_PAUSE_POLARITY_HIGH PPOL_0 444 #define SAPH_A_PPG_PAUSE_POLARITY_LOW PPOL_1 452 #define SAPH_A_PPG_PRESCALER_ENABLE PSCEN_1 453 #define SAPH_A_PPG_PRESCALER_DISABLE PSCEN_0 461 #define SAPH_A_PPG_TRIGGER_SOURCE_SOFTWARE TRSEL_0 462 #define SAPH_A_PPG_TRIGGER_SOURCE_ASQ TRSEL_1 463 #define SAPH_A_PPG_TRIGGER_SOURCE_TIMER TRSEL_2 471 #define SAPH_A_PPG_CHANNEL_0 PPGCHSEL_0 472 #define SAPH_A_PPG_CHANNEL_1 PPGCHSEL_1 480 #define SAPH_A_PPG_PORT_CHARGED_BY_PPG PGSEL_0 481 #define SAPH_A_PPG_PORT_CHARGED_BY_ASEQ PGSEL_1 489 #define SAPH_A_ASQ_ABORT_ON_ERROR_ENABLE ERABRT_1 490 #define SAPH_A_ASQ_ABORT_ON_ERROR_DISABLE ERABRT_0 498 #define SAPH_A_ASQ_TRIGGER_SOURCE_SOFTWARE TRIGSEL__SWTRIG 499 #define SAPH_A_ASQ_TRIGGER_SOURCE_P_SEQUENCER TRIGSEL__PSQ 500 #define SAPH_A_ASQ_TRIGGER_SOURCE_TIMER TRIGSEL__TIMER 508 #define SAPH_A_ASQ_CHANNEL_0 ASQCHSEL_0 509 #define SAPH_A_ASQ_CHANNEL_1 ASQCHSEL_1 517 #define SAPH_A_ASQ_DIFFERENT_CHANNEL CHOWN_0 518 #define SAPH_A_ASQ_IDENTICAL_CHANNEL CHOWN_1 526 #define SAPH_A_ASQ_STANDBY_INDICATION_POWEROFF STDBY__PWROFF 527 #define SAPH_A_ASQ_STANDBY_INDICATION_STANDBY STDBY__STDBY 535 #define SAPH_A_ASQ_END_OF_SEQUENCE_OFF_DISABLE ESOFF_0 536 #define SAPH_A_ASQ_END_OF_SEQUENCE_OFF_ENABLE ESOFF_1 544 #define SAPH_A_ASQ_EARLY_RECEIVE_BIAS_BY_TIMEMARK_C EARLYRB_0 545 #define SAPH_A_ASQ_EARLY_RECEIVE_BIAS_BY_TIMEMARK_A EARLYRB_1 553 #define SAPH_A_ASQ_TOGGLE_CHANNEL_ENABLE CHTOG_1 554 #define SAPH_A_ASQ_TOGGLE_CHANNEL_DISABLE CHTOG_0 562 #define SAPH_A_LOW_POWER_BIAS_MODE_DISABLE LPBE_0 563 #define SAPH_A_LOW_POWER_BIAS_MODE_ENABLE LPBE_1 571 #define SAPH_A_CHARGE_PUMP_ON_SDHS_ASQ_REQUESTS_ONLY CPEO_0 572 #define SAPH_A_CHARGE_PUMP_ON_ALWAYS CPEO_1 580 #define SAPH_A_MCNF_500_OHMS_RXBIAS_450_OHMS_TXBIAS BIMP_0 581 #define SAPH_A_MCNF_900_OHMS_RXBIAS_850_OHMS_TXBIAS BIMP_1 582 #define SAPH_A_MCNF_1500_OHMS_RXBIAS_1450_OHMS_TXBIAS BIMP_2 583 #define SAPH_A_MCNF_2950_OHMS_RXBIAS_2900_OHMS_TXBIAS BIMP_3 591 #define SAPH_A_TIMER_COUNT_EVENT ETY_0 592 #define SAPH_A_DMA_TRIGGER_EVENT ETY_1 600 #define SAPH_A_SINGLE_TONE_GENERATION XMOD_0 601 #define SAPH_A_DUAL_TONE_GENERATION XMOD_2 602 #define SAPH_A_DUAL_TONE_LOOP XMOD_3 610 #define SAPH_A_PPG_STOP_PHASE XSTAT_0 611 #define SAPH_A_PPG_PAUSE_PHASE XSTAT_1 612 #define SAPH_A_PPG_REGULAR_EXCITATION_PHASE XSTAT_2 613 #define SAPH_A_PPG_EXTRA_EXCITATION_PHASE XSTAT_3 782 uint16_t enableDummyLoad, uint16_t sourceControl, uint16_t inputChannel);
997 uint16_t prescalerStartValue);
1198 #endif // __MSP430WARE_SAPH_A_H__ uint16_t extendedMode
Definition: saph_a.h:252
uint8_t SAPH_A_getInterruptStatus(uint16_t baseAddress, uint8_t mask)
Gets the current SAPH_A interrupt status.
Definition: saph_a.c:46
uint16_t terminationTrim
Is the channel termination trim pattern.
Definition: saph_a.h:70
uint16_t channelSelect
Definition: saph_a.h:181
uint16_t pauseLevel
Sets ASQ ping counter for pause level.
Definition: saph_a.h:214
void SAPH_A_configurePHY(uint16_t baseAddress, SAPH_A_configPHYParam *config)
Configures physical interface output and trim values.
Definition: saph_a.c:51
uint16_t enableTermination
Definition: saph_a.h:58
uint16_t triggerSource
Definition: saph_a.h:176
uint16_t chargePump
Definition: saph_a.h:230
uint16_t SAPH_A_getPPGPhaseStatus(uint16_t baseAddress)
Returns the phase status of PPG.
Definition: saph_a.c:252
uint16_t biasSwitchPGA
Definition: saph_a.h:107
uint16_t polarity
Sets ASQ ping counter for polarity.
Definition: saph_a.h:212
void SAPH_A_setPPGHighPeriod(uint16_t baseAddress, uint16_t period)
Sets pulse generator high period.
Definition: saph_a.c:117
void SAPH_A_enableChargePumpAlways(uint16_t baseAddress)
Keeps charge pump of the input multiplexer always on.
Definition: saph_a.c:222
uint16_t stopPauseCount
Sets the stop pulse count.
Definition: saph_a.h:133
uint16_t enableOutput
Definition: saph_a.h:48
void SAPH_A_configurePPG(uint16_t baseAddress, SAPH_A_configPPGParam *config)
Configures pulse generator.
Definition: saph_a.c:123
uint16_t portSelect
Definition: saph_a.h:160
uint16_t sideOfChannel
Definition: saph_a.h:186
uint16_t outputValue
Definition: saph_a.h:43
uint16_t pauseHighImpedance
Sets ASQ ping counter for high impedance.
Definition: saph_a.h:216
void SAPH_A_configureASQ(uint16_t baseAddress, SAPH_A_configASQParam *config)
Configures acquisition sequencer.
Definition: saph_a.c:141
uint16_t highImpedance
Definition: saph_a.h:121
void SAPH_A_setPPGLowPeriod(uint16_t baseAddress, uint16_t period)
Sets pulse generator low period.
Definition: saph_a.c:111
uint16_t enablePrescaler
Definition: saph_a.h:144
void SAPH_A_startASQTimer(uint16_t baseAddress)
Starts acquisition timer.
Definition: saph_a.c:185
uint16_t standByIndication
Definition: saph_a.h:191
uint16_t endOfSequence
Definition: saph_a.h:196
void SAPH_A_configurePPGCount(uint16_t baseAddress, SAPH_A_configPPGCountParam *config)
Configures pulse generator count.
Definition: saph_a.c:103
void SAPH_A_disableInterrupt(uint16_t baseAddress, uint8_t mask)
Disables selected SAPH_A interrupt sources.
Definition: saph_a.c:41
uint16_t channel
Definition: saph_a.h:38
uint16_t eventType
Definition: saph_a.h:246
void SAPH_A_configureASQPing(uint16_t baseAddress, SAPH_A_configASQPingParam *config)
Configures acquisition sequencer ping parameters.
Definition: saph_a.c:167
uint16_t pausePolarity
Definition: saph_a.h:131
void SAPH_A_setXPGHighPeriod(uint16_t baseAddress, uint16_t period)
Sets extended pulse generator high period.
Definition: saph_a.c:247
uint16_t biasImpedance
Definition: saph_a.h:237
uint16_t earlyReceiveBias
Definition: saph_a.h:201
uint16_t extraPulses
Selects count of extra excitation pulses excited.
Definition: saph_a.h:254
uint16_t outputFunction
Definition: saph_a.h:64
void SAPH_A_triggerASQ(uint16_t baseAddress)
Triggers acquisition sequencer.
Definition: saph_a.c:152
uint16_t excitationPulseCount
Sets the excitation pulse count.
Definition: saph_a.h:135
void SAPH_A_configureExtendedPPG(uint16_t baseAddress, SAPH_A_configXPGParam *config)
Configures extended pulse generator.
Definition: saph_a.c:238
void SAPH_A_enableChargePumpOnAcquisitionOnly(uint16_t baseAddress)
Charge pump of input multiplexer is only turned on by data acquisition.
Definition: saph_a.c:227
uint16_t triggerSource
Definition: saph_a.h:150
void SAPH_A_configureASQTimeBase(uint16_t baseAddress, uint16_t prescalerStartValue)
Configures acquisition sequencer time base parameters.
Definition: saph_a.c:179
uint16_t channelSelect
Definition: saph_a.h:155
uint16_t enableLeakageCompensation
Definition: saph_a.h:102
void SAPH_A_setXPGLowPeriod(uint16_t baseAddress, uint16_t period)
Sets extended pulse generator low period.
Definition: saph_a.c:243
void SAPH_A_configureMode(uint16_t baseAddress, SAPH_A_configModeParam *config)
Configures certain mode configuration parameters.
Definition: saph_a.c:200
uint16_t pauseLevel
Definition: saph_a.h:126
void SAPH_A_clearInterrupt(uint16_t baseAddress, uint8_t mask)
Clears SAPH_A interrupts.
Definition: saph_a.c:31
uint16_t pullUpTrim
Is the channel pull up trim pattern.
Definition: saph_a.h:66
void SAPH_A_enableLowPowerBiasMode(uint16_t baseAddress)
Enables low power bias operation mode.
Definition: saph_a.c:212
void SAPH_A_enableInterrupt(uint16_t baseAddress, uint8_t mask)
Enables SAPH_A interrupts.
Definition: saph_a.c:36
uint16_t lowPowerBiasMode
Definition: saph_a.h:225
void SAPH_A_stopASQTimer(uint16_t baseAddress)
Stops acquisition timer.
Definition: saph_a.c:190
void SAPH_A_stopASQ(uint16_t baseAddress)
Stops acquisition sequencer.
Definition: saph_a.c:157
uint16_t enableFullPull
Definition: saph_a.h:53
void SAPH_A_configurePHYMultiplexer(uint16_t baseAddress, uint16_t enableDummyLoad, uint16_t sourceControl, uint16_t inputChannel)
Configures physical interface multiplexer.
Definition: saph_a.c:81
uint16_t enableChannelToggle
Definition: saph_a.h:206
uint16_t biasExcitation
Definition: saph_a.h:92
uint16_t abortOnError
Definition: saph_a.h:170
void SAPH_A_lock(uint16_t baseAddress)
Locks certain SAPH_A registers.
Definition: saph_a.c:26
uint8_t SAPH_A_getASQPingCounter(uint16_t baseAddress)
Gets ping counter of acquisition sequencer.
Definition: saph_a.c:162
void SAPH_A_unlock(uint16_t baseAddress)
Unlocks certain SAPH_A registers.
Definition: saph_a.c:21
void SAPH_A_triggerPPG(uint16_t baseAddress)
Triggers pulse generator.
Definition: saph_a.c:131
uint16_t biasPGA
Definition: saph_a.h:85
void SAPH_A_stopPPG(uint16_t baseAddress)
Stops pulse generator.
Definition: saph_a.c:136
uint16_t pullDownTrim
Is the channel pull down trim pattern.
Definition: saph_a.h:68
void SAPH_A_disableLowPowerBiasMode(uint16_t baseAddress)
Disables low power bias operation mode.
Definition: saph_a.c:217
uint16_t biasSwitchASQ
Definition: saph_a.h:112
void SAPH_A_clearASQTimer(uint16_t baseAddress)
Clears acquisition timer.
Definition: saph_a.c:195
uint16_t enableChargePump
Definition: saph_a.h:97
void SAPH_A_configurePHYBias(uint16_t baseAddress, SAPH_A_configPHYBiasParam *config)
Configures physical interface bias.
Definition: saph_a.c:88
void SAPH_A_setBiasGeneratorImpedance(uint16_t baseAddress, uint16_t biasImpedance)
Sets impedance of the buffers for RxBias and TxBias.
Definition: saph_a.c:232