MSP430UltrasonicLibrary  02_20_00_15
Functions
Configuration_api

Functions

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...
 

Detailed Description

Function Documentation

§ USS_updateSDHSConfiguration()

USS_message_code USS_updateSDHSConfiguration ( USS_SW_Library_configuration config)
inline

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.

  • Checks:
    • Sample size is within specified range (1-1024)
    • Window thresholds are properly set
      • Hi threshold is higher than lower threshold
    • Threshold values are correct based on output bit resolution (e.g. if 12-bit resolution is selected windowThreshold needs to be a 12-bit number)
    • LEA start address falls within 4KB of LEA RAM memory
    • Checks if there is no active conversion, if there is an active conversion the update is cancelled and API returns USS_message_code_SDHS_update_error_ongoing_conversion
Parameters
[in]configis a pointer to the USS SW Library user configuration.
Returns
USS_message_code

References _USS_SW_Library_configuration_::captureConfig, commonSDHSConfigModOpt(), commonSDHSRestoreSDHSDTCA(), commonValidateSDHSconfigruation(), _USS_System_Configuration_::diagMode, _USS_Capture_Configuration_::enableWindowHiComp, _USS_Capture_Configuration_::enableWindowLoComp, _USS_Capture_Configuration_::gainRange, _USS_Capture_Configuration_::overSampleRate, _USS_Capture_Configuration_::sampleSize, _USS_SW_Library_configuration_::systemConfig, USS_diagnostics_mode_2, USS_message_code_no_error, USS_message_code_SDHS_update_error_ongoing_conversion, _USS_Capture_Configuration_::windowHighThreshold, and _USS_Capture_Configuration_::windowLowThreshold.

Referenced by USS_calibrateSignalGain(), and USS_testSDHSconversion().

§ USS_updateHSPLLConfiguration()

USS_message_code USS_updateHSPLLConfiguration ( USS_SW_Library_configuration config)
inline

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:

  • pllXtalFreq_inHz is between (4MHz and 8MHz)
  • pllOutputFreq_inHz is between (68MHz and 80MHz)
  • Checks if there is no active conversion, if there is an active conversion the update is cancelled and API returns USS_message_code_HSPLL_update_error_ongoing_conversion
Parameters
[in]configis a pointer to the USS SW Library user configuration.
Returns
USS_message_code

References commonSDHSConfigModOpt(), commonValidateHSPLLconfiguration(), _USS_System_Configuration_::diagMode, _USS_HSPLL_Configuration_::HSPLLInputCLKType, _USS_HSPLL_Configuration_::outputPLLXtal, _USS_SW_Library_configuration_::pllConfiguration, _USS_HSPLL_Configuration_::pllOutputFreq, _USS_SW_Library_configuration_::systemConfig, USS_diagnostics_mode_2, USS_HSPLL_input_clock_freq_4_MHz, USS_HSPLL_input_clock_freq_8_MHz, USS_HSPLL_output_clk_freq_68_MHz, USS_HSPLL_output_clk_freq_69_MHz, USS_HSPLL_output_clk_freq_70_MHz, USS_HSPLL_output_clk_freq_71_MHz, USS_HSPLL_output_clk_freq_72_MHz, USS_HSPLL_output_clk_freq_73_MHz, USS_HSPLL_output_clk_freq_74_MHz, USS_HSPLL_output_clk_freq_75_MHz, USS_HSPLL_output_clk_freq_76_MHz, USS_HSPLL_output_clk_freq_77_MHz, USS_HSPLL_output_clk_freq_78_MHz, USS_HSPLL_output_clk_freq_79_MHz, USS_HSPLL_output_clk_freq_80_MHz, USS_message_code_HSPLL_pllOutputFreq_inHz_error, USS_message_code_HSPLL_pllXtalFreq_inHz_error, USS_message_code_HSPLL_update_error_ongoing_conversion, USS_message_code_no_error, and _USS_HSPLL_Configuration_::ussXtalFreq.

Referenced by commonConfigurePPGForManualMode(), USS_startPPGToneGeneration(), and USS_testSDHSconversion().

§ USS_updateSAPHConfiguration()

USS_message_code USS_updateSAPHConfiguration ( USS_SW_Library_configuration config)
inline

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:

  • pulseLowPhasePeriod is between (2-255)
  • pulseHighPhasePeriod is between (2-255)
  • numOfExcitationPulses is between (0-63)
  • numOfStopPulses is between (0-15)
  • Checks if there is no active conversion, if there is an active conversion the update is cancelled and API returns USS_message_code_SAPH_update_error_ongoing_conversion
  • Checks user doesn't ARM SDHS during SDHS settling time
Parameters
[in]configis a pointer to the USS SW Library user configuration.
Returns
USS_message_code

