MSP430UltrasonicLibrary  02_20_00_16
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
ussSwLib.h File Reference

Detailed Description

Contains all USS SW Library enums, structs, macros, function and global variables definitions.

Contains all USS SW Library enums, structs, macros, function and global variables defintions.

#include <msp430.h>
#include <stdint.h>
#include <stdbool.h>
#include <QmathLib.h>
#include <IQmathLib.h>
Include dependency graph for ussSwLib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _USS_Algorithms_Meter_Constant_Calib_
 Contain meter constant calibration data. More...
 
struct  _USS_System_Configuration_
 Contains USS SW Lib System Configuration. More...
 
struct  _USS_Pulse_Additional_End_of_Sequence_Configuration_
 Structure to configure additional multi tone pulse generation. More...
 
struct  _USS_Pulse_Multitone_Configuration_
 structure to configure multi tone pulse generation More...
 
struct  _USS_Pulse_Single_Dual_Tone_Configuration_
 The following structure allows user to specify single and dual tone configuration. More...
 
struct  _USS_Pulse_Configuration_
 Allows user to specify the pulse configuration. More...
 
struct  _USS_Meter_Configuration_
 Contains USS SW Lib Meter Configuration. More...
 
struct  _USS_Measurement_Configuration_
 Contains USS SW Lib Measurement Configuration. More...
 
struct  _USS_HSPLL_Configuration_
 Contains USS SW Lib HSPLL Configuration. More...
 
struct  _USS_dTof_absTof_offset_test_config_
 This structure is passed to USS_calculateOffsets API and define the test calibration configuration. More...
 
struct  _USS_dTof_absTof_offset_results_
 This structure is passed to USS_calculateOffsets API and calibration test result will be returned in this structure. More...
 
struct  _USS_calibration_hspll_results_
 This structure is passed to USS_verifyHSPLLFrequency API and test result will be returned using this structure. More...
 
struct  _USS_Capture_Configuration_
 Contains USS SW Lib Capture Configuration. More...
 
struct  _USS_Trigger_Configuration_
 Contains USS SW Lib Trigger Configuration. More...
 
struct  _USS_Interrupt_Configuration_
 Contains USS SW Lib Capture Configuration. More...
 
struct  _USS_Algorithms_User_Configuration_
 Contains USS SW Lib Algorithms User Configuration. More...
 
struct  _USS_Algorithms_Results_
 Contains USS SW Lib Algorithms Results. More...
 
struct  _USS_Algorithms_Results_fixed_point_
 Contains USS SW Lib Algorithms Results. More...
 
struct  _USS_SW_Library_configuration_
 Contains USS SW Lib configuration. More...
 

Macros

#define USS_UUPS_PWR_REQ_IGN_INTERRUPT   BIT0
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS UUPS Power request ignored interrupt has been triggered. More...
 
#define USS_UUPS_PWR_UP_TM_OUT_INTERRUPT   BIT1
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS UUPS Power up time out interrupt has been triggered. More...
 
#define USS_SAPH_DATA_ERR_ABORT_INTERRUPT   BIT2
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SAPH Data error abort interrupt has been triggered. More...
 
#define USS_SAPH_TMF_TM_OUT_INTERRUPT   BIT3
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SAPH Time Mark 4 time out interrupt has been triggered. More...
 
#define USS_SAPH_SEQ_ACQ_DN_INTERRUPT   BIT4
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SAPH sequence acquisition done interrupt has been triggered. More...
 
#define USS_SAPH_PING_DN_INTERRUPT   BIT5
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SAPH ping transmit done interrupt has been triggered. More...
 
#define USS_HSPLL_PLL_UNLOCK_INTERRUPT   BIT6
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS HSPLL PLL unlock interrupt has been triggered. More...
 
#define USS_SDHS_WINLO_INTERRUPT   BIT7
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS WINLO interrupt has been triggered. More...
 
#define USS_SDHS_WINHI_INTERRUPT   BIT8
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS WINHI interrupt has been triggered. More...
 
#define USS_SDHS_DTRDY_INTERRUPT   BIT9
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS DTRDY interrupt has been triggered. More...
 
#define USS_SDHS_SSTRG_INTERRUPT   BITA
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS SSTRG interrupt has been triggered. More...
 
#define USS_SDHS_ACQDONE_INTERRUPT   BITB
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS SMPSZ interrupt has been triggered. More...
 
#define USS_SDHS_OVF_INTERRUPT   BITC
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS OVF interrupt has been triggered. More...
 
#define USS_TIMER_EXPIRED_INTERRUPT   BITD
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SW Library delay generator timer has expired. More...
 
#define USS_SAPH_SEQUENCE_STOPPED   BITE
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if SAPH has been stopped. More...
 
#define USS_UUPS_STOPPED_BY_DEBUGGER   BITF
 This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if UUPS has been stopped by the debugger. More...
 
#define USS_TIMER_EXPIRED_EVENT1_INTERRUPT   0x10000
 This bit determines if the first event of period measurement is complete. More...
 
#define USS_SAPH_DMA_ACK_VIOLATION   (0x00010000)
 This define can be used to mask USSSWLIB_USS_interrupt_status variable and determine if SAPH generated an DMA acknowledgment violation. More...
 
#define HARDWAREWREG16(x)   (*((volatile uint16_t *)((uint16_t)x)))
 
#define USS_Alg_dToF_Calculation_Option_gas   USS_Alg_dToF_Calculation_Option_estimate
 

Typedefs

typedef enum _USS_message_code_ USS_message_code
 The following enumeration contain all possible USS SW Library return message codes. More...
 
typedef enum _USS_diagnostics_mode_ USS_diagnostics_mode
 Selects diagnostic mode to be used by the library. For optimal power consumption it is recommended to use USS_diagnostics_mode_0. During development it is recommended to use USS_diagnostics_mode_2. More...
 
typedef enum _USS_capture_power_mode_ USS_capture_power_mode_option
 Selects the desired power mode while USS capture is done, API will remain in this mode until capture is done. More...
 
typedef enum _USS_stop_measurement_state_ USS_stop_measurement_state
 Selects USS state after capture has been stopped. More...
 
typedef enum _USS_measurement_drive_strength_ USS_measurement_drive_strength
 Allows user to select USS channel drive strength. User can select between max strength and pre-trimmed drive. More...
 
typedef enum _USS_measurement_pause_state_ USS_measurement_pause_state
 Allows user to select pause state. Pause state is considered to be time before and after USS Channel Pulse Generation. More...
 
typedef enum _USS_measurement_pulse_polarity_ USS_measurement_pulse_polarity
 Allows user to select starting pulse state. More...
 
typedef enum _USS_measurement_ULP_bias_delay_ USS_measurement_ULP_bias_delay
 Allows user to select the ULP bias delay during USS Power up. sequence. The ULP bias allows a faster channel setting on reactive input loads. Please refer the device User's guide UUPS and SAPH chapter for further recommendations regarding ULP bias. More...
 
typedef enum _USS_measurement_bias_impedance_ USS_measurement_bias_impedance
 The following parameter allows the application to control the RX/TX bias during the acquisition sequence. For resistive loads a low impedance generates the fastest settling times. For reactive loads a different impedance setting might be needed to generate a gentler build up of the bias voltage. Please refer to device User's guide SAPH chapter for further recommended usage. More...
 
typedef enum _USS_measurement_mux_charge_pump_ USS_measurement_mux_charge_pump
 The following parameter allow application to turn on/off the PGA input multiplexer during the whole firing/capture sequence. Having the the charge always on allows to reduce the RX signal noise. Please refer to the SAPH chapter in the device User's guide for detailed recommended usage of this functionality. More...
 
typedef enum _USS_measurement_pulse_generation_mode_ USS_measurement_pulse_generation_mode
 Lists pulse generation options. More...
 
typedef enum _USS_test_channel_ USS_test_channel
 Selects USS channel to be used for test (Used for Application Debug API) More...
 
typedef enum _USS_measurement_capture_sequence_ USS_measurement_capture_sequence
 Allows user to select USS capture sequence. More...
 
typedef enum _USS_measurement_end_of_sequence_state_ USS_measurement_end_of_sequence_state
 This is the USS state after capture is done. More...
 
typedef enum _USS_Capture_Over_Sample_Rate_ USS_Capture_Over_Sample_Rate
 Configures SDHS Over Sample Rate

Registers modified: SDHS.CTL0.OBR More...
 
typedef enum _USS_Capture_Gain_Range_ USS_Capture_Gain_Range
 Selects Programmable Gain Amplifier (PGA) range. More...
 
typedef enum _USS_Capture_Calibration_ USS_Capture_Calibration
 Selects Programmable Gain Amplifier (PGA) range. More...
 
typedef enum _USS_Trigger_Configuration_Trigger_ USS_Trigger_Configuration_Trigger
 Selects USS trigger option. More...
 
typedef enum _USS_HSPLL_input_clock_freq_ USS_HSPLL_input_clock_freq
 Selects USS Crystal Frequency. More...
 
typedef enum _USS_HSPLL_input_clock_type_ USS_HSPLL_input_clock_type
 Selects USS HSPLL input clock Type. More...
 
typedef enum _USS_HSPLL_output_clk_freq_ USS_HSPLL_output_clk_freq
 Selects USS HSPLL output clock frequency. More...
 
typedef enum USS_SDHS_Interrupt USS_SDHS_Interrupt
 Selects appropiate USS SDHS interrupt (Used to register interrupt callback functions) More...
 
typedef enum USS_SAPH_Interrupt USS_SAPH_Interrupt
 Selects appropiate USS SAPH interrupt (Used to register interrupt callback functions) More...
 
typedef enum USS_UUPS_Interrupt USS_UUPS_Interrupt
 Used to configure USS UUPS interrupt callback. More...
 
typedef enum USS_HSPLL_Interrupt USS_HSPLL_Interrupt
 Used to configure USS HSPLL interrupt callback. More...
 
typedef enum _USS_highFlow_option_ USS_highFlow_option
 Defines high flow computation options. More...
 
typedef enum _USS_low_power_mode_option_ USS_low_power_mode_option
 Selects the desired power mode while USS capture is done. More...
 
typedef enum _USS_dtof_volume_flow_calculation_interval_ USS_dtof_volume_flow_calculation_interval
 Selects the interval to calculate Delta ToF and Volume Flow. More...
 
typedef enum _USS_dcOffEst_Calc_Mode_ USS_dcOffEst_Calc_Mode
 Selects the UPS/DNS DC offset estimation mode used by USS_estimateDCoffset API. More...
 
typedef enum _USS_Alg_AbsToF_Calculation_Option_ USS_Alg_AbsToF_Calculation_Option
 Enumerated type for absTOF algorithm selection. More...
 
typedef enum _USS_Alg_dToF_Calculation_Option_ USS_Alg_dToF_Calculation_Option
 Enumerated type for dToF algorithm selection. More...
 
typedef enum _USS_Alg_volume_flow_Calculation_Option_ USS_Alg_volume_flow_Calculation_Option
 Enumerated type for volume flow rate algorithm selection. More...
 
typedef struct _USS_Algorithms_Meter_Constant_Calib_ USS_Algorithms_Meter_Constant_Calib
 Contain meter constant calibration data. More...
 
typedef struct _USS_System_Configuration_ USS_System_Configuration
 Contains USS SW Lib System Configuration. More...
 
typedef struct _USS_Pulse_Additional_End_of_Sequence_Configuration_ USS_Pulse_Additional_End_of_Sequence_Configuration
 Structure to configure additional multi tone pulse generation. More...
 
typedef struct _USS_Pulse_Multitone_Configuration_ USS_Pulse_Multitone_Configuration
 structure to configure multi tone pulse generation More...
 
typedef struct _USS_Pulse_Single_Dual_Tone_Configuration_ USS_Pulse_Single_Dual_Tone_Configuration
 The following structure allows user to specify single and dual tone configuration. More...
 
typedef struct _USS_Pulse_Configuration_ USS_Pulse_Configuration
 Allows user to specify the pulse configuration. More...
 
typedef struct _USS_Meter_Configuration_ USS_Meter_Configuration
 Contains USS SW Lib Meter Configuration. More...
 
typedef struct _USS_Measurement_Configuration_ USS_Measurement_Configuration
 Contains USS SW Lib Measurement Configuration. More...
 
typedef struct _USS_HSPLL_Configuration_ USS_HSPLL_Configuration
 Contains USS SW Lib HSPLL Configuration. More...
 
typedef struct _USS_dTof_absTof_offset_test_config_ USS_dTof_absTof_offset_test_config
 This structure is passed to USS_calculateOffsets API and define the test calibration configuration. More...
 
typedef struct _USS_dTof_absTof_offset_results_ USS_dTof_absTof_offset_results
 This structure is passed to USS_calculateOffsets API and calibration test result will be returned in this structure. More...
 
typedef struct _USS_calibration_hspll_results_ USS_calibration_hspll_results
 This structure is passed to USS_verifyHSPLLFrequency API and test result will be returned using this structure. More...
 
typedef struct _USS_Capture_Configuration_ USS_Capture_Configuration
 Contains USS SW Lib Capture Configuration. More...
 
typedef struct _USS_Trigger_Configuration_ USS_Trigger_Configuration
 Contains USS SW Lib Trigger Configuration. More...
 
typedef struct _USS_Interrupt_Configuration_ USS_Interrupt_Configuration
 Contains USS SW Lib Capture Configuration. More...
 
typedef struct _USS_Algorithms_User_Configuration_ USS_Algorithms_User_Configuration
 Contains USS SW Lib Algorithms User Configuration. More...
 
typedef struct _USS_Algorithms_Results_ USS_Algorithms_Results
 Contains USS SW Lib Algorithms Results. More...
 
typedef struct _USS_Algorithms_Results_fixed_point_ USS_Algorithms_Results_fixed_point
 Contains USS SW Lib Algorithms Results. More...
 
typedef struct _USS_SW_Library_configuration_ USS_SW_Library_configuration
 Contains USS SW Lib configuration. More...
 

Enumerations

enum  _USS_message_code_ {
  USS_message_code_no_error = 0, USS_message_code_SAPH_pulseLowPhasePeriod_error = 1, USS_message_code_SAPH_pulseHighPhasePeriod_error = 2, USS_message_code_SAPH_numOfExcitationPulses_error = 3,
  USS_message_code_SAPH_numOfStopPulses_error = 4, USS_message_code_SAPH_update_error_ongoing_conversion = 5, USS_message_code_SAPH_time_startPPGCount_error = 6, USS_message_code_SAPH_time_turnOnADCCount_error = 7,
  USS_message_code_SAPH_time_startADCsamplingCount_error = 8, USS_message_code_SAPH_time_restartCaptureCount_error = 9, USS_message_code_SAPH_time_captureTimeOutCount_error = 10, USS_message_code_SAPH_time_startPGAandINBiasCount_error = 11,
  USS_message_code_SAPH_invalid_bias_impedance_error =12, USS_message_code_SAPH_invalid_rx_charge_pump_mode_error =13, USS_message_code_SAPH_invalid_pulse_configuration_error =14, USS_message_code_HSPLL_pllXtalFreq_inHz_error = 21,
  USS_message_code_HSPLL_pllOutputFreq_inHz_error = 22, USS_message_code_HSPLL_plllock_error =23, USS_message_code_HSPLL_pll_unlock_error = 24, USS_message_code_HSPLL_update_error_ongoing_conversion = 26,
  USS_message_code_HSPLL_verification_expected_count_error =27, USS_message_code_HSPLL_invalid_settling_count_error =28, USS_message_code_SDHS_threshold_error = 41, USS_message_code_SDHS_conversion_overflow_error = 43,
  USS_message_code_SDHS_sample_size_error = 44, USS_message_code_SDHS_update_error_ongoing_conversion = 45, USS_message_code_SDHS_window_low_threshold_reached = 46, USS_message_code_SDHS_window_high_threshold_reached = 47,
  USS_message_code_SDHS_max_size_error = 48, USS_message_code_UUPS_update_error_ongoing_conversion = 61, USS_message_code_UUPS_power_up_time_out_error = 62, USS_message_code_UUPS_power_up_error = 63,
  USS_message_code_UUPS_power_down_error = 64, USS_message_code_data_error_abort = 81, USS_message_code_ASQ_time_out = 82, USS_message_code_measurement_stopped = 101,
  USS_message_code_error_conversion_stopped_by_debugger = 102, USS_message_code_parameter_check_failed = 121, USS_message_code_valid_results = 122, USS_message_code_algorithm_error = 123,
  USS_message_code_algorithm_error_invalid_iteration_value = 124, USS_message_code_algorithm_error_no_signal_detected_ups_channel = 125, USS_message_code_algorithm_error_no_signal_detected_ups_dns_channel = 126, USS_message_code_algorithm_error_no_signal_detected_dns_channel = 127,
  USS_message_code_algorithm_captures_accumulated = 128, USS_message_code_algorithm_error_invalid_clock_relative_error = 129, USS_message_code_algorithm_error_invalid_filter_length = 130, USS_message_code_algorithm_error_generating_binary_pattern = 131,
  USS_message_code_algorithm_error_invalid_absToF_computation_option = 132, USS_message_code_algorithm_error_invalid_meter_constant_calib_data = 133, USS_message_code_algorithm_error_meter_constant_calib = 134, USS_message_code_interrupt_update_error_ongoing_conversion = 142,
  USS_message_code_invalid_conversion_data = 161, USS_message_code_Calibration_DAC_success = 171, USS_message_code_Calibration_DAC_error = 172, USS_message_code_Calibration_Gain_error = 173,
  USS_message_code_Calibration_DCO_error = 174, USS_message_code_Signal_Gain_Calibration_timeout = 175, USS_message_code_Signal_Gain_Calibration_settling = 176, USS_message_code_Signal_Gain_Calibration_successful =177,
  USS_message_code_Calibration_DAC_timeout_error = 178, USS_message_code_Calibration_ToF_Offset_error = 179, USS_message_code_Calibration_Offset_invalid_configuration = 180, USS_message_code_ACLK_settling_time_out =240,
  USS_meesage_code_silicon_version_does_not_support_this_functionality = 241, USS_message_code_USS_ongoing_active_conversion_error =254, USS_message_code_error_occurred =255
}
 The following enumeration contain all possible USS SW Library return message codes. More...
 
enum  _USS_diagnostics_mode_ { USS_diagnostics_mode_0 = 0, USS_diagnostics_mode_1 = 1, USS_diagnostics_mode_2 = 2 }
 Selects diagnostic mode to be used by the library. For optimal power consumption it is recommended to use USS_diagnostics_mode_0. During development it is recommended to use USS_diagnostics_mode_2. More...
 
enum  _USS_capture_power_mode_ { USS_capture_power_mode_active = (GIE), USS_capture_power_mode_low_power_mode_0 = (LPM0_bits | GIE) }
 Selects the desired power mode while USS capture is done, API will remain in this mode until capture is done. More...
 
enum  _USS_stop_measurement_state_ { USS_stop_measurement_turn_off_USS = 0, USS_stop_measurement_state_ready = 1 }
 Selects USS state after capture has been stopped. More...
 
enum  _USS_measurement_drive_strength_ { USS_measurement_drive_strength_pre_trimmed_drive = 0, USS_measurement_drive_strength_max_strength = 0x0100 }
 Allows user to select USS channel drive strength. User can select between max strength and pre-trimmed drive. More...
 
enum  _USS_measurement_pause_state_ { USS_measurement_pause_state_high_impedance = 0, USS_measurement_pause_state_low = 1, USS_measurement_pause_state_high = 2 }
 Allows user to select pause state. Pause state is considered to be time before and after USS Channel Pulse Generation. More...
 
enum  _USS_measurement_pulse_polarity_ { USS_measurement_pulse_polarity_excitation_starts_on_high_pulse = 0x0000, USS_measurement_pulse_polarity_excitation_starts_on_low_pulse = 0x000F }
 Allows user to select starting pulse state. More...
 
enum  _USS_measurement_ULP_bias_delay_ { USS_measurement_ULP_bias_delay_no_delay, USS_measurement_ULP_bias_delay_100_usec, USS_measurement_ULP_bias_delay_200_usec, USS_measurement_ULP_bias_delay_300_usec }
 Allows user to select the ULP bias delay during USS Power up. sequence. The ULP bias allows a faster channel setting on reactive input loads. Please refer the device User's guide UUPS and SAPH chapter for further recommendations regarding ULP bias. More...
 
enum  _USS_measurement_bias_impedance_ { USS_measurement_bias_impedance_200_Ohms, USS_measurement_bias_impedance_600_Ohms, USS_measurement_bias_impedance_1200_Ohms, USS_measurement_bias_impedance_2800_Ohms }
 The following parameter allows the application to control the RX/TX bias during the acquisition sequence. For resistive loads a low impedance generates the fastest settling times. For reactive loads a different impedance setting might be needed to generate a gentler build up of the bias voltage. Please refer to device User's guide SAPH chapter for further recommended usage. More...
 
enum  _USS_measurement_mux_charge_pump_ { USS_measurement_mux_charge_pump_always_on, USS_measurement_mux_charge_pump_always_off }
 The following parameter allow application to turn on/off the PGA input multiplexer during the whole firing/capture sequence. Having the the charge always on allows to reduce the RX signal noise. Please refer to the SAPH chapter in the device User's guide for detailed recommended usage of this functionality. More...
 
enum  _USS_measurement_pulse_generation_mode_ { USS_measurement_pulse_generation_mode_single_tone, USS_measurement_pulse_generation_mode_dual_tone, USS_measurement_pulse_generation_mode_multi_tone }
 Lists pulse generation options. More...
 
enum  _USS_test_channel_ { USS_test_channel_0 = 0x0000, USS_test_channel_1 = 0x0001 }
 Selects USS channel to be used for test (Used for Application Debug API) More...
 
enum  _USS_measurement_capture_sequence_ {
  USS_measurement_capture_sequence_ch0 = 0, USS_measurement_capture_sequence_ch1 = 1, USS_measurement_capture_sequence_ch0_ch1 = 2, USS_measurement_capture_sequence_ch1_ch0 = 3,
  USS_measurement_capture_sequence_ch0_ch0 = 4, USS_measurement_capture_sequence_ch1_ch1 = 5, USS_measurement_capture_sequence_ch0_ch1_ch0 = 6, USS_measurement_capture_sequence_ch1_ch0_ch1 = 7,
  USS_measurement_capture_sequence_ch0_ch0_ch0 = 8, USS_measurement_capture_sequence_ch1_ch1_ch1 = 9, USS_measurement_capture_sequence_ch0_ch1_ch0_ch1 = 10, USS_measurement_capture_sequence_ch1_ch0_ch1_ch0 = 11,
  USS_measurement_capture_sequence_ch0_ch0_ch0_ch0 = 12, USS_measurement_capture_sequence_ch1_ch1_ch1_ch1 = 13
}
 Allows user to select USS capture sequence. More...
 
enum  _USS_measurement_end_of_sequence_state_ { USS_measurement_end_of_sequence_state_standby = 0, USS_measurement_end_of_sequence_state_power_off = ESOFF, USS_measurement_end_of_sequence_state_ready = STDBY+ ESOFF }
 This is the USS state after capture is done. More...
 
enum  _USS_Capture_Over_Sample_Rate_ {
  USS_Capture_Over_Sample_Rate_10 = 0x0000, USS_Capture_Over_Sample_Rate_20 = 0x0001, USS_Capture_Over_Sample_Rate_40 = 0x0002, USS_Capture_Over_Sample_Rate_80 = 0x0003,
  USS_Capture_Over_Sample_Rate_160 = 0x0004
}
 Configures SDHS Over Sample Rate

Registers modified: SDHS.CTL0.OBR More...
 
enum  _USS_Capture_Gain_Range_ {
  USS_Capture_Gain_Range_minus_6_5 = 17, USS_Capture_Gain_Range_minus_5_5 = 18, USS_Capture_Gain_Range_minus_4_6 = 19, USS_Capture_Gain_Range_minus_4_1 = 20,
  USS_Capture_Gain_Range_minus_3_3 = 21, USS_Capture_Gain_Range_minus_2_3 = 22, USS_Capture_Gain_Range_minus_1_4 = 23, USS_Capture_Gain_Range_minus_0_8 = 24,
  USS_Capture_Gain_Range_0_1 = 25, USS_Capture_Gain_Range_1_0 = 26, USS_Capture_Gain_Range_1_9 = 27, USS_Capture_Gain_Range_2_6 = 28,
  USS_Capture_Gain_Range_3_5 = 29, USS_Capture_Gain_Range_4_4 = 30, USS_Capture_Gain_Range_5_2 = 31, USS_Capture_Gain_Range_6_0 = 32,
  USS_Capture_Gain_Range_6_8 = 33, USS_Capture_Gain_Range_7_7 = 34, USS_Capture_Gain_Range_8_7 = 35, USS_Capture_Gain_Range_9_0 = 36,
  USS_Capture_Gain_Range_9_8 = 37, USS_Capture_Gain_Range_10_7 = 38, USS_Capture_Gain_Range_11_7 = 39, USS_Capture_Gain_Range_12_2 = 40,
  USS_Capture_Gain_Range_13_0 = 41, USS_Capture_Gain_Range_13_9 = 42, USS_Capture_Gain_Range_14_9 = 43, USS_Capture_Gain_Range_15_5 = 44,
  USS_Capture_Gain_Range_16_3 = 45, USS_Capture_Gain_Range_17_2 = 46, USS_Capture_Gain_Range_18_2 = 47, USS_Capture_Gain_Range_18_8 = 48,
  USS_Capture_Gain_Range_19_6 = 49, USS_Capture_Gain_Range_20_5 = 50, USS_Capture_Gain_Range_21_5 = 51, USS_Capture_Gain_Range_22_0 = 52,
  USS_Capture_Gain_Range_22_8 = 53, USS_Capture_Gain_Range_23_6 = 54, USS_Capture_Gain_Range_24_6 = 55, USS_Capture_Gain_Range_25_0 = 56,
  USS_Capture_Gain_Range_25_8 = 57, USS_Capture_Gain_Range_26_7 = 58, USS_Capture_Gain_Range_27_7 = 59, USS_Capture_Gain_Range_28_1 = 60,
  USS_Capture_Gain_Range_28_9 = 61, USS_Capture_Gain_Range_29_8 = 62, USS_Capture_Gain_Range_30_8 = 63
}
 Selects Programmable Gain Amplifier (PGA) range. More...
 
enum  _USS_Capture_Calibration_ { USS_Capture_Calibration_disabled =0x0100, USS_Capture_Calibration_enabled = 0x8100 }
 Selects Programmable Gain Amplifier (PGA) range. More...
 
enum  _USS_Trigger_Configuration_Trigger_ { USS_Triger_Configuration_Software_Trigger = 0x00 }
 Selects USS trigger option. More...
 
enum  _USS_HSPLL_input_clock_freq_ { USS_HSPLL_input_clock_freq_4_MHz, USS_HSPLL_input_clock_freq_8_MHz }
 Selects USS Crystal Frequency. More...
 
enum  _USS_HSPLL_input_clock_type_ { USS_HSPLL_input_clock_type_crystal = 0x0000, USS_HSPLL_input_clock_type_ceramic_resonator = 0x0200 }
 Selects USS HSPLL input clock Type. More...
 
enum  _USS_HSPLL_output_clk_freq_ {
  USS_HSPLL_output_clk_freq_80_MHz = 0, USS_HSPLL_output_clk_freq_79_MHz = 1, USS_HSPLL_output_clk_freq_78_MHz = 2, USS_HSPLL_output_clk_freq_77_MHz = 3,
  USS_HSPLL_output_clk_freq_76_MHz = 4, USS_HSPLL_output_clk_freq_75_MHz = 5, USS_HSPLL_output_clk_freq_74_MHz = 6, USS_HSPLL_output_clk_freq_73_MHz = 7,
  USS_HSPLL_output_clk_freq_72_MHz = 8, USS_HSPLL_output_clk_freq_71_MHz = 9, USS_HSPLL_output_clk_freq_70_MHz = 10, USS_HSPLL_output_clk_freq_69_MHz = 11,
  USS_HSPLL_output_clk_freq_68_MHz = 12
}
 Selects USS HSPLL output clock frequency. More...
 
enum  USS_SDHS_Interrupt {
  USS_SDHS_Interrupt_OVF = 0, USS_SDHS_Interrupt_ACQDONE = 1, USS_SDHS_Interrupt_SSTRG = 3, USS_SDHS_Interrupt_DTRDY = 4,
  USS_SDHS_Interrupt_WINHI = 5, USS_SDHS_Interrupt_WINLO = 6
}
 Selects appropiate USS SDHS interrupt (Used to register interrupt callback functions) More...
 
enum  USS_SAPH_Interrupt { USS_SAPH_Interrupt_DATAERR = 0, USS_SAPH_Interrupt_TMFTO = 1, USS_SAPH_Interrupt_SEQDN = 2, USS_SAPH_Interrupt_PNGDN = 3 }
 Selects appropiate USS SAPH interrupt (Used to register interrupt callback functions) More...
 
enum  USS_UUPS_Interrupt { USS_UUPS_Interrupt_PREQIG = 0, USS_UUPS_Interrupt_PTMOUT = 1, USS_UUPS_Interrupt_STPBYDB = 2 }
 Used to configure USS UUPS interrupt callback. More...
 
enum  USS_HSPLL_Interrupt { USS_HSPLL_Interrupt_PLLUNLOCK = 0 }
 Used to configure USS HSPLL interrupt callback. More...
 
enum  _USS_highFlow_option_ { USS_highFlow_option_disabled = 0, USS_highFlow_option_version1 = 1, USS_highFlow_option_version2 = 2 }
 Defines high flow computation options. More...
 
enum  _USS_low_power_mode_option_ { USS_low_power_mode_option_low_power_mode_0 = LPM0_bits, USS_low_power_mode_option_low_power_mode_1 = LPM1_bits, USS_low_power_mode_option_low_power_mode_2 = LPM2_bits, USS_low_power_mode_option_low_power_mode_3 = LPM3_bits }
 Selects the desired power mode while USS capture is done. More...
 
enum  _USS_dtof_volume_flow_calculation_interval_ { USS_dtof_volume_flow_calculation_interval_1 = 1, USS_dtof_volume_flow_calculation_interval_2 = 2, USS_dtof_volume_flow_calculation_interval_4 = 4, USS_dtof_volume_flow_calculation_interval_8 = 8 }
 Selects the interval to calculate Delta ToF and Volume Flow. More...
 
enum  _USS_dcOffEst_Calc_Mode_ { USS_dcOffEst_Calc_Mode_use_existing_UPS_DNS_capture, USS_dcOffEst_Calc_Mode_trigger_UPS_DNS_capture_controlled_by_ASQ, USS_dcOffEst_Calc_Mode_trigger_UPS_DNS_capture_using_LPM_capture }
 Selects the UPS/DNS DC offset estimation mode used by USS_estimateDCoffset API. More...
 
enum  _USS_Alg_AbsToF_Calculation_Option_ { USS_Alg_AbsToF_Calculation_Option_lobe = 0, USS_Alg_AbsToF_Calculation_Option_hilbert = 1, USS_Alg_AbsToF_Calculation_Option_lobeWide = 2, USS_Alg_AbsToF_Calculation_Option_hilbertWide = 3 }
 Enumerated type for absTOF algorithm selection. More...
 
enum  _USS_Alg_dToF_Calculation_Option_ { USS_Alg_dToF_Calculation_Option_estimate = 0, USS_Alg_dToF_Calculation_Option_water }
 Enumerated type for dToF algorithm selection. More...
 
enum  _USS_Alg_volume_flow_Calculation_Option_ { USS_Alg_volume_flow_Calculation_Option_water = 0, USS_Alg_volume_flow_Calculation_Option_gas = 1, USS_Alg_volume_flow_Calculation_Option_generic = 1 }
 Enumerated type for volume flow rate algorithm selection. More...
 

Functions

USS_message_code USS_configureUltrasonicMeasurement (USS_SW_Library_configuration *config)
 The following API configures USS module based on user configuration files "ussSwLib_userConfig.c" and "ussSwLib_userConfig.h". This API will internally invoke all USS Configuration APIs. In addition, this API will initialize the timer which will be used to generate delays such as the delay to stabilize PLL XTAL. More...
 
USS_message_code USS_startUltrasonicMeasurement (USS_SW_Library_configuration *config, USS_capture_power_mode_option powerMode)
 The following API can be used to trigger a USS Capture via software trigger.

NOTE: User must call "USS_configureUltrasonicMeasurement" before calling this API and USS trigger must be set to USS_Triger_Configuration_Software_Trigger.

The API will perform the following operations: More...
 
USS_message_code USS_startLowPowerUltrasonicCapture (USS_SW_Library_configuration *config)
 The following API has been power optimized for ultrasonic capture. The API controls the capture sequence selected by the user via the sequenceSelection member in USS_Measurement_Configuration structure. NOTE the API has been optimized for USS_measurement_capture_sequence_ch0_ch1 capture mode.

NOTE_1: User must call "USS_configureUltrasonicMeasurement" before calling this API and USS trigger must be set to USS_Triger_Configuration_Software_Trigger. To reduce power consumption between captures the device will: More...
 
USS_message_code USS_stopUltrasonicMeasurement (USS_SW_Library_configuration *config, USS_stop_measurement_state stopMeasurementState)
 The following API can be used to stop any active USS capture. The user has the option to select USS state after conversion is stopped. The API will report if capture was successfully stopped or if any errors occurs while stopping the measurement. More...
 
void USS_generateLPMDelay (USS_SW_Library_configuration *config, USS_low_power_mode_option lpmMode, uint16_t count)
 The following API can be used to generate a Low Power Mode Delay. The API allows to select the desired Low Power Mode. Global interrupts remain enable. The timer clock source for this delay is ACLK. Therefore the delay generate will be determined based on ACLK frequency (e.g. for count = 30 and ACLK freq = 32768 HZ a delay of ~915 msec will be generated. More...
 
USS_message_code USS_updateSDHSConfiguration (USS_SW_Library_configuration *config)
 The following function updates the SDHS module configuration based on user defined USS_Capture_Configuration struct in "ussSwLib_userConfig.c". Note: This API must be called everytime a USS_Capture_Configuration parameter is updated. This API performs the following SDHS module configuration. More...
 
USS_message_code USS_updateHSPLLConfiguration (USS_SW_Library_configuration *config)
 The following function updates the HSPLL module configuration based on user defined USS_HSPLL_Configuration struct in "ussSwLib_userConfig.c".

Note1: This API must be called everytime a USS_HSPLL_Configuration parameter is updated.

Note2: If "pllOutputFreq_inHz" is modified in USS_HSPLL_Configuration struct, user must call USS_updateSDHSCapture API since SDHS modulator optimization bits might need to be updated.

This API performs the following HSPLL module configuration checks: More...
 
USS_message_code USS_updateSAPHConfiguration (USS_SW_Library_configuration *config)
 The following function updates the SAPH module configuration based on user defined USS_Measurement_Configuration struct in "ussSwLib_userConfig.c".

Note: This API must be called everytime a USS_Measurement_Configuration parameter is updated.

This API performs the following SAPH module configuration checks: More...
 
USS_message_code USS_updateUUPSConfiguration (USS_SW_Library_configuration *config)
 The following function updates the UUPS module configuration based on user defined USS_Trigger_Configuration struct in "ussSwLib_userConfig.c".

Note1: This API must be called every time a USS_Trigger_Configuration parameter is updated.

Note2: This API will assert HSPLL.PLLXTEN bit when USS_Triger_Configuration_RTC_Timer_Trigger, USS_Triger_Configuration_External_Trigger1 or USS_Triger_Configuration_External_Trigger2. Selecting USS_Triger_Configuration_Software_Trigger will deassert HSPLL.PLLXTEN bit.

This API performs the following checks: More...
 
USS_message_code USS_updateUSSInterruptsConfiguration (USS_SW_Library_configuration *config)
 The following function updates the UUPS module interrupt configuration based on user defined USS_Interrupt_Configuration struct in "ussSwLib_userConfig.c". Note: This API must be called every time an USS_Interrupt_Configuration parameter is updated.

This API performs the following checks: More...
 
USS_message_code USS_resetUSSModule (USS_SW_Library_configuration *config, bool reconfigUSSModule)
 This function allows application to reset the USS module. It is recommended that this API is used when an USS SW Library API return a HSPLL unlock error.
The API allows user to control the reconfiguration of the measurement. If reconfigUSSModule == true then the measurement is reconfigured. If reconfigUSSModule == false then the USS module will have the default module configuration after a power-up clear (PUC) reset.

Note: This functionality is only available in MSP430FR604x Rev B or later silicon. If the code is running on Rev A silicon and this API is called the API will return the following error message USS_meesage_code_silicon_version_does_not_support_this_functionality, it is recommended that the application checks the API return message code to confirm the USS module have been reset successfully. More...
 
USS_message_code USS_swapCaptureChannels (USS_SW_Library_configuration *config)
 This function allows user to swap capture channels. This functionality is only available when USS_measurement_capture_sequence_ch0_ch1 or USS_measurement_capture_sequence_ch1_ch0 capture sequence is selected. More...
 
USS_message_code USS_verifyHSPLLFrequency (USS_SW_Library_configuration *config, USS_calibration_hspll_results *testResults)
 The following API allows to verify the HSPLL frequency is set at the user selected pllOutputFreq_inHz in the USS_HSPLL_Configuration struct. The test consists on using LFXT to verify HSPLL frequency. The acquisition timer which is sourced by the HSPLL will be clear and started for this test. After 30.517 msec the acquisition timer will be stopped and the acquisition timer counter will be used to determine if HSPLL is working the tolerance frequency range. This test is run 16 times and acquisition timer counts are averaged to determine if the outcome of the test is within the desired tolerance. More...
 
USS_message_code USS_calibrateSignalGain (USS_SW_Library_configuration *config)
 The following API runs the SDHS Signal Gain calibration routine if no errors are encountered during Signal Gain calibration the config->captureConfig->gainRange value will be configured else it will remain the original value. Please refer to agcConstant parameter description in USS_Capture_Configuration structure for more information regarding the configuration for this signal gain calibration parameter. More...
 
USS_message_code USS_estimateDCoffset (USS_SW_Library_configuration *config, USS_dcOffEst_Calc_Mode mode)
 This API allows the user to estimate the DC offset generated by the SDHS module. More...
 
USS_message_code USS_calculateOffsets (USS_SW_Library_configuration *config, USS_dTof_absTof_offset_results *testResults, USS_dTof_absTof_offset_test_config *testConfig)
 This API allows the user to estimate the DC offset generated by the SDHS module. More...
 
USS_message_code USS_initAlgorithms (USS_SW_Library_configuration *config)
 The following API initializes USS_Algorithms_Handle based on user USS_Algorithms_User_Configuration, USS_System_Configuration, USS_Meter_Configuration and USS_Measurement_Configuration structs. Currently this API does not perform any parameter checks. More...
 
USS_message_code USS_runAlgorithmsFixedPoint (USS_SW_Library_configuration *config, USS_Algorithms_Results_fixed_point *results)
 The following API calculates Absolute ToF Upstream, Absolute ToF Downstream, Delta ToF, Volume Flow Rate using fixed point math. //!

IMPORTANT: It is recommend to use this version of the API to reduce power consumption numbers. More...
 
USS_message_code USS_runAlgorithms (USS_SW_Library_configuration *config, USS_Algorithms_Results *results)
 The following API calculates Absolute ToF Upstream, Absolute ToF Downstream, Delta ToF, Volume Flow Rate.

Note1: USS_initAlgorithms must be called prior to calling this function. The API expects to have a Up stream (UPS) and Down stream (DNS) of size "sampleSize" in contiguous LEA memory where the first capture is assumed to be UPS capture and the second capture is assumed to be DNS capture. Therefore, UPS and DNS capture depends on the type of capture the user select via sequenceSelection member in USS_Measurement_Configuration structure For example: if sequenceSelection == USS_measurement_capture_sequence_ch0_ch1 then USS CH0 is assumed to be UPS capture and CH1 is assumed to be DNS capture and vice versa for USS_measurement_capture_sequence_ch1_ch0 If API return message code USS_message_code_valid_results, then algorithms result are valid. More...
 
USS_message_code USS_generateMonoDualToneBinaryPattern (USS_SW_Library_configuration *config)
 The following API is used to generate the binary pattern used by USS_Alg_AbsToF_Calculation_Option_lobeWide and USS_Alg_AbsToF_Calculation_Option_hilbertWide computation options. Use this when AbsTof computation option is set to USS_Alg_AbsToF_Calculation_Option_lobeWide or USS_Alg_AbsToF_Calculation_Option_hilbertWide and pulse generation is single or dual mode. More...
 
USS_message_code USS_generateMultiToneBinaryPattern (USS_SW_Library_configuration *config)
 The following API is used to generate the binary pattern used by USS_Alg_AbsToF_Calculation_Option_lobeWide and USS_Alg_AbsToF_Calculation_Option_hilbertWide computation options. Use this when AbsTof computation option is set to USS_Alg_AbsToF_Calculation_Option_lobeWide or USS_Alg_AbsToF_Calculation_Option_hilbertWide and pulse generation is multi tone mode. More...
 
USS_message_code USS_updateABSTOFCalculationIteration (USS_SW_Library_configuration *config)
 The following API allows user to update the frequency at which the Absolute Time of Flight is calculated in the algorithms. The iteration value is set via the "absTOFIteration" parameter in the USS_Algorithm_User_Configuration structure. More...
 
USS_message_code USS_updateClockRelativeError (USS_SW_Library_configuration *config)
 The following API allows user to update clockRelativeError parameter during runtime. The clockRelativeError parameter is used to by USS_runAlgorithms and USS_runAlgorithmsFixedPoint APIs. The clockRelativeError parameter is used to correct the UPS and DNS AbsTOF calculations. Refere to clockRelativeError description for for guidance on how to estimate this parameter using USS_verifyHSPLLFrequency API. More...
 
USS_message_code USS_getResultsInFloat (USS_Algorithms_Results_fixed_point *pFixedResults, USS_Algorithms_Results *pFloatResults)
 The following API allows user to convert the fixed point Algorithm results to floating point representation. More...
 
USS_message_code USS_swapAlgorithmsCaptureBuffers (USS_SW_Library_configuration *config)
 This function allows user to swap capture buffers. It is highly recommended to call this function after calling USS_swapCaptureChannels. More...
 
bool USS_isAlgorithmChannelsSwapped (void)
 This function allows users to query current status Algorithm Capture buffers. More...
 
USS_message_code USS_updateAdditionalCaptureDelay (USS_SW_Library_configuration *config, float additionalCaptureDelay)
 This function allows users to update Additional Capture Delay with with minimal algorithm reconfiguration. More...
 
USS_message_code USS_updateDtoFOffset (USS_SW_Library_configuration *config, float dTofOffset)
 This function allows users to update Delta Time Of Flight Offset with with minimal algorithm reconfiguration. More...
 
USS_message_code USS_testPPGconfiguration (USS_SW_Library_configuration *config, USS_test_channel PPGChannel)
 The following API will output current PPG configuration.

PPG configuration is controlled via the following USS_Measurement_Configuration parameter: More...
 
USS_message_code USS_testSDHSconversion (USS_SW_Library_configuration *config, USS_test_channel SDHSChannel, USS_capture_power_mode_option mode)
 The following trigger manual SDHS conversion with current SDHS configuration. SDHS configuration is controlled via the USS_Measurement_Configuration struct and .

The API will perform the following operations: More...
 
USS_message_code USS_startPPGToneGeneration (USS_SW_Library_configuration *config, USS_test_channel PPGChannel)
 The following API will the tone generation output in the SAPH module.

Tone generation is controlled via the following USS_Measurement_Configuration parameter: More...
 
USS_message_code USS_stopPPGToneGeneration (USS_SW_Library_configuration *config)
 The following API will stop the tone generation output in the SAPH module. More...
 
int16_t * USS_getUPSPtr (USS_SW_Library_configuration *config)
 The following API allows to obtain the address were UPS capture starts. IMPORTANT: USS_configureUltrasonicMeasurement API must be call in the application first before using this API. More...
 
int16_t * USS_getDNSPtr (USS_SW_Library_configuration *config)
 The following API allows to obtain the address were DNS capture starts. IMPORTANT: USS_configureUltrasonicMeasurement API must be call in the application first before using this API. More...
 
void USS_registerSDHSInterruptCallback (USS_SDHS_Interrupt interruptNum, void function(void))
 The following API registers a function callback to the desired SAPH interrupt vector. More...
 
void USS_registerSAPHInterruptCallback (USS_SAPH_Interrupt interruptNum, void function(void))
 The following API registers a function callback to the desired SAPH interrupt vector. More...
 
void USS_registerUUPSInterruptCallback (USS_UUPS_Interrupt interruptNum, void function(void))
 The following API registers a function callback to the desired UUPS interrupt vector. More...
 
void USS_registerHSPLLInterruptCallback (USS_HSPLL_Interrupt interruptNum, void function(void))
 The following API registers a function callback to the desired HSPLL interrupt vector. More...
 
void USS_unregisterSDHSInterruptCallback (USS_SDHS_Interrupt interruptNum)
 The following API registers a function callback to the desired SAPH interrupt vector. More...
 
void USS_unregisterSAPHInterruptCallback (USS_SAPH_Interrupt interruptNum)
 The following API unregisters a function callback to the desired SAPH interrupt vector. More...
 
void USS_unregisterUUPSInterruptCallback (USS_UUPS_Interrupt interruptNum)
 The following API unregisters a function callback to the desired UUPS interrupt vector. More...
 
void USS_unregisterHSPLLInterruptCallback (USS_HSPLL_Interrupt interruptNum)
 The following API unregisters a function callback to the desired HSPLL interrupt vector. More...
 

Variables

volatile uint32_t USSSWLIB_USS_interrupt_status
 The following variable is used to monitor USS interrupt status this variable combines SAPH, UUPS, HSPLL interrupts as well as a Timer interrupt status. More...
 

Macro Definition Documentation

§ USS_UUPS_PWR_REQ_IGN_INTERRUPT

#define USS_UUPS_PWR_REQ_IGN_INTERRUPT   BIT0

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS UUPS Power request ignored interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), and ISR_UUPS().

§ USS_UUPS_PWR_UP_TM_OUT_INTERRUPT

#define USS_UUPS_PWR_UP_TM_OUT_INTERRUPT   BIT1

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS UUPS Power up time out interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), commonWaitForconversion(), and ISR_UUPS().

§ USS_SAPH_DATA_ERR_ABORT_INTERRUPT

#define USS_SAPH_DATA_ERR_ABORT_INTERRUPT   BIT2

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SAPH Data error abort interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), and ISR_SAPH().

§ USS_SAPH_TMF_TM_OUT_INTERRUPT

#define USS_SAPH_TMF_TM_OUT_INTERRUPT   BIT3

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SAPH Time Mark 4 time out interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), and ISR_SAPH().

§ USS_SAPH_SEQ_ACQ_DN_INTERRUPT

#define USS_SAPH_SEQ_ACQ_DN_INTERRUPT   BIT4

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SAPH sequence acquisition done interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), commonWaitForconversion(), ISR_SAPH(), and USS_stopUltrasonicMeasurement().

§ USS_SAPH_PING_DN_INTERRUPT

#define USS_SAPH_PING_DN_INTERRUPT   BIT5

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SAPH ping transmit done interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), and ISR_SAPH().

§ USS_HSPLL_PLL_UNLOCK_INTERRUPT

#define USS_HSPLL_PLL_UNLOCK_INTERRUPT   BIT6

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS HSPLL PLL unlock interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), commonWaitForconversion(), and ISR_HSPLL().

§ USS_SDHS_WINLO_INTERRUPT

#define USS_SDHS_WINLO_INTERRUPT   BIT7

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS WINLO interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), and ISR_SDHS().

§ USS_SDHS_WINHI_INTERRUPT

#define USS_SDHS_WINHI_INTERRUPT   BIT8

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS WINHI interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), and ISR_SDHS().

§ USS_SDHS_DTRDY_INTERRUPT

#define USS_SDHS_DTRDY_INTERRUPT   BIT9

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS DTRDY interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), and ISR_SDHS().

§ USS_SDHS_SSTRG_INTERRUPT

#define USS_SDHS_SSTRG_INTERRUPT   BITA

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS SSTRG interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), and ISR_SDHS().

§ USS_SDHS_ACQDONE_INTERRUPT

#define USS_SDHS_ACQDONE_INTERRUPT   BITB

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS SMPSZ interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), commonWaitForconversion(), and ISR_SDHS().

§ USS_SDHS_OVF_INTERRUPT

#define USS_SDHS_OVF_INTERRUPT   BITC

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SDHS OVF interrupt has been triggered.

Referenced by commonClearUSSInterrupts(), and ISR_SDHS().

§ USS_TIMER_EXPIRED_INTERRUPT

#define USS_TIMER_EXPIRED_INTERRUPT   BITD

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if USS SW Library delay generator timer has expired.

Referenced by commonTimerGenerateLowPowerDelay(), commonTimerPeriodMeasurementClear(), USS_stopUltrasonicMeasurement(), and USSLIB_HAL_TIMER_INT().

§ USS_SAPH_SEQUENCE_STOPPED

#define USS_SAPH_SEQUENCE_STOPPED   BITE

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if SAPH has been stopped.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), commonWaitForconversion(), and USS_stopUltrasonicMeasurement().

§ USS_UUPS_STOPPED_BY_DEBUGGER

#define USS_UUPS_STOPPED_BY_DEBUGGER   BITF

This defines can be used to mask USSSWLIB_USS_interrupt_status variable and determine if UUPS has been stopped by the debugger.

Referenced by commonClearUSSInterrupts(), commonIsconversionSuccessfull(), commonWaitForconversion(), and ISR_UUPS().

§ USS_TIMER_EXPIRED_EVENT1_INTERRUPT

#define USS_TIMER_EXPIRED_EVENT1_INTERRUPT   0x10000

This bit determines if the first event of period measurement is complete.

Referenced by commonTimerPeriodMeasurementClear(), and USSLIB_HAL_TIMER_INT_CCRn().

§ USS_SAPH_DMA_ACK_VIOLATION

#define USS_SAPH_DMA_ACK_VIOLATION   (0x00010000)

This define can be used to mask USSSWLIB_USS_interrupt_status variable and determine if SAPH generated an DMA acknowledgment violation.

Referenced by commonClearUSSInterrupts().

§ HARDWAREWREG16

#define HARDWAREWREG16 (   x)    (*((volatile uint16_t *)((uint16_t)x)))

§ USS_Alg_dToF_Calculation_Option_gas

#define USS_Alg_dToF_Calculation_Option_gas   USS_Alg_dToF_Calculation_Option_estimate

Typedef Documentation

§ USS_message_code

The following enumeration contain all possible USS SW Library return message codes.

§ USS_diagnostics_mode

Selects diagnostic mode to be used by the library. For optimal power consumption it is recommended to use USS_diagnostics_mode_0. During development it is recommended to use USS_diagnostics_mode_2.

§ USS_capture_power_mode_option

Selects the desired power mode while USS capture is done, API will remain in this mode until capture is done.

§ USS_stop_measurement_state

Selects USS state after capture has been stopped.

§ USS_measurement_drive_strength

Allows user to select USS channel drive strength. User can select between max strength and pre-trimmed drive.

§ USS_measurement_pause_state

Allows user to select pause state. Pause state is considered to be time before and after USS Channel Pulse Generation.

§ USS_measurement_pulse_polarity

Allows user to select starting pulse state.

§ USS_measurement_ULP_bias_delay

Allows user to select the ULP bias delay during USS Power up. sequence. The ULP bias allows a faster channel setting on reactive input loads. Please refer the device User's guide UUPS and SAPH chapter for further recommendations regarding ULP bias.

§ USS_measurement_bias_impedance

The following parameter allows the application to control the RX/TX bias during the acquisition sequence. For resistive loads a low impedance generates the fastest settling times. For reactive loads a different impedance setting might be needed to generate a gentler build up of the bias voltage. Please refer to device User's guide SAPH chapter for further recommended usage.

§ USS_measurement_mux_charge_pump

The following parameter allow application to turn on/off the PGA input multiplexer during the whole firing/capture sequence. Having the the charge always on allows to reduce the RX signal noise. Please refer to the SAPH chapter in the device User's guide for detailed recommended usage of this functionality.

§ USS_measurement_pulse_generation_mode

Lists pulse generation options.

§ USS_test_channel

Selects USS channel to be used for test (Used for Application Debug API)

§ USS_measurement_capture_sequence

Allows user to select USS capture sequence.

§ USS_measurement_end_of_sequence_state

This is the USS state after capture is done.

§ USS_Capture_Over_Sample_Rate

Configures SDHS Over Sample Rate

Registers modified: SDHS.CTL0.OBR

§ USS_Capture_Gain_Range

Selects Programmable Gain Amplifier (PGA) range.

§ USS_Capture_Calibration

Selects Programmable Gain Amplifier (PGA) range.

§ USS_Trigger_Configuration_Trigger

Selects USS trigger option.

§ USS_HSPLL_input_clock_freq

Selects USS Crystal Frequency.

§ USS_HSPLL_input_clock_type

Selects USS HSPLL input clock Type.

§ USS_HSPLL_output_clk_freq

Selects USS HSPLL output clock frequency.

§ USS_SDHS_Interrupt

Selects appropiate USS SDHS interrupt (Used to register interrupt callback functions)

§ USS_SAPH_Interrupt

Selects appropiate USS SAPH interrupt (Used to register interrupt callback functions)

§ USS_UUPS_Interrupt

Used to configure USS UUPS interrupt callback.

§ USS_HSPLL_Interrupt

Used to configure USS HSPLL interrupt callback.

§ USS_highFlow_option

Defines high flow computation options.

§ USS_low_power_mode_option

Selects the desired power mode while USS capture is done.

§ USS_dtof_volume_flow_calculation_interval

Selects the interval to calculate Delta ToF and Volume Flow.

§ USS_dcOffEst_Calc_Mode

Selects the UPS/DNS DC offset estimation mode used by USS_estimateDCoffset API.

§ USS_Alg_AbsToF_Calculation_Option

Enumerated type for absTOF algorithm selection.

§ USS_Alg_dToF_Calculation_Option

Enumerated type for dToF algorithm selection.

§ USS_Alg_volume_flow_Calculation_Option

Enumerated type for volume flow rate algorithm selection.

§ USS_Algorithms_Meter_Constant_Calib

Contain meter constant calibration data.

§ USS_System_Configuration

Contains USS SW Lib System Configuration.

§ USS_Pulse_Additional_End_of_Sequence_Configuration

Structure to configure additional multi tone pulse generation.

§ USS_Pulse_Multitone_Configuration

structure to configure multi tone pulse generation

§ USS_Pulse_Single_Dual_Tone_Configuration

The following structure allows user to specify single and dual tone configuration.

§ USS_Pulse_Configuration

Allows user to specify the pulse configuration.

§ USS_Meter_Configuration

Contains USS SW Lib Meter Configuration.

§ USS_Measurement_Configuration

Contains USS SW Lib Measurement Configuration.

§ USS_HSPLL_Configuration

Contains USS SW Lib HSPLL Configuration.

§ USS_dTof_absTof_offset_test_config

This structure is passed to USS_calculateOffsets API and define the test calibration configuration.

§ USS_dTof_absTof_offset_results

This structure is passed to USS_calculateOffsets API and calibration test result will be returned in this structure.

§ USS_calibration_hspll_results

This structure is passed to USS_verifyHSPLLFrequency API and test result will be returned using this structure.

§ USS_Capture_Configuration

Contains USS SW Lib Capture Configuration.

§ USS_Trigger_Configuration

Contains USS SW Lib Trigger Configuration.

§ USS_Interrupt_Configuration

Contains USS SW Lib Capture Configuration.

§ USS_Algorithms_User_Configuration

Contains USS SW Lib Algorithms User Configuration.

§ USS_Algorithms_Results

Contains USS SW Lib Algorithms Results.

§ USS_Algorithms_Results_fixed_point

Contains USS SW Lib Algorithms Results.

§ USS_SW_Library_configuration

Contains USS SW Lib configuration.

Enumeration Type Documentation

§ _USS_message_code_

The following enumeration contain all possible USS SW Library return message codes.

Enumerator
USS_message_code_no_error 

These message codes are use to provide status/error messages to the user all APIs will return a message code after the execution.

USS_message_code_SAPH_pulseLowPhasePeriod_error 

This error is returned when the SAPH low phase period configuration is invalid

USS_message_code_SAPH_pulseHighPhasePeriod_error 

This error is returned when the SAPH high phase period configuration is invalid

USS_message_code_SAPH_numOfExcitationPulses_error 

This error is returned when SAPH number of excitation pulses is invalid.

USS_message_code_SAPH_numOfStopPulses_error 

This error is returned when SAPH number of stop pulses is invalid.

USS_message_code_SAPH_update_error_ongoing_conversion 

This error is returned if user attempted to update SAPH during an active conversion

USS_message_code_SAPH_time_startPPGCount_error 

This error is returned if startPPGCount is invalid.

USS_message_code_SAPH_time_turnOnADCCount_error 

This error is returned if turnOnADCCount is invalid.

USS_message_code_SAPH_time_startADCsamplingCount_error 

This error is returned if startADCsamplingCount is invalid.

USS_message_code_SAPH_time_restartCaptureCount_error 

This error is returned if restartCaptureCount is invalid.

USS_message_code_SAPH_time_captureTimeOutCount_error 

This error is returned if captureTimeOutCount is invalid.

USS_message_code_SAPH_time_startPGAandINBiasCount_error 

This error is returned if startPGAandINBiasCount is invalid.

USS_message_code_SAPH_invalid_bias_impedance_error 

This error is returned if an invalid bias impedance value is selected.

USS_message_code_SAPH_invalid_rx_charge_pump_mode_error 

This error is returned if an invalid charge pump configuration is selected.

USS_message_code_SAPH_invalid_pulse_configuration_error 

This error is returned if an invalid pulse generation parameters are invalid. This error is returned in the following cases:

  • for multi-tone (hspll_freq/f1) or (hspll_freq/f2) greater than 510.
  • for mone tone [(hspll_freq/f1)*(duty_cycle)] and [(hspll_freq/f1) *(1-duty_cycle)] greater than 255
  • for dual tone the same check as in mono tone is performed but against f2 parameter
USS_message_code_HSPLL_pllXtalFreq_inHz_error 

This error is returned if input frequency for HSPLL module is invalid.

USS_message_code_HSPLL_pllOutputFreq_inHz_error 

This error is returned if the output frequency of the HSPLL is invalid.

USS_message_code_HSPLL_plllock_error 

This error is returned if there is an error locking the PLL.

USS_message_code_HSPLL_pll_unlock_error 

This error is returned if HSPLL detects pll has unlocked.

USS_message_code_HSPLL_update_error_ongoing_conversion 

This error is returned if user attempted to update HSPLL during an active conversion

USS_message_code_HSPLL_verification_expected_count_error 

This error is returned if USS_verifyHSPLLFrequency API if abs(expected count-actualCount)>tolerance

USS_message_code_HSPLL_invalid_settling_count_error 

This error is returned if ussXTALsettlelingCount is 0.

USS_message_code_SDHS_threshold_error 

SDHS messages.

This error is returned if high and/or low threshold are invalid

USS_message_code_SDHS_conversion_overflow_error 

This error is returned if a conversion overflow is detected during conversion

USS_message_code_SDHS_sample_size_error 

This error is returned if sample size is invalid.

USS_message_code_SDHS_update_error_ongoing_conversion 

This error is returned if user attempted to update SDHS during an active conversion

USS_message_code_SDHS_window_low_threshold_reached 

This error is returned if conversion reached low threshold during conversion

USS_message_code_SDHS_window_high_threshold_reached 

This error is returned if conversion reached high threshold during conversion

USS_message_code_SDHS_max_size_error 

This error is returned if max sample size is entered.

USS_message_code_UUPS_update_error_ongoing_conversion 

UUPS messages.

This error is returned if user attempted to update UUPS during an active conversion

USS_message_code_UUPS_power_up_time_out_error 

This error is returned if a UUPS Power up time out is detected.

USS_message_code_UUPS_power_up_error 

This error is returned if a USS power up error is detected.

USS_message_code_UUPS_power_down_error 

This error is returned if a USS power down error is detected.

USS_message_code_data_error_abort 

This error is returned if a data error is triggered during sequence.

USS_message_code_ASQ_time_out 

This error is returned if an ASQ time out occurs.

USS_message_code_measurement_stopped 

This error is returned to indicate an ongoing measurement was stopped.

USS_message_code_error_conversion_stopped_by_debugger 

This error is returned if a USS sequence is stopped by the debugger.

USS_message_code_parameter_check_failed 

USS Algorithms message codes.

This error is returned if invalid parameters are used to initialize algorithms

USS_message_code_valid_results 

This error is returned if NO problems where encountered while running the algorithms

USS_message_code_algorithm_error 

This error is returned if problems were encountered while running the algorithms. The results return by USS_runAlgorihtms or USS_runAlgorithmsFixedPoint USS_runAlgorithmsFixedPoint are invalid if this error is returned

USS_message_code_algorithm_error_invalid_iteration_value 

This error is returned the user has selected an invalid number of absTOFInterval. The results return by USS_runAlgorithms or USS_runAlgorithmsFixedPoint are invalid if this error is returned

USS_message_code_algorithm_error_no_signal_detected_ups_channel 

This error is returned if no signal is detected in UP stream channel. The results return by USS_runAlgorihtms or USS_runAlgorithmsFixedPoint are invalid if this error is returned.

USS_message_code_algorithm_error_no_signal_detected_ups_dns_channel 

This error is returned if no signal is detected in UP AND DOWN stream channel. The results return by USS_runAlgorihtms or USS_runAlgorithmsFixedPoint are invalid if this error is returned.

USS_message_code_algorithm_error_no_signal_detected_dns_channel 

This error is returned if no signal is detected in DOWN stream channel The results return by USS_runAlgorihtms or USS_runAlgorithmsFixedPoint are invalid if this error is returned.

USS_message_code_algorithm_captures_accumulated 

This message is returned by USS_runAlgorihtms or USS_runAlgorithmsFixedPoint to indicate that UPS/DNS have only being accumulated

USS_message_code_algorithm_error_invalid_clock_relative_error 

This message is returned by USS_updateClockRelativeError to indicate that clockRelativeError is outside tha valid range.

USS_message_code_algorithm_error_invalid_filter_length 

This message is returned by USS_initAlgorithms API if user has enabled USS_diagnostics_mode_2. This error is returned if filterLenght is greater than 20

USS_message_code_algorithm_error_generating_binary_pattern 

This message is returned by USS_initAlgorithms API. This error is returned if binary pattern does not fit in memory reserved by user. Minimum binary size

  • monotone: ((HSPLLFREQ*USS_NUM_OF_EXCITATION_PULSES_F1)/(USS_F1_FREQ*downSampleFactor))
  • dualtone: ((HSPLLFREQ*USS_NUM_OF_EXCITATION_PULSES_F1)/(USS_F1_FREQ*downSampleFactor)) + ((HSPLLFREQ*USS_NUM_OF_EXCITATION_PULSES_F2)/(USS_F2_FREQ*downSampleFactor))
  • multitone:((HSPLLFREQ*USS_NUM_OF_TRILL_PULSES *2)/((USS_F1_FREQ + USS_F2_FREQ/2)*downSampleFactor)) + ((HSPLLFREQ*USS_NUM_OF_EXCITATION_PULSES_F2)/(USS_F2_FREQ*downSampleFactor))
USS_message_code_algorithm_error_invalid_absToF_computation_option 

This message is returned by USS_initAlgorithms API if user has enabled USS_diagnostics_mode_2. This error is returned if user has selected an invalid absTof computation option

USS_message_code_algorithm_error_invalid_meter_constant_calib_data 

This message is returned by USS_initAlgorithms API if user has enabled USS_diagnostics_mode_2 and user has an invalid USS_Meter_Configuration configuration

USS_message_code_algorithm_error_meter_constant_calib 

This message is returned if the minimum volume flow rate falls outside the lowest alphaMin calibration point.

USS_message_code_interrupt_update_error_ongoing_conversion 

This error is returned if user attempted to update the interrupt configuration during an active conversion

USS_message_code_invalid_conversion_data 

USS ISTOP messages.

USS_message_code_Calibration_DAC_success 

This error is returned when conversion was interrupted.

USS_message_code_Calibration_DAC_error 

Indicates DAC calibration completed successfully.

USS_message_code_Calibration_Gain_error 

Indicates an error during DAC calibration routine.

USS_message_code_Calibration_DCO_error 

Indicates an error during Gain calibration routine.

USS_message_code_Signal_Gain_Calibration_timeout 

Indicates an error during DCO calibration routine.

USS_message_code_Signal_Gain_Calibration_settling 

Indicates a timeout occurred during signal gain calibration routine.

USS_message_code_Signal_Gain_Calibration_successful 

Indicates signal gain calibration routine ended during signal settling loop

USS_message_code_Calibration_DAC_timeout_error 

Indicates signal gain calibration completed successfully.

USS_message_code_Calibration_ToF_Offset_error 

Indicates a timeout occurred during DAC calibration.

USS_message_code_Calibration_Offset_invalid_configuration 

Indicates a error has occurred during Abs ToF and DToF calculation.

USS_message_code_ACLK_settling_time_out 

Indicated a test configuration has occured while running AbsToF and DToF offset calculation This error is return when the USS module attempted to configure the timer module but the oscillation flag was not cleared within the expected timeout period (~800 msec)

USS_meesage_code_silicon_version_does_not_support_this_functionality 

This error is return when a silicon rev B or later functionality is attempted to be used in rev A silicon (XMS material).

USS_message_code_USS_ongoing_active_conversion_error 

This error is return when the USS module was attempted to be updated while USS_ BUSY bit was set

USS_message_code_error_occurred 

This is a generic error this is error that is returned if an unhandled error occurs

§ _USS_diagnostics_mode_

Selects diagnostic mode to be used by the library. For optimal power consumption it is recommended to use USS_diagnostics_mode_0. During development it is recommended to use USS_diagnostics_mode_2.

Enumerator
USS_diagnostics_mode_0 

This mode will allow to achieve lowest power consumption.

USS_diagnostics_mode_1 
USS_diagnostics_mode_2 

This mode enables diagnostics in mode 2 and USS configuration parameter checking

§ _USS_capture_power_mode_

Selects the desired power mode while USS capture is done, API will remain in this mode until capture is done.

Enumerator
USS_capture_power_mode_active 

MSP remains in ACTIVE power mode until USS capture is done.

USS_capture_power_mode_low_power_mode_0 

MSP remains in LPM0 power mode until USS capture is done.

§ _USS_stop_measurement_state_

Selects USS state after capture has been stopped.

Enumerator
USS_stop_measurement_turn_off_USS 

USS goes to OFF state.

USS remains in READY state

USS_stop_measurement_state_ready 

§ _USS_measurement_drive_strength_

Allows user to select USS channel drive strength. User can select between max strength and pre-trimmed drive.

Enumerator
USS_measurement_drive_strength_pre_trimmed_drive 

Pre-trimmed drive strength will be applied.

USS_measurement_drive_strength_max_strength 

Max drive strength will be applied.

§ _USS_measurement_pause_state_

Allows user to select pause state. Pause state is considered to be time before and after USS Channel Pulse Generation.

Enumerator
USS_measurement_pause_state_high_impedance 

USS channel remains in high impedance state.

USS_measurement_pause_state_low 

USS channel remains in low state.

USS_measurement_pause_state_high 

USS channel remains in high state.

§ _USS_measurement_pulse_polarity_

Allows user to select starting pulse state.

Enumerator
USS_measurement_pulse_polarity_excitation_starts_on_high_pulse 

Start pulse generation with high pulse.

USS_measurement_pulse_polarity_excitation_starts_on_low_pulse 

Start pulse generation with low pulse.

§ _USS_measurement_ULP_bias_delay_

Allows user to select the ULP bias delay during USS Power up. sequence. The ULP bias allows a faster channel setting on reactive input loads. Please refer the device User's guide UUPS and SAPH chapter for further recommendations regarding ULP bias.

Enumerator
USS_measurement_ULP_bias_delay_no_delay 

Disables ULP bias delay functionality.

USS_measurement_ULP_bias_delay_100_usec 

Generates an approximate ULP bias delay of 100 usec during power up sequence

USS_measurement_ULP_bias_delay_200_usec 

Generates an approximate ULP bias delay of 200 usec during power up sequence

USS_measurement_ULP_bias_delay_300_usec 

Generates an approximate ULP bias delay of 300 usec during power up sequence

§ _USS_measurement_bias_impedance_

The following parameter allows the application to control the RX/TX bias during the acquisition sequence. For resistive loads a low impedance generates the fastest settling times. For reactive loads a different impedance setting might be needed to generate a gentler build up of the bias voltage. Please refer to device User's guide SAPH chapter for further recommended usage.

Enumerator
USS_measurement_bias_impedance_200_Ohms 

Generates a 200 Ohms bias impedance.

USS_measurement_bias_impedance_600_Ohms 

Generates a 600 Ohms bias impedance.

USS_measurement_bias_impedance_1200_Ohms 

Generates a 1200 Ohms bias impedance.

USS_measurement_bias_impedance_2800_Ohms 

Generates a 2800 Ohms bias impedance.

§ _USS_measurement_mux_charge_pump_

The following parameter allow application to turn on/off the PGA input multiplexer during the whole firing/capture sequence. Having the the charge always on allows to reduce the RX signal noise. Please refer to the SAPH chapter in the device User's guide for detailed recommended usage of this functionality.

Enumerator
USS_measurement_mux_charge_pump_always_on 

The mux charge pump remains ON during the firing/capture sequence.

USS_measurement_mux_charge_pump_always_off 

The mux charge pump remains OFF during the firing/capture sequence.

§ _USS_measurement_pulse_generation_mode_

Lists pulse generation options.

Enumerator
USS_measurement_pulse_generation_mode_single_tone 

Generate a single tone pulse.

USS_measurement_pulse_generation_mode_dual_tone 

Generate a dual tone pulse.

USS_measurement_pulse_generation_mode_multi_tone 

Generate a multi tone pulse.

§ _USS_test_channel_

Selects USS channel to be used for test (Used for Application Debug API)

Enumerator
USS_test_channel_0 

Select USS Channel 0.

USS_test_channel_1 

Select USS Channel 1.

§ _USS_measurement_capture_sequence_

Allows user to select USS capture sequence.

Enumerator
USS_measurement_capture_sequence_ch0 

Configures ASQ for single channel capture.

USS_measurement_capture_sequence_ch1 
USS_measurement_capture_sequence_ch0_ch1 

Configures ASQ for double channel capture.

USS_measurement_capture_sequence_ch1_ch0 
USS_measurement_capture_sequence_ch0_ch0 
USS_measurement_capture_sequence_ch1_ch1 
USS_measurement_capture_sequence_ch0_ch1_ch0 

Configures ASQ for triple channel capture.

USS_measurement_capture_sequence_ch1_ch0_ch1 
USS_measurement_capture_sequence_ch0_ch0_ch0 
USS_measurement_capture_sequence_ch1_ch1_ch1 
USS_measurement_capture_sequence_ch0_ch1_ch0_ch1 

Configures ASQ for four channel capture.

USS_measurement_capture_sequence_ch1_ch0_ch1_ch0 
USS_measurement_capture_sequence_ch0_ch0_ch0_ch0 
USS_measurement_capture_sequence_ch1_ch1_ch1_ch1 

§ _USS_measurement_end_of_sequence_state_

This is the USS state after capture is done.

Enumerator
USS_measurement_end_of_sequence_state_standby 

USS goes to STANDBY state after capture is done.

USS_measurement_end_of_sequence_state_power_off 

USS goes to POWER OFF state after capture is done.

USS_measurement_end_of_sequence_state_ready 

USS stays in READY state after capture is done.

§ _USS_Capture_Over_Sample_Rate_

Configures SDHS Over Sample Rate

Registers modified: SDHS.CTL0.OBR

Enumerator
USS_Capture_Over_Sample_Rate_10 

Configures SDHS Over Sample Rate to 10.

USS_Capture_Over_Sample_Rate_20 

Configures SDHS Over Sample Rate to 20.

USS_Capture_Over_Sample_Rate_40 

Configures SDHS Over Sample Rate to 40.

USS_Capture_Over_Sample_Rate_80 

Configures SDHS Over Sample Rate to 80.

USS_Capture_Over_Sample_Rate_160 

Configures SDHS Over Sample Rate to 160.

§ _USS_Capture_Gain_Range_

Selects Programmable Gain Amplifier (PGA) range.

Enumerator
USS_Capture_Gain_Range_minus_6_5 

Configure PGA range to -6.5 dB.

USS_Capture_Gain_Range_minus_5_5 

Configure PGA range to -5.5 dB.

USS_Capture_Gain_Range_minus_4_6 

Configure PGA range to -4.6 dB.

USS_Capture_Gain_Range_minus_4_1 

Configure PGA range to -4.1 dB.

USS_Capture_Gain_Range_minus_3_3 

Configure PGA range to -3.3 dB.

USS_Capture_Gain_Range_minus_2_3 

Configure PGA range to -2.3 dB.

USS_Capture_Gain_Range_minus_1_4 

Configure PGA range to -1.4 dB.

USS_Capture_Gain_Range_minus_0_8 

Configure PGA range to -0.8 dB.

USS_Capture_Gain_Range_0_1 

Configure PGA range to 0.1 dB.

USS_Capture_Gain_Range_1_0 

Configure PGA range to 1.0 dB.

USS_Capture_Gain_Range_1_9 

Configure PGA range to 1.9 dB.

USS_Capture_Gain_Range_2_6 

Configure PGA range to 2.6 dB.

USS_Capture_Gain_Range_3_5 

Configure PGA range to 3.5 dB.

USS_Capture_Gain_Range_4_4 

Configure PGA range to 4.4 dB.

USS_Capture_Gain_Range_5_2 

Configure PGA range to 5.2 dB.

USS_Capture_Gain_Range_6_0 

Configure PGA range to 6.0 dB.

USS_Capture_Gain_Range_6_8 

Configure PGA range to 6.8 dB.

USS_Capture_Gain_Range_7_7 

Configure PGA range to 7.7 dB.

USS_Capture_Gain_Range_8_7 

Configure PGA range to 8.7 dB.

USS_Capture_Gain_Range_9_0 

Configure PGA range to 9.0 dB.

USS_Capture_Gain_Range_9_8 

Configure PGA range to 9.8 dB.

USS_Capture_Gain_Range_10_7 

Configure PGA range to 10.7 dB.

USS_Capture_Gain_Range_11_7 

Configure PGA range to 11.7 dB.

USS_Capture_Gain_Range_12_2 

Configure PGA range to 12.2 dB.

USS_Capture_Gain_Range_13_0 

Configure PGA range to 13.0 dB.

USS_Capture_Gain_Range_13_9 

Configure PGA range to 13.9 dB.

USS_Capture_Gain_Range_14_9 

Configure PGA range to 14.9 dB.

USS_Capture_Gain_Range_15_5 

Configure PGA range to 15.5 dB.

USS_Capture_Gain_Range_16_3 

Configure PGA range to 16.3 dB.

USS_Capture_Gain_Range_17_2 

Configure PGA range to 17.2 dB.

USS_Capture_Gain_Range_18_2 

Configure PGA range to 18.2 dB.

USS_Capture_Gain_Range_18_8 

Configure PGA range to 18.8 dB.

USS_Capture_Gain_Range_19_6 

Configure PGA range to 19.6 dB.

USS_Capture_Gain_Range_20_5 

Configure PGA range to 20.5 dB.

USS_Capture_Gain_Range_21_5 

Configure PGA range to 21.5 dB.

USS_Capture_Gain_Range_22_0 

Configure PGA range to 22.0 dB.

USS_Capture_Gain_Range_22_8 

Configure PGA range to 22.8 dB.

USS_Capture_Gain_Range_23_6 

Configure PGA range to 23.6 dB.

USS_Capture_Gain_Range_24_6 

Configure PGA range to 24.6 dB.

USS_Capture_Gain_Range_25_0 

Configure PGA range to 25.0 dB.

USS_Capture_Gain_Range_25_8 

Configure PGA range to 25.8 dB.

USS_Capture_Gain_Range_26_7 

Configure PGA range to 26.7 dB.

USS_Capture_Gain_Range_27_7 

Configure PGA range to 27.7 dB.

USS_Capture_Gain_Range_28_1 

Configure PGA range to 28.1 dB.

USS_Capture_Gain_Range_28_9 

Configure PGA range to 28.9 dB.

USS_Capture_Gain_Range_29_8 

Configure PGA range to 29.8 dB.

USS_Capture_Gain_Range_30_8 

Configure PGA range to 30.8 dB.

§ _USS_Capture_Calibration_

Selects Programmable Gain Amplifier (PGA) range.

Enumerator
USS_Capture_Calibration_disabled 
USS_Capture_Calibration_enabled 

§ _USS_Trigger_Configuration_Trigger_

Selects USS trigger option.

Enumerator
USS_Triger_Configuration_Software_Trigger 

USS module is triggered via software trigger (User must use USS_startUltrasonicCapture API to trigger an USS capture)

§ _USS_HSPLL_input_clock_freq_

Selects USS Crystal Frequency.

Enumerator
USS_HSPLL_input_clock_freq_4_MHz 

Select this option if USS Crystal is 4 MHz.

USS_HSPLL_input_clock_freq_8_MHz 

Select this option if USS Crystal is 8 MHz.

§ _USS_HSPLL_input_clock_type_

Selects USS HSPLL input clock Type.

Enumerator
USS_HSPLL_input_clock_type_crystal 

Select this option if HSPLL input clock is a high accuracy crystal.

USS_HSPLL_input_clock_type_ceramic_resonator 

Select this option if HSPLL input clock is a ceramic resonator.

§ _USS_HSPLL_output_clk_freq_

Selects USS HSPLL output clock frequency.

Enumerator
USS_HSPLL_output_clk_freq_80_MHz 

USS HSPLL output frequency of 80 MHz.

USS_HSPLL_output_clk_freq_79_MHz 

USS HSPLL output frequency of 79 MHz.

USS_HSPLL_output_clk_freq_78_MHz 

USS HSPLL output frequency of 78 MHz.

USS_HSPLL_output_clk_freq_77_MHz 

USS HSPLL output frequency of 77 MHz.

USS_HSPLL_output_clk_freq_76_MHz 

USS HSPLL output frequency of 76 MHz.

USS_HSPLL_output_clk_freq_75_MHz 

USS HSPLL output frequency of 75 MHz.

USS_HSPLL_output_clk_freq_74_MHz 

USS HSPLL output frequency of 74 MHz.

USS_HSPLL_output_clk_freq_73_MHz 

USS HSPLL output frequency of 73 MHz.

USS_HSPLL_output_clk_freq_72_MHz 

USS HSPLL output frequency of 72 MHz.

USS_HSPLL_output_clk_freq_71_MHz 

USS HSPLL output frequency of 71 MHz.

USS_HSPLL_output_clk_freq_70_MHz 

USS HSPLL output frequency of 70 MHz.

USS_HSPLL_output_clk_freq_69_MHz 

USS HSPLL output frequency of 69 MHz.

USS_HSPLL_output_clk_freq_68_MHz 

USS HSPLL output frequency of 68 MHz.

§ USS_SDHS_Interrupt

Selects appropiate USS SDHS interrupt (Used to register interrupt callback functions)

Enumerator
USS_SDHS_Interrupt_OVF 

Interrupt for SDHS Data Overflow.

USS_SDHS_Interrupt_ACQDONE 

Interrupt for SDHS Over Input Level.

USS_SDHS_Interrupt_SSTRG 

Interrupt for SDHS Start conversion Trigger.

USS_SDHS_Interrupt_DTRDY 

Interrupt for SDHS Data Ready.

USS_SDHS_Interrupt_WINHI 

Interrupt for SDHS Window High.

USS_SDHS_Interrupt_WINLO 

Interrupt for SDHS Window Low.

§ USS_SAPH_Interrupt

Selects appropiate USS SAPH interrupt (Used to register interrupt callback functions)

Enumerator
USS_SAPH_Interrupt_DATAERR 

Interrupt for data error pending.

USS_SAPH_Interrupt_TMFTO 

Interrupt for Time Mark F time out.

USS_SAPH_Interrupt_SEQDN 

Interrupt for sequence acquisition done.

USS_SAPH_Interrupt_PNGDN 

Interrupt for ping transmit done.

§ USS_UUPS_Interrupt

Used to configure USS UUPS interrupt callback.

Enumerator
USS_UUPS_Interrupt_PREQIG 

Interrupt for Power Request Ignored.

USS_UUPS_Interrupt_PTMOUT 

Interrupt for UUPS Power Up Time Out.

USS_UUPS_Interrupt_STPBYDB 

Interrupt for UUPS to indicate USS has been interrupted by debug.

§ USS_HSPLL_Interrupt

Used to configure USS HSPLL interrupt callback.

Enumerator
USS_HSPLL_Interrupt_PLLUNLOCK 

Interrupt for PLL Unlock.

§ _USS_highFlow_option_

Defines high flow computation options.

Enumerator
USS_highFlow_option_disabled 

High flow version of the algorithms are disabled. No cycle slip correction is performed.

USS_highFlow_option_version1 

High flow version of the algorithms is disabled. Cycle slip correction method 1 is performed.

USS_highFlow_option_version2 

High flow version of the algorithms is disabled. Cycle slip correction method 2 is performed.

§ _USS_low_power_mode_option_

Selects the desired power mode while USS capture is done.

Enumerator
USS_low_power_mode_option_low_power_mode_0 

MSP remains in LPM0 power mode until timer expires.

USS_low_power_mode_option_low_power_mode_1 

MSP remains in LPM1 power mode until timer expires.

USS_low_power_mode_option_low_power_mode_2 

MSP remains in LPM2 power mode until timer expires.

USS_low_power_mode_option_low_power_mode_3 

MSP remains in LPM3 power mode until timer expires.

§ _USS_dtof_volume_flow_calculation_interval_

Selects the interval to calculate Delta ToF and Volume Flow.

Enumerator
USS_dtof_volume_flow_calculation_interval_1 

DeltaToF and volume flow are calculated every time USS_runAlgorithms or USS_runAlgorithmsFixedPoint are invoked

USS_dtof_volume_flow_calculation_interval_2 

DeltaToF and volume flow are calculated based on accumulation of 2 and scaling of 1 bit upstream and downstream captures.

USS_dtof_volume_flow_calculation_interval_4 

DeltaToF and volume flow are calculated based on accumulation of 4 and scaling of 2 bits upstream and downstream captures.

USS_dtof_volume_flow_calculation_interval_8 

DeltaToF and volume flow are calculated based on accumulation of 8 and scaling of 3 bits upstream and downstream captures.

§ _USS_dcOffEst_Calc_Mode_

Selects the UPS/DNS DC offset estimation mode used by USS_estimateDCoffset API.

Enumerator
USS_dcOffEst_Calc_Mode_use_existing_UPS_DNS_capture 

In this mode USS_estimateDCoffset API will use the existing UPS/DNS capture and will not trigger a new UPS/DNS capture sequence to estimate UPS/DNS DC offset UPS/DNS DC offset. This mode is recommended when the DC offset estimation API is called immediately after a USS_startUltrasonicMeasurement or USS_startLowPowerUltrasonicCapture API

USS_dcOffEst_Calc_Mode_trigger_UPS_DNS_capture_controlled_by_ASQ 

In this mode USS_estimateDCoffset API will use will trigger a new UPS/DNS capture as part of DC offset cancellation using USS_startUltrasonicMeasurement API. This mode is recommended if USS_startUltrasonicMeasurement API is used in the application and USS_estimateDCoffset API is not called immediately after USS_startUltrasonicMeasurement API

USS_dcOffEst_Calc_Mode_trigger_UPS_DNS_capture_using_LPM_capture 

In this mode USS_estimateDCoffset API will use will trigger a new UPS/DNS capture as part of DC offset cancellation using USS_startLowPowerUltrasonicCapture API. This mode is recommended if USS_startLowPowerUltrasonicCapture API is used in the application and USS_estimateDCoffset API is not called immediately after USS_startLowPowerUltrasonicCapture API

§ _USS_Alg_AbsToF_Calculation_Option_

Enumerated type for absTOF algorithm selection.

Enumerator
USS_Alg_AbsToF_Calculation_Option_lobe 

Calculates absTOF using lobe method.

USS_Alg_AbsToF_Calculation_Option_hilbert 

Calculates absTOF using Hilbert method.

USS_Alg_AbsToF_Calculation_Option_lobeWide 

Calculate absTOF using lobe wide method.

USS_Alg_AbsToF_Calculation_Option_hilbertWide 

Calculate absTOF using hilbert wide method.

§ _USS_Alg_dToF_Calculation_Option_

Enumerated type for dToF algorithm selection.

Enumerator
USS_Alg_dToF_Calculation_Option_estimate 
USS_Alg_dToF_Calculation_Option_water 

§ _USS_Alg_volume_flow_Calculation_Option_

Enumerated type for volume flow rate algorithm selection.

Enumerator
USS_Alg_volume_flow_Calculation_Option_water 
USS_Alg_volume_flow_Calculation_Option_gas 
USS_Alg_volume_flow_Calculation_Option_generic 

Variable Documentation

§ USSSWLIB_USS_interrupt_status

volatile uint32_t USSSWLIB_USS_interrupt_status
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale