MSP430 DriverLib for MSP430FR5xx_6xx Devices  2.91.13.01
saph_a.h
1 //*****************************************************************************
2 //
3 // saph_a.h - Driver for the SAPH_A Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_SAPH_A_H__
8 #define __MSP430WARE_SAPH_A_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_SAPH_A__
13 
14 //*****************************************************************************
15 //
16 // If building with a C++ compiler, make all of the definitions in this header
17 // have a C binding.
18 //
19 //*****************************************************************************
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 //*****************************************************************************
26 //
27 // The following value specifies how many configurable channels in physcial
28 // interface.
29 //
30 //*****************************************************************************
31 #define SAPH_A_PHY_CHANNEL_COUNT 2
32 
33 typedef struct _phy_param {
34  //! Is the physical output channel to configure.
35  //! \n Valid values are:
36  //! - \b SAPH_A_PHY_CHANNEL_1
37  //! - \b SAPH_A_PHY_CHANNEL_2
38  uint16_t channel;
39  //! Is the channel output value.
40  //! \n Valid values are:
41  //! - \b SAPH_A_PHY_OUTPUT_HIGH
42  //! - \b SAPH_A_PHY_OUTPUT_LOW [Default]
43  uint16_t outputValue;
44  //! Is the channel output enable.
45  //! \n Valid values are:
46  //! - \b SAPH_A_PHY_OUTPUT_ENABLE
47  //! - \b SAPH_A_PHY_OUTPUT_DISABLE [Default]
48  uint16_t enableOutput;
49  //! Is the channel output full pull enable.
50  //! \n Valid values are:
51  //! - \b SAPH_A_PHY_FULLPULL_ENABLE
52  //! - \b SAPH_A_PHY_FULLPULL_DISABLE [Default]
53  uint16_t enableFullPull;
54  //! Is the channel output termination enable.
55  //! \n Valid values are:
56  //! - \b SAPH_A_PHY_TERMINATION_ENABLE
57  //! - \b SAPH_A_PHY_TERMINATION_DISABLE [Default]
59  //! Is the channel output functional select.
60  //! \n Valid values are:
61  //! - \b SAPH_A_PHY_OUTPUT_GENERAL_PURPOSE [Default]
62  //! - \b SAPH_A_PHY_OUTPUT_PULSEGENERATOR_SINGLE_DRIVE
63  //! - \b SAPH_A_PHY_OUTPUT_PULSEGENERATOR_DIFFERENTIAL_DRIVE
64  uint16_t outputFunction;
65  //! Is the channel pull up trim pattern.
66  uint16_t pullUpTrim;
67  //! Is the channel pull down trim pattern.
68  uint16_t pullDownTrim;
69  //! Is the channel termination trim pattern.
70  uint16_t terminationTrim;
72 
73 typedef struct _phy_bias {
74  //! Selects the channel for excitation bias switch.
75  //! \n Valid values are:
76  //! - \b SAPH_A_PHY_BIAS_SWITCH_OPEN [Default]
77  //! - \b SAPH_A_PHY_BIAS_SWITCH_CLOSED
78  uint16_t biasSwitch[SAPH_A_PHY_CHANNEL_COUNT];
79  //! Selects PGA bias.
80  //! \n Valid values are:
81  //! - \b SAPH_A_PHY_PGA_BIAS_GROUNDED
82  //! - \b SAPH_A_PHY_PGA_BIAS_LOW_VALUE
83  //! - \b SAPH_A_PHY_PGA_BIAS_NOMINAL_VALUE
84  //! - \b SAPH_A_PHY_PGA_BIAS_HIGH_VALUE
85  uint16_t biasPGA;
86  //! Selects excitation bias.
87  //! \n Valid values are:
88  //! - \b SAPH_A_PHY_EXCITATION_BIAS_GROUNDED
89  //! - \b SAPH_A_PHY_EXCITATION_BIAS_LOW_VALUE
90  //! - \b SAPH_A_PHY_EXCITATION_BIAS_NOMINAL_VALUE
91  //! - \b SAPH_A_PHY_EXCITATION_BIAS_HIGH_VALUE
92  uint16_t biasExcitation;
93  //! Enables charge pump during acquisition.
94  //! \n Valid values are:
95  //! - \b SAPH_A_PHY_MULTIPLEXER_CHARGEPUMP_ENABLE
96  //! - \b SAPH_A_PHY_MULTIPLEXER_CHARGEPUMP_DISABLE
97  uint16_t enableChargePump;
98  //! Enables line input leakage compensation.
99  //! \n Valid values are:
100  //! - \b SAPH_A_PHY_LEAKAGE_COMPENSATION_ENABLE
101  //! - \b SAPH_A_PHY_LEAKAGE_COMPENSATION_DISABLE
103  //! Selects PGA bias switch open or closed.
104  //! \n Valid values are:
105  //! - \b SAPH_A_PHY_PGA_BIAS_SWITCH_OPEN
106  //! - \b SAPH_A_PHY_PGA_BIAS_SWITCH_CLOSED
107  uint16_t biasSwitchPGA;
108  //! Select ASQ bias switch control.
109  //! \n Valid values are:
110  //! - \b SAPH_A_PHY_BIAS_SWITCH_CONTROLLED_BY_REGISTER
111  //! - \b SAPH_A_PHY_BIAS_SWITCH_CONTROLLED_BY_ASQ
112  uint16_t biasSwitchASQ;
114 
115 typedef struct _ppg_count
116 {
117  //! Selects high impedance input.
118  //! \n Valid values are:
119  //! - \b SAPH_A_PPG_HIGH_IMPEDANCE_ON_PAUSE_OUTPUTDRIVE
120  //! - \b SAPH_A_PPG_HIGH_IMPEDANCE_ON_PAUSE_PLEV
121  uint16_t highImpedance;
122  //! Sets the pause level high or low.
123  //! \n Valid values are:
124  //! - \b SAPH_A_PPG_PAUSE_LEVEL_LOW
125  //! - \b SAPH_A_PPG_PAUSE_LEVEL_HIGH
126  uint16_t pauseLevel;
127  //! Sets the pause polarity high or low.
128  //! \n Valid values are:
129  //! - \b SAPH_A_PPG_PAUSE_POLARITY_HIGH
130  //! - \b SAPH_A_PPG_PAUSE_POLARITY_LOW
131  uint16_t pausePolarity;
132  //! Sets the stop pulse count.
133  uint16_t stopPauseCount;
134  //! Sets the excitation pulse count.
137 
138 typedef struct _ppg_config
139 {
140  //! Enables PPG prescaler.
141  //! \n Valid values are:
142  //! - \b SAPH_A_PPG_PRESCALER_ENABLE
143  //! - \b SAPH_A_PPG_PRESCALER_DISABLE
144  uint16_t enablePrescaler;
145  //! Selects PPG trigger source.
146  //! \n Valid values are:
147  //! - \b SAPH_A_PPG_TRIGGER_SOURCE_SOFTWARE
148  //! - \b SAPH_A_PPG_TRIGGER_SOURCE_ASQ
149  //! - \b SAPH_A_PPG_TRIGGER_SOURCE_TIMER
150  uint16_t triggerSource;
151  //! Selects PPG channel.
152  //! \n Valid values are:
153  //! - \b SAPH_A_PPG_CHANNEL_0
154  //! - \b SAPH_A_PPG_CHANNEL_1
155  uint16_t channelSelect;
156  //! Selects PPG or ASEQ in charge of PHY port.
157  //! \n Valid values are:
158  //! - \b SAPH_A_PPG_PORT_CHARGED_BY_PPG
159  //! - \b SAPH_A_PPG_PORT_CHARGED_BY_ASEQ
160  uint16_t portSelect;
162 
163 typedef struct _asq_config
164 {
165  //! Enables ASQ abort on errors if the conversion result is outside of expected
166  //! value or an overflow/underflow condition occured.
167  //! \n Valid values are:
168  //! - \b SAPH_A_ASQ_ABORT_ON_ERROR_ENABLE
169  //! - \b SAPH_A_ASQ_ABORT_ON_ERROR_DISABLE
170  uint16_t abortOnError;
171  //! Selects ASQ trigger source.
172  //! \n Valid values are:
173  //! - \b SAPH_A_ASQ_TRIGGER_SOURCE_SOFTWARE
174  //! - \b SAPH_A_ASQ_TRIGGER_SOURCE_P_SEQUENCER
175  //! - \b SAPH_A_ASQ_TRIGGER_SOURCE_TIMER
176  uint16_t triggerSource;
177  //! Selects ASQ channel.
178  //! \n Valid values are:
179  //! - \b SAPH_A_ASQ_CHANNEL_0
180  //! - \b SAPH_A_ASQ_CHANNEL_1
181  uint16_t channelSelect;
182  //! Selects pwn channel or opposite side channel to receive.
183  //! \n Valid values are:
184  //! - \b SAPH_A_ASQ_IDENTICAL_CHANNEL
185  //! - \b SAPH_A_ASQ_DIFFERENT_CHANNEL
186  uint16_t sideOfChannel;
187  //! Selects standby indication.
188  //! \n Valid values are:
189  //! - \b SAPH_A_ASQ_STANDBY_INDICATION_POWEROFF
190  //! - \b SAPH_A_ASQ_STANDBY_INDICATION_STANDBY
192  //! Requests OFF in the end of sequence.
193  //! \n Valid values are:
194  //! - \b SAPH_A_ASQ_END_OF_SEQUENCE_OFF_DISABLE
195  //! - \b SAPH_A_ASQ_END_OF_SEQUENCE_OFF_ENABLE
196  uint16_t endOfSequence;
197  //! Selects early receive bias generating source.
198  //! \n Valid values are:
199  //! - \b SAPH_A_ASQ_EARLY_RECEIVE_BIAS_BY_TIMEMARK_C
200  //! - \b SAPH_A_ASQ_EARLY_RECEIVE_BIAS_BY_TIMEMARK_A
202  //! Enables channel toggle.
203  //! \n Valid values are:
204  //! - \b SAPH_A_ASQ_TOGGLE_CHANNEL_ENABLE
205  //! - \b SAPH_A_ASQ_TOGGLE_CHANNEL_DISABLE
208 
209 typedef struct _asq_ping_config
210 {
211  //! Sets ASQ ping counter for polarity.
212  uint16_t polarity;
213  //! Sets ASQ ping counter for pause level.
214  uint16_t pauseLevel;
215  //! Sets ASQ ping counter for high impedance.
218 
219 typedef struct _mcnf_config
220 {
221  //! Enables/disables low power bias operation mode.
222  //! \n Valid values are:
223  //! - \b SAPH_A_LOW_POWER_BIAS_MODE_DISABLE [Default]
224  //! - \b SAPH_A_LOW_POWER_BIAS_MODE_ENABLE
226  //! Enables/disables charge pump of the input multiplexer.
227  //! \n Valid values are:
228  //! - \b SAPH_A_CHARGE_PUMP_ON_SDHS_ASQ_REQUESTS_ONLY [Default]
229  //! - \b SAPH_A_CHARGE_PUMP_ON_ALWAYS
230  uint16_t chargePump;
231  //! Sets bias impedance for RxBias and TxBias.
232  //! \n Valid values are:
233  //! - \b SAPH_A_MCNF_500_OHMS_RXBIAS_450_OHMS_TXBIAS
234  //! - \b SAPH_A_MCNF_900_OHMS_RXBIAS_850_OHMS_TXBIAS
235  //! - \b SAPH_A_MCNF_1500_OHMS_RXBIAS_1450_OHMS_TXBIAS [Default]
236  //! - \b SAPH_A_MCNF_2950_OHMS_RXBIAS_2900_OHMS_TXBIAS
237  uint16_t biasImpedance;
239 
240 typedef struct _xpg_config
241 {
242  //! Selects the type of event generated by dual tone loop mode.
243  //! \n Valid values are:
244  //! - \b SAPH_A_TIMER_COUNT_EVENT
245  //! - \b SAPH_A_DMA_TRIGGER_EVENT
246  uint16_t eventType;
247  //! Selects extended mode type.
248  //! \n Valid values are:
249  //! - \b SAPH_A_SINGLE_TONE_GENERATION
250  //! - \b SAPH_A_DUAL_TONE_GENERATION
251  //! - \b SAPH_A_DUAL_TONE_LOOP
252  uint16_t extendedMode;
253  //! Selects count of extra excitation pulses excited.
254  uint16_t extraPulses;
256 
257 //*****************************************************************************
258 //
259 // The following are values that can be passed to the mask parameter for
260 // functions: SAPH_A_clearInterrupt(), SAPH_A_enableInterrupt(), and
261 // SAPH_A_disableInterrupt() as well as returned by the
262 // SAPH_A_getInterruptStatus() function.
263 //
264 //*****************************************************************************
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
269 
270 //*****************************************************************************
271 //
272 // The following are values that can be passed to the config parameter for
273 // functions: SAPH_A_configurePHY().
274 //
275 //*****************************************************************************
276 #define SAPH_A_PHY_CHANNEL_1 0
277 #define SAPH_A_PHY_CHANNEL_2 1
278 
279 //*****************************************************************************
280 //
281 // The following are values that can be passed to the config parameter for
282 // functions: SAPH_A_configurePHY().
283 //
284 //*****************************************************************************
285 #define SAPH_A_PHY_OUTPUT_HIGH CH0OUT_1
286 #define SAPH_A_PHY_OUTPUT_LOW CH0OUT_0
287 
288 //*****************************************************************************
289 //
290 // The following are values that can be passed to the config parameter for
291 // functions: SAPH_A_configurePHY().
292 //
293 //*****************************************************************************
294 #define SAPH_A_PHY_OUTPUT_ENABLE CH0OE_1
295 #define SAPH_A_PHY_OUTPUT_DISABLE CH0OE_0
296 
297 //*****************************************************************************
298 //
299 // The following are values that can be passed to the config parameter for
300 // functions: SAPH_A_configurePHY().
301 //
302 //*****************************************************************************
303 #define SAPH_A_PHY_FULLPULL_ENABLE CH0FP_1
304 #define SAPH_A_PHY_FULLPULL_DISABLE CH0FP_0
305 
306 //*****************************************************************************
307 //
308 // The following are values that can be passed to the config parameter for
309 // functions: SAPH_A_configurePHY().
310 //
311 //*****************************************************************************
312 #define SAPH_A_PHY_TERMINATION_ENABLE CH0TERM_1
313 #define SAPH_A_PHY_TERMINATION_DISABLE CH0TERM_0
314 
315 //*****************************************************************************
316 //
317 // The following are values that can be passed to the config parameter for
318 // functions: SAPH_A_configurePHY().
319 //
320 //*****************************************************************************
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
324 
325 //*****************************************************************************
326 //
327 // The following are values that can be passed to the enableDummyLoad parameter
328 // for functions: SAPH_A_configurePHYMultiplexer().
329 //
330 //*****************************************************************************
331 #define SAPH_A_PHY_DUMMYLOAD_ENABLE DUMEN_1
332 #define SAPH_A_PHY_DUMMYLOAD_DISABLE DUMEN_0
333 
334 //*****************************************************************************
335 //
336 // The following are values that can be passed to the sourceControl parameter
337 // for functions: SAPH_A_configurePHYMultiplexer().
338 //
339 //*****************************************************************************
340 #define SAPH_A_PHY_SOURCE_CONTROLLED_BY_REGISTER MUXCTL_0
341 #define SAPH_A_PHY_SOURCE_CONTROLLED_BY_ASQ MUXCTL_1
342 
343 //*****************************************************************************
344 //
345 // The following are values that can be passed to the inputChannel parameter
346 // for functions: SAPH_A_configurePHYMultiplexer().
347 //
348 //*****************************************************************************
349 #define SAPH_A_PHY_INPUT_CHANNEL_0 MUXSEL__CH0IN
350 #define SAPH_A_PHY_INPUT_CHANNEL_1 MUXSEL__CH1IN
351 
352 //*****************************************************************************
353 //
354 // The following are values that can be passed to the config parameter for
355 // functions: SAPH_A_configurePHYBias().
356 //
357 //*****************************************************************************
358 #define SAPH_A_PHY_BIAS_SWITCH_OPEN CH0EBSW_0
359 #define SAPH_A_PHY_BIAS_SWITCH_CLOSED CH0EBSW_1
360 
361 //*****************************************************************************
362 //
363 // The following are values that can be passed to the config parameter for
364 // functions: SAPH_A_configurePHYBias().
365 //
366 //*****************************************************************************
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
371 
372 //*****************************************************************************
373 //
374 // The following are values that can be passed to the config parameter for
375 // functions: SAPH_A_configurePHYBias().
376 //
377 //*****************************************************************************
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
382 
383 //*****************************************************************************
384 //
385 // The following are values that can be passed to the config parameter for
386 // functions: SAPH_A_configurePHYBias().
387 //
388 //*****************************************************************************
389 #define SAPH_A_PHY_MULTIPLEXER_CHARGEPUMP_ENABLE CPDA_1
390 #define SAPH_A_PHY_MULTIPLEXER_CHARGEPUMP_DISABLE CPDA_0
391 
392 //*****************************************************************************
393 //
394 // The following are values that can be passed to the config parameter for
395 // functions: SAPH_A_configurePHYBias().
396 //
397 //*****************************************************************************
398 #define SAPH_A_PHY_LEAKAGE_COMPENSATION_ENABLE LILC_1
399 #define SAPH_A_PHY_LEAKAGE_COMPENSATION_DISABLE LILC_0
400 
401 //*****************************************************************************
402 //
403 // The following are values that can be passed to the config parameter for
404 // functions: SAPH_A_configurePHYBias().
405 //
406 //*****************************************************************************
407 #define SAPH_A_PHY_PGA_BIAS_SWITCH_OPEN PGABSW_0
408 #define SAPH_A_PHY_PGA_BIAS_SWITCH_CLOSED PGABSW_1
409 
410 //*****************************************************************************
411 //
412 // The following are values that can be passed to the config parameter for
413 // functions: SAPH_A_configurePHYBias().
414 //
415 //*****************************************************************************
416 #define SAPH_A_PHY_BIAS_SWITCH_CONTROLLED_BY_REGISTER ASQBSC_0
417 #define SAPH_A_PHY_BIAS_SWITCH_CONTROLLED_BY_ASQ ASQBSC_1
418 
419 //*****************************************************************************
420 //
421 // The following are values that can be passed to the config parameter for
422 // functions: SAPH_A_configurePPGCount().
423 //
424 //*****************************************************************************
425 #define SAPH_A_PPG_HIGH_IMPEDANCE_ON_PAUSE_HIGH PHIZ_1
426 #define SAPH_A_PPG_HIGH_IMPEDANCE_ON_PAUSE_LOW PHIZ_0
427 
428 //*****************************************************************************
429 //
430 // The following are values that can be passed to the config parameter for
431 // functions: SAPH_A_configurePPGCount().
432 //
433 //*****************************************************************************
434 #define SAPH_A_PPG_PAUSE_LEVEL_HIGH PLEV_1
435 #define SAPH_A_PPG_PAUSE_LEVEL_LOW PLEV_0
436 
437 //*****************************************************************************
438 //
439 // The following are values that can be passed to the config parameter for
440 // functions: SAPH_A_configurePPGCount().
441 //
442 //*****************************************************************************
443 #define SAPH_A_PPG_PAUSE_POLARITY_HIGH PPOL_0
444 #define SAPH_A_PPG_PAUSE_POLARITY_LOW PPOL_1
445 
446 //*****************************************************************************
447 //
448 // The following are values that can be passed to the config parameter for
449 // functions: SAPH_A_configurePPG().
450 //
451 //*****************************************************************************
452 #define SAPH_A_PPG_PRESCALER_ENABLE PSCEN_1
453 #define SAPH_A_PPG_PRESCALER_DISABLE PSCEN_0
454 
455 //*****************************************************************************
456 //
457 // The following are values that can be passed to the config parameter for
458 // functions: SAPH_A_configurePPG().
459 //
460 //*****************************************************************************
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
464 
465 //*****************************************************************************
466 //
467 // The following are values that can be passed to the config parameter for
468 // functions: SAPH_A_configurePPG().
469 //
470 //*****************************************************************************
471 #define SAPH_A_PPG_CHANNEL_0 PPGCHSEL_0
472 #define SAPH_A_PPG_CHANNEL_1 PPGCHSEL_1
473 
474 //*****************************************************************************
475 //
476 // The following are values that can be passed to the config parameter for
477 // functions: SAPH_A_configurePPG().
478 //
479 //*****************************************************************************
480 #define SAPH_A_PPG_PORT_CHARGED_BY_PPG PGSEL_0
481 #define SAPH_A_PPG_PORT_CHARGED_BY_ASEQ PGSEL_1
482 
483 //*****************************************************************************
484 //
485 // The following are values that can be passed to the config parameter for
486 // functions: SAPH_A_configureASQ().
487 //
488 //*****************************************************************************
489 #define SAPH_A_ASQ_ABORT_ON_ERROR_ENABLE ERABRT_1
490 #define SAPH_A_ASQ_ABORT_ON_ERROR_DISABLE ERABRT_0
491 
492 //*****************************************************************************
493 //
494 // The following are values that can be passed to the config parameter for
495 // functions: SAPH_A_configureASQ().
496 //
497 //*****************************************************************************
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
501 
502 //*****************************************************************************
503 //
504 // The following are values that can be passed to the config parameter for
505 // functions: SAPH_A_configureASQ().
506 //
507 //*****************************************************************************
508 #define SAPH_A_ASQ_CHANNEL_0 ASQCHSEL_0
509 #define SAPH_A_ASQ_CHANNEL_1 ASQCHSEL_1
510 
511 //*****************************************************************************
512 //
513 // The following are values that can be passed to the config parameter for
514 // functions: SAPH_A_configureASQ().
515 //
516 //*****************************************************************************
517 #define SAPH_A_ASQ_DIFFERENT_CHANNEL CHOWN_0
518 #define SAPH_A_ASQ_IDENTICAL_CHANNEL CHOWN_1
519 
520 //*****************************************************************************
521 //
522 // The following are values that can be passed to the config parameter for
523 // functions: SAPH_A_configureASQ().
524 //
525 //*****************************************************************************
526 #define SAPH_A_ASQ_STANDBY_INDICATION_POWEROFF STDBY__PWROFF
527 #define SAPH_A_ASQ_STANDBY_INDICATION_STANDBY STDBY__STDBY
528 
529 //*****************************************************************************
530 //
531 // The following are values that can be passed to the config parameter for
532 // functions: SAPH_A_configureASQ().
533 //
534 //*****************************************************************************
535 #define SAPH_A_ASQ_END_OF_SEQUENCE_OFF_DISABLE ESOFF_0
536 #define SAPH_A_ASQ_END_OF_SEQUENCE_OFF_ENABLE ESOFF_1
537 
538 //*****************************************************************************
539 //
540 // The following are values that can be passed to the config parameter for
541 // functions: SAPH_A_configureASQ().
542 //
543 //*****************************************************************************
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
546 
547 //*****************************************************************************
548 //
549 // The following are values that can be passed to the config parameter for
550 // functions: SAPH_A_configureASQ().
551 //
552 //*****************************************************************************
553 #define SAPH_A_ASQ_TOGGLE_CHANNEL_ENABLE CHTOG_1
554 #define SAPH_A_ASQ_TOGGLE_CHANNEL_DISABLE CHTOG_0
555 
556 //*****************************************************************************
557 //
558 // The following are values that can be passed to the config parameter for
559 // functions: SAPH_A_configureMode().
560 //
561 //*****************************************************************************
562 #define SAPH_A_LOW_POWER_BIAS_MODE_DISABLE LPBE_0
563 #define SAPH_A_LOW_POWER_BIAS_MODE_ENABLE LPBE_1
564 
565 //*****************************************************************************
566 //
567 // The following are values that can be passed to the config parameter for
568 // functions: SAPH_A_configureMode().
569 //
570 //*****************************************************************************
571 #define SAPH_A_CHARGE_PUMP_ON_SDHS_ASQ_REQUESTS_ONLY CPEO_0
572 #define SAPH_A_CHARGE_PUMP_ON_ALWAYS CPEO_1
573 
574 //*****************************************************************************
575 //
576 // The following are values that can be passed to the config parameter for
577 // functions: SAPH_A_configureMode().
578 //
579 //*****************************************************************************
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
584 
585 //*****************************************************************************
586 //
587 // The following are values that can be passed to the config parameter for
588 // functions: SAPH_A_configureExtendedPPG().
589 //
590 //*****************************************************************************
591 #define SAPH_A_TIMER_COUNT_EVENT ETY_0
592 #define SAPH_A_DMA_TRIGGER_EVENT ETY_1
593 
594 //*****************************************************************************
595 //
596 // The following are values that can be passed to the config parameter for
597 // functions: SAPH_A_configureExtendedPPG().
598 //
599 //*****************************************************************************
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
603 
604 //*****************************************************************************
605 //
606 // The following are values that can be returned by the
607 // SAPH_A_getPPGPhaseStatus() API
608 //
609 //*****************************************************************************
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
614 
615 //*****************************************************************************
616 //
617 // Prototypes for the APIs.
618 //
619 //*****************************************************************************
620 
621 //*****************************************************************************
622 //
623 //! \brief Unlocks certain SAPH_A registers.
624 //!
625 //! Unlock SAPH_A registers with offset address of 0xF or higher. IIDX, MIS, RIS,
626 //! IMSC, ICR, ISR, DESCLO, and DESCHI registers are not affected and the
627 //! registers are not locked. Utilize this function if those registers need to
628 //! be modified.
629 //! \n\b NOTE: Most of the SAPH_A APIs will not work unless SAPH_A is unlocked.
630 //!
631 //! \param baseAddress is the base address of the SAPH_A module.
632 //!
633 //! \return None
634 //
635 //*****************************************************************************
636 extern void SAPH_A_unlock(uint16_t baseAddress);
637 
638 //*****************************************************************************
639 //
640 //! \brief Locks certain SAPH_A registers.
641 //!
642 //! Locks SAPH_A registers with offset address of 0xF or higher. IIDX, MIS, RIS,
643 //! IMSC, ICR, ISR, DESCLO, and DESCHI registers are not affected and the
644 //! registers are not locked. Utilize this function after SAPH_A_unlock()
645 //! after necessary registers have been modified.
646 //! SAPH_A registers, with the exception of the list in paragraph above, are
647 //! locked by default.
648 //!
649 //! \param baseAddress is the base address of the SAPH_A module.
650 //!
651 //! \return None
652 //
653 //*****************************************************************************
654 extern void SAPH_A_lock(uint16_t baseAddress);
655 
656 //*****************************************************************************
657 //
658 //! \brief Clears SAPH_A interrupts.
659 //!
660 //! The SAPH_A interrupt source is cleared, so that it no longer asserts. If the
661 //! interrupt is not enabled, the corresponding bit in the RIS register bit will
662 //! be cleared. If the interrupt is enabled, the corresponding bit both MIS and
663 //! RIS registers will be both cleared.
664 //!
665 //! \param baseAddress is the base address of the SAPH_A module.
666 //! \param mask is the logical OR of any of the following:
667 //! - \b SAPH_A_DATA_ERROR_INTERRUPT - SAPH_A data error interrupt
668 //! - \b SAPH_A_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH_A TMF time out interrupt
669 //! - \b SAPH_A_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH_A acquistion sequencer done interrupt
670 //! - \b SAPH_A_PING_TRANSMIT_DONE_INTERRUPT - SAPH_A ping transmit done interrupt
671 //!
672 //! \return None
673 //
674 //*****************************************************************************
675 extern void SAPH_A_clearInterrupt(uint16_t baseAddress, uint8_t mask);
676 
677 //*****************************************************************************
678 //
679 //! \brief Enables SAPH_A interrupts.
680 //!
681 //! Enables the indicated SAPH_A interrupt sources. Only the sources that are
682 //! enabled can be reflected to the processor interrupt; disabled sources have
683 //! no effect on the processor. <b>Does not clear interrupt flags.</b>
684 //!
685 //! \param baseAddress is the base address of the SAPH_A module.
686 //! \param mask is the logical OR of any of the following:
687 //! - \b SAPH_A_DATA_ERROR_INTERRUPT - SAPH_A data error interrupt
688 //! - \b SAPH_A_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH_A TMF time out interrupt
689 //! - \b SAPH_A_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH_A acquistion sequencer done interrupt
690 //! - \b SAPH_A_PING_TRANSMIT_DONE_INTERRUPT - SAPH_A ping transmit done interrupt
691 //!
692 //! \return None
693 //
694 //*****************************************************************************
695 extern void SAPH_A_enableInterrupt(uint16_t baseAddress, uint8_t mask);
696 
697 //*****************************************************************************
698 //
699 //! \brief Disables selected SAPH_A interrupt sources.
700 //!
701 //! Disables the indicated SAPH_A interrupt sources. Only the sources that are
702 //! enabled can be reflected to the processor interrupt; disabled sources have
703 //! no effect on the processor.
704 //!
705 //! \param baseAddress is the base address of the SAPH_A module.
706 //! \param mask is the logical OR of any of the following:
707 //! - \b SAPH_A_DATA_ERROR_INTERRUPT - SAPH_A data error interrupt
708 //! - \b SAPH_A_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH_A TMF time out interrupt
709 //! - \b SAPH_A_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH_A acquistion sequencer done interrupt
710 //! - \b SAPH_A_PING_TRANSMIT_DONE_INTERRUPT - SAPH_A ping transmit done interrupt
711 //!
712 //! \return None
713 //
714 //*****************************************************************************
715 extern void SAPH_A_disableInterrupt(uint16_t baseAddress, uint8_t mask);
716 
717 //*****************************************************************************
718 //
719 //! \brief Gets the current SAPH_A interrupt status.
720 //!
721 //! This returns the interrupt status for the SAPH_A module based on which flag
722 //! is passed.
723 //!
724 //! \param baseAddress is the base address of the SAPH_A module.
725 //! \param mask is the logical OR of any of the following:
726 //! - \b SAPH_A_DATA_ERROR_INTERRUPT - SAPH_A data error interrupt
727 //! - \b SAPH_A_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH_A TMF time out interrupt
728 //! - \b SAPH_A_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH_A acquistion sequencer done interrupt
729 //! - \b SAPH_A_PING_TRANSMIT_DONE_INTERRUPT - SAPH_A ping transmit done interrupt
730 //!
731 //! \return Logical OR of any of the following:
732 //! - \b SAPH_A_DATA_ERROR_INTERRUPT - SAPH_A data error interrupt
733 //! - \b SAPH_A_TIMEMARK_F_TIMEOUT_INTERRUPT - SAPH_A TMF time out interrupt
734 //! - \b SAPH_A_ACQUISITION_SEQUENCER_DONE_INTERRUPT - SAPH_A acquistion sequencer done interrupt
735 //! - \b SAPH_A_PING_TRANSMIT_DONE_INTERRUPT - SAPH_A ping transmit done interrupt
736 //
737 //*****************************************************************************
738 extern uint8_t SAPH_A_getInterruptStatus(uint16_t baseAddress, uint8_t mask);
739 
740 //*****************************************************************************
741 //
742 //! \brief Configures physical interface output and trim values.
743 //!
744 //! This configures SAPH_A physical interface:
745 //! - channel output
746 //! - channel related trim values
747 //!
748 //! \param baseAddress is the base address of the SAPH_A module.
749 //! \param config is the pointer to the struct for physical interface configuration.
750 //!
751 //! \return None
752 //!
753 //*****************************************************************************
754 extern void SAPH_A_configurePHY(uint16_t baseAddress, SAPH_A_configPHYParam *config);
755 
756 //*****************************************************************************
757 //
758 //! \brief Configures physical interface multiplexer.
759 //!
760 //! This configures SAPH_A physical interface mutliplexer for dummy load, channel
761 //! multiplexer source control and input channel selection.
762 //!
763 //! \param baseAddress is the base address of the SAPH_A module.
764 //! \param enableDummyLoad indicates whether to enable/disable dummy load on non-
765 //! selected multiplexer inputs.
766 //! Valid values are:
767 //! - \b SAPH_A_PHY_DUMMYLOAD_ENABLE
768 //! - \b SAPH_A_PHY_DUMMYLOAD_DISABLE [Default]
769 //! \param sourceControl selects which controls the multiplexer.
770 //! Valid values are:
771 //! - \b SAPH_A_PHY_SOURCE_CONTROLLED_BY_REGISTER [Default]
772 //! - \b SAPH_A_PHY_SOURCE_CONTROLLED_BY_ASQ
773 //! \param inputChannel selects input channel.
774 //! Valid values are:
775 //! - \b SAPH_A_PHY_INPUT_CHANNEL_0 [Default]
776 //! - \b SAPH_A_PHY_INPUT_CHANNEL_1
777 //!
778 //! \return None
779 //!
780 //*****************************************************************************
781 extern void SAPH_A_configurePHYMultiplexer(uint16_t baseAddress,
782  uint16_t enableDummyLoad, uint16_t sourceControl, uint16_t inputChannel);
783 
784 //*****************************************************************************
785 //
786 //! \brief Configures physical interface bias.
787 //!
788 //! This configures SAPH_A physical interface bias parameters:
789 //! - excitation bias switch
790 //! - PGA bias
791 //! - excitation bias
792 //! - charge pump
793 //! - line input leakage
794 //! - compensation
795 //! - ASQ bias
796 //!
797 //! \param baseAddress is the base address of the SAPH_A module.
798 //! \param config is the pointer to the struct for physical interface bias configuration.
799 //!
800 //! \return None
801 //!
802 //*****************************************************************************
803 extern void SAPH_A_configurePHYBias(uint16_t baseAddress,
804  SAPH_A_configPHYBiasParam *config);
805 
806 //*****************************************************************************
807 //
808 //! \brief Configures pulse generator count.
809 //!
810 //! This configures SAPH_A pulse generator count:
811 //! - high impedance
812 //! - pause level
813 //! - pause polarity
814 //! - stop pulse
815 //! - excitation pulse
816 //!
817 //! \param baseAddress is the base address of the SAPH_A module.
818 //! \param config is the pointer to the struct for pulse generator count configuration.
819 //!
820 //! \return None
821 //!
822 //*****************************************************************************
823 extern void SAPH_A_configurePPGCount(uint16_t baseAddress,
825 
826 //*****************************************************************************
827 //
828 //! \brief Sets pulse generator low period.
829 //!
830 //! The low phase of period of generator pulses defines the length of low phase
831 //! of the pulses in units of high speed clocks. The minimum count is two regardless
832 //! of the value set in this register.
833 //!
834 //! \param baseAddress is the base address of the SAPH_A module.
835 //! \param period is the low period value to set.
836 //!
837 //! \return None
838 //!
839 //*****************************************************************************
840 extern void SAPH_A_setPPGLowPeriod(uint16_t baseAddress, uint16_t period);
841 
842 //*****************************************************************************
843 //
844 //! \brief Sets pulse generator high period.
845 //!
846 //! The high phase of period of generator pulses defines the length of high phase
847 //! of the pulses in units of high speed clocks. The minimum count is two regardless
848 //! of the value set in this register.
849 //!
850 //! \param baseAddress is the base address of the SAPH_A module.
851 //! \param period is the high period value to set.
852 //!
853 //! \return None
854 //!
855 //*****************************************************************************
856 extern void SAPH_A_setPPGHighPeriod(uint16_t baseAddress, uint16_t period);
857 
858 //*****************************************************************************
859 //
860 //! \brief Configures pulse generator.
861 //!
862 //! This configures SAPH_A pulse generator:
863 //! - trigger source
864 //! - prescaler enable
865 //! - channel select
866 //! - control select
867 //!
868 //! \param baseAddress is the base address of the SAPH_A module.
869 //! \param config is the pointer to the struct for pulse generator configuration.
870 //!
871 //! \return None
872 //!
873 //*****************************************************************************
874 extern void SAPH_A_configurePPG(uint16_t baseAddress, SAPH_A_configPPGParam *config);
875 
876 //*****************************************************************************
877 //
878 //! \brief Triggers pulse generator.
879 //!
880 //! This function triggers the pulse generator if SAPH_A_PPG_TRIGGER_SOURCE_SOFTWARE
881 //! is selected as the trigger sourcce.
882 //!
883 //! \param baseAddress is the base address of the SAPH_A module.
884 //!
885 //! \return None
886 //!
887 //*****************************************************************************
888 extern void SAPH_A_triggerPPG(uint16_t baseAddress);
889 
890 //*****************************************************************************
891 //
892 //! \brief Stops pulse generator.
893 //!
894 //! \param baseAddress is the base address of the SAPH_A module.
895 //!
896 //! \return None
897 //!
898 //*****************************************************************************
899 extern void SAPH_A_stopPPG(uint16_t baseAddress);
900 
901 //*****************************************************************************
902 //
903 //! \brief Configures acquisition sequencer.
904 //!
905 //! This configures SAPH_A acquisition sequencer:
906 //! - trigger source
907 //! - abort-on-error control
908 //! - channel select
909 //! - side of channel to receive
910 //! - standby indication
911 //! - OFF at end-of-sequence
912 //! - early receive bias
913 //! - channel toggle
914 //!
915 //! \param baseAddress is the base address of the SAPH_A module.
916 //! \param config is the pointer to the struct for acquisition sequencer configuration.
917 //!
918 //! \return None
919 //!
920 //*****************************************************************************
921 extern void SAPH_A_configureASQ(uint16_t baseAddress, SAPH_A_configASQParam *config);
922 
923 //*****************************************************************************
924 //
925 //! \brief Triggers acquisition sequencer.
926 //!
927 //! This function triggers the acquisition sequencer if SAPH_A_ASQ_TRIGGER_SOURCE_SOFTWARE
928 //! is selected as the trigger sourcce.
929 //!
930 //! \param baseAddress is the base address of the SAPH_A module.
931 //!
932 //! \return None
933 //!
934 //*****************************************************************************
935 extern void SAPH_A_triggerASQ(uint16_t baseAddress);
936 
937 //*****************************************************************************
938 //
939 //! \brief Stops acquisition sequencer.
940 //!
941 //! \param baseAddress is the base address of the SAPH_A module.
942 //!
943 //! \return None
944 //!
945 //*****************************************************************************
946 extern void SAPH_A_stopASQ(uint16_t baseAddress);
947 
948 //*****************************************************************************
949 //
950 //! \brief Gets ping counter of acquisition sequencer.
951 //!
952 //! This function returns ping counter which represents the number of acquistion
953 //! turns regardless if up/down direction is changed. The acquistion stops if
954 //! this count decrements from zero.
955 //!
956 //! \param baseAddress is the base address of the SAPH_A module.
957 //!
958 //! \return None
959 //!
960 //*****************************************************************************
961 extern uint8_t SAPH_A_getASQPingCounter(uint16_t baseAddress);
962 
963 //*****************************************************************************
964 //
965 //! \brief Configures acquisition sequencer ping parameters.
966 //!
967 //! This configures SAPH_A acquisition sequencer ping:
968 //! - output polarity
969 //! - pause level
970 //! - pause impedance
971 //!
972 //! \param baseAddress is the base address of the SAPH_A module.
973 //! \param config is the pointer to the struct for acquisition sequencer ping
974 //! configuration.
975 //!
976 //! \return None
977 //!
978 //*****************************************************************************
979 extern void SAPH_A_configureASQPing(uint16_t baseAddress,
980  SAPH_A_configASQPingParam *config);
981 
982 //*****************************************************************************
983 //
984 //! \brief Configures acquisition sequencer time base parameters.
985 //!
986 //! This configures SAPH_A acquisition sequencer time base parameters:
987 //! - power state
988 //! - prescaler start value
989 //!
990 //! \param baseAddress is the base address of the SAPH_A module.
991 //! \param prescalerStartValue is the ASQ prescaler start value.
992 //!
993 //! \return None
994 //!
995 //*****************************************************************************
996 extern void SAPH_A_configureASQTimeBase(uint16_t baseAddress,
997  uint16_t prescalerStartValue);
998 
999 //*****************************************************************************
1000 //
1001 //! \brief Starts acquisition timer.
1002 //!
1003 //! \param baseAddress is the base address of the SAPH_A module.
1004 //!
1005 //! \return None
1006 //!
1007 //*****************************************************************************
1008 extern void SAPH_A_startASQTimer(uint16_t baseAddress);
1009 
1010 //*****************************************************************************
1011 //
1012 //! \brief Stops acquisition timer.
1013 //!
1014 //! \param baseAddress is the base address of the SAPH_A module.
1015 //!
1016 //! \return None
1017 //!
1018 //*****************************************************************************
1019 extern void SAPH_A_stopASQTimer(uint16_t baseAddress);
1020 
1021 //*****************************************************************************
1022 //
1023 //! \brief Clears acquisition timer.
1024 //!
1025 //! \param baseAddress is the base address of the SAPH_A module.
1026 //!
1027 //! \return None
1028 //!
1029 //*****************************************************************************
1030 extern void SAPH_A_clearASQTimer(uint16_t baseAddress);
1031 
1032 //*****************************************************************************
1033 //
1034 //! \brief Configures certain mode configuration parameters.
1035 //!
1036 //! This configures SAPH:
1037 //! - bias generator impedance
1038 //! - charge pump enable timing
1039 //! - low power bias mode
1040 //! \b NOTE: This will modify all elements of SAPH_A mode configuration register. If there are elements not specified in the config parameter, the register values will be cleared. There are other SAPH_A functions to modify these features individually.
1041 //!
1042 //! \param baseAddress is the base address of the SAPH_A module.
1043 //! \param config is the pointer to the struct for mode configuration.
1044 //!
1045 //! \return None
1046 //!
1047 //*****************************************************************************
1048 extern void SAPH_A_configureMode(uint16_t baseAddress,
1049  SAPH_A_configModeParam *config);
1050 
1051 //*****************************************************************************
1052 //
1053 //! \brief Enables low power bias operation mode.
1054 //!
1055 //! 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.
1056 //! \b 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.
1057 //!
1058 //! \param baseAddress is the base address of the SAPH_A module.
1059 //!
1060 //! \return None
1061 //!
1062 //*****************************************************************************
1063 extern void SAPH_A_enableLowPowerBiasMode(uint16_t baseAddress);
1064 
1065 //*****************************************************************************
1066 //
1067 //! \brief Disables low power bias operation mode.
1068 //!
1069 //! 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.
1070 //! \b 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.
1071 //!
1072 //! \param baseAddress is the base address of the SAPH_A module.
1073 //!
1074 //! \return None
1075 //!
1076 //*****************************************************************************
1077 extern void SAPH_A_disableLowPowerBiasMode(uint16_t baseAddress);
1078 
1079 //*****************************************************************************
1080 //
1081 //! \brief Keeps charge pump of the input multiplexer always on.
1082 //!
1083 //! 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.
1084 //!
1085 //! \param baseAddress is the base address of the SAPH_A module.
1086 //!
1087 //! \return None
1088 //!
1089 //*****************************************************************************
1090 extern void SAPH_A_enableChargePumpAlways(uint16_t baseAddress);
1091 
1092 //*****************************************************************************
1093 //
1094 //! \brief Charge pump of input multiplexer is only turned on by data acquisition.
1095 //!
1096 //! 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.
1097 //!
1098 //! \param baseAddress is the base address of the SAPH_A module.
1099 //!
1100 //! \return None
1101 //!
1102 //*****************************************************************************
1103 extern void SAPH_A_enableChargePumpOnAcquisitionOnly(uint16_t baseAddress);
1104 
1105 //*****************************************************************************
1106 //
1107 //! \brief Sets impedance of the buffers for RxBias and TxBias.
1108 //!
1109 //! While for resistive loads the lowest impedance shows the fastest settling; this is not the case for reactive loads.
1110 //!
1111 //! \param baseAddress is the base address of the SAPH_A module.
1112 //! \param biasImpedance sets bias impedance for RxBias and TxBias.
1113 //! Valid values are:
1114 //! - \b SAPH_A_MCNF_500_OHMS_RXBIAS_450_OHMS_TXBIAS
1115 //! - \b SAPH_A_MCNF_900_OHMS_RXBIAS_850_OHMS_TXBIAS
1116 //! - \b SAPH_A_MCNF_1500_OHMS_RXBIAS_1450_OHMS_TXBIAS [Default]
1117 //! - \b SAPH_A_MCNF_2950_OHMS_RXBIAS_2900_OHMS_TXBIAS
1118 //!
1119 //! \return None
1120 //!
1121 //*****************************************************************************
1122 extern void SAPH_A_setBiasGeneratorImpedance(uint16_t baseAddress, uint16_t biasImpedance);
1123 
1124 //*****************************************************************************
1125 //
1126 //! \brief Configures extended pulse generator.
1127 //!
1128 //! This configures SAPH_A extended pulse generator:
1129 //! - event type
1130 //! - extended mode select
1131 //! - extra pulse count
1132 //! \n \b NOTE: This API modifies all elements of the extended pulse generator control register. Any values not specified in the config parameter will end up clearing the other settings.
1133 //!
1134 //! \param baseAddress is the base address of the SAPH_A module.
1135 //! \param config is the pointer to the struct for extended pulse generator configuration.
1136 //!
1137 //! \return None
1138 //!
1139 //*****************************************************************************
1140 extern void SAPH_A_configureExtendedPPG(uint16_t baseAddress, SAPH_A_configXPGParam *config);
1141 
1142 //*****************************************************************************
1143 //
1144 //! \brief Sets extended pulse generator low period.
1145 //!
1146 //! 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.
1147 //! Reset type: PUC
1148 //!
1149 //! \param baseAddress is the base address of the SAPH_A module.
1150 //! \param period is the low period value to set.
1151 //!
1152 //! \return None
1153 //!
1154 //*****************************************************************************
1155 extern void SAPH_A_setXPGLowPeriod(uint16_t baseAddress, uint16_t period);
1156 
1157 //*****************************************************************************
1158 //
1159 //! \brief Sets extended pulse generator high period.
1160 //!
1161 //! 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.
1162 //!
1163 //! \param baseAddress is the base address of the SAPH_A module.
1164 //! \param period is the high period value to set.
1165 //!
1166 //! \return None
1167 //!
1168 //*****************************************************************************
1169 extern void SAPH_A_setXPGHighPeriod(uint16_t baseAddress, uint16_t period);
1170 
1171 //*****************************************************************************
1172 //
1173 //! \brief Returns the phase status of PPG
1174 //!
1175 //! Returns the phase status of PPG. Reads from SAPH_AXPGCTL.XSTAT.
1176 //!
1177 //! \param baseAddress is the base address of the SAPH_A module.
1178 //!
1179 //! \return \b SAPH_A_PPG_PAUSE_PHASE or
1180 //! \b SAPH_A_PPG_STOP_PHASE or
1181 //! \b SAPH_A_PPG_REGULAR_EXCITATION_PHASE or
1182 //! \b SAPH_A_PPG_EXTRA_EXCITATION_PHASE
1183 //!
1184 //
1185 //*****************************************************************************
1186 extern uint16_t SAPH_A_getPPGPhaseStatus(uint16_t baseAddress);
1187 
1188 //*****************************************************************************
1189 //
1190 // Mark the end of the C bindings section for C++ compilers.
1191 //
1192 //*****************************************************************************
1193 #ifdef __cplusplus
1194 }
1195 #endif
1196 
1197 #endif
1198 #endif // __MSP430WARE_SAPH_A_H__
1199 
uint16_t extendedMode
Definition: saph_a.h:252
Definition: saph_a.h:115
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
Definition: saph_a.h:240
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
Definition: saph_a.h:163
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
Definition: saph_a.h:73
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
Definition: saph_a.h:209
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
Definition: saph_a.h:33
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
Definition: saph_a.h:138
void SAPH_A_configurePHYBias(uint16_t baseAddress, SAPH_A_configPHYBiasParam *config)
Configures physical interface bias.
Definition: saph_a.c:88
Definition: saph_a.h:219
void SAPH_A_setBiasGeneratorImpedance(uint16_t baseAddress, uint16_t biasImpedance)
Sets impedance of the buffers for RxBias and TxBias.
Definition: saph_a.c:232

Copyright 2020, Texas Instruments Incorporated