References _USS_Measurement_Configuration_::biasImpedance, BIMP_0, BIMP_1, BIMP_2, BIMP_3, _USS_Measurement_Configuration_::captureTimeOutCount, _USS_Measurement_Configuration_::ch0DriveStrength, _USS_Measurement_Configuration_::ch1DriveStrength, commonConfigurePPGDutyCyle(), commonDetermineSiliconVersion(), commonDetermineVariant(), commonUpdateUSSULPbiasDelay(), commonValidateSAPHconfigruation(), CPEO, _USS_System_Configuration_::diagMode, _USS_Measurement_Configuration_::eofSequenceState, GENERIC_SAPH_APHIZ, GENERIC_SAPH_APLEV, GENERIC_SAPH_APOL, GENERIC_SAPH_ASCTL0, GENERIC_SAPH_ASCTL1, GENERIC_SAPH_ATM_A, GENERIC_SAPH_ATM_B, GENERIC_SAPH_ATM_C, GENERIC_SAPH_ATM_D, GENERIC_SAPH_ATM_E, GENERIC_SAPH_ATM_F, GENERIC_SAPH_BCTL, GENERIC_SAPH_ICTL0, GENERIC_SAPH_KEY, GENERIC_SAPH_MCNF, GENERIC_SAPH_OCTL1, GENERIC_SAPH_OSEL, GENERIC_SAPH_PGCTL, GENERIC_SAPH_TACTL, _USS_SW_Library_configuration_::measurementConfig, _USS_Measurement_Configuration_::muxChargePumpMode, _USS_Pulse_Configuration_::pauseState, _USS_Measurement_Configuration_::pulseConfig, _USS_Pulse_Configuration_::pulseGenMode, _USS_Pulse_Configuration_::pulsePolarity, _USS_Measurement_Configuration_::restartCaptureCount, _USS_Measurement_Configuration_::sequenceSelection, _USS_Measurement_Configuration_::startADCsamplingCount, _USS_Measurement_Configuration_::startPGAandINBiasCount, _USS_Measurement_Configuration_::startPPGCount, _USS_SW_Library_configuration_::systemConfig, _USS_Measurement_Configuration_::turnOnADCCount, USS_diagnostics_mode_2, USS_measurement_bias_impedance_1200_Ohms, USS_measurement_bias_impedance_200_Ohms, USS_measurement_bias_impedance_2800_Ohms, USS_measurement_bias_impedance_600_Ohms, USS_measurement_capture_sequence_ch0, USS_measurement_capture_sequence_ch0_ch0, USS_measurement_capture_sequence_ch0_ch0_ch0, USS_measurement_capture_sequence_ch0_ch0_ch0_ch0, USS_measurement_capture_sequence_ch0_ch1, USS_measurement_capture_sequence_ch0_ch1_ch0, USS_measurement_capture_sequence_ch0_ch1_ch0_ch1, USS_measurement_capture_sequence_ch1, USS_measurement_capture_sequence_ch1_ch0, USS_measurement_capture_sequence_ch1_ch0_ch1, USS_measurement_capture_sequence_ch1_ch0_ch1_ch0, USS_measurement_capture_sequence_ch1_ch1, USS_measurement_capture_sequence_ch1_ch1_ch1, USS_measurement_capture_sequence_ch1_ch1_ch1_ch1, USS_measurement_mux_charge_pump_always_off, USS_measurement_mux_charge_pump_always_on, USS_measurement_pause_state_high_impedance, USS_measurement_pause_state_low, USS_measurement_pulse_generation_mode_dual_tone, USS_measurement_pulse_generation_mode_multi_tone, USS_measurement_pulse_generation_mode_single_tone, USS_message_code_no_error, USS_message_code_SAPH_update_error_ongoing_conversion, USS_silicon_version_A, USS_silicon_version_not_supported, USS_silicon_version_variant_FR6043, and USS_silicon_version_variant_FR6047.

Referenced by commonConfigurePPGForManualMode(), USS_calibrateSignalGain(), USS_stopPPGToneGeneration(), and USS_testPPGconfiguration().

§ USS_updateUUPSConfiguration()

USS_message_code USS_updateUUPSConfiguration ( USS_SW_Library_configuration config)
inline

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:

  • Checks if there is no active conversion, if there is an active conversion the update is cancelled and API returns USS_message_code_SAPH_update_error_ongoing_conversion
Parameters
[in]configis a pointer to the USS SW Library user configuration.
Returns
USS_message_code

References _USS_Trigger_Configuration_::triggerConfig, _USS_SW_Library_configuration_::triggerConfig, USS_message_code_no_error, and USS_message_code_UUPS_update_error_ongoing_conversion.

Referenced by USS_stopPPGToneGeneration(), and USS_testPPGconfiguration().

§ USS_updateUSSInterruptsConfiguration()

USS_message_code USS_updateUSSInterruptsConfiguration ( USS_SW_Library_configuration config)
inline

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:

  • Checks if there is no active conversion, if there is an active conversion the update is cancelled and API returns USS_message_code_SAPH_update_error_ongoing_conversion
Parameters
[in]configis a pointer to the USS SW Library user configuration.
Returns
USS_message_code

References _USS_Interrupt_Configuration_::enableSAPHPingTransmitDoneInterrupt, _USS_Interrupt_Configuration_::enableUUPSPREQIGInterrupt, GENERIC_SAPH_ICR, GENERIC_SAPH_IMSC, _USS_SW_Library_configuration_::interruptConfig, USS_message_code_interrupt_update_error_ongoing_conversion, USS_message_code_no_error, and USSSWLIB_USS_interrupt_status.

§ USS_resetUSSModule()

USS_message_code USS_resetUSSModule ( USS_SW_Library_configuration config,
bool  reconfigUSSModule 
)
inline

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.

Parameters
[in]configis a pointer to the USS SW Library user configuration.
[in]reconfigUSSModulespecifies if module needs to be reconfigured after resetting the module.
Returns
USS_meesage_code_silicon_version_does_not_support_this_functionality
USS_message_code_no_error

References commonDetermineSiliconVersion(), commonDetermineVariant(), USS_configureUltrasonicMeasurement(), USS_meesage_code_silicon_version_does_not_support_this_functionality, USS_message_code_no_error, USS_silicon_version_A, USS_silicon_version_variant_FR6047, and USSSWRST.

§ USS_swapCaptureChannels()

USS_message_code USS_swapCaptureChannels ( USS_SW_Library_configuration config)
inline
© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale