MSP430UltrasonicLibrary  02_30_00_03
Functions
Calibration_api

Functions

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

Detailed Description

Function Documentation

§ USS_verifyHSPLLFrequency()

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.

  • HSPLL is locked before starting test
Parameters
[in]configis a pointer to the USS SW Library user configuration
[in]testResultsis a pointer to the HSPLL test result structure.
Returns
USS_message_code

References _USS_calibration_hspll_results_::actualTestCount, commonPowerUpUSS(), commonPrepareForUSSPowerUp(), commonSDHSRestoreSDHSDTCA(), commonTimerConfigurePeriodMeasurement(), commonTimerPeriodMeasurementDisableInterrupts(), commonTimerPeriodMeasurementStart(), commonTimerPeriodMeasurementWaitEvent1(), commonTimerPeriodMeasurementWaitEvent2(), _USS_calibration_hspll_results_::difference, _USS_calibration_hspll_results_::expectedResult, GENERIC_SAPH_ASCTL0, GENERIC_SAPH_ATIMHI, GENERIC_SAPH_ATIMLO, GENERIC_SAPH_KEY, GENERIC_SAPH_TBCTL, _USS_HSPLL_Configuration_::hspllTolerance, _USS_System_Configuration_::mCLKFrequency, PLL_68_MHZ_TEMP_CONST, PLL_69_MHZ_TEMP_CONST, PLL_70_MHZ_TEMP_CONST, PLL_71_MHZ_TEMP_CONST, PLL_72_MHZ_TEMP_CONST, PLL_73_MHZ_TEMP_CONST, PLL_74_MHZ_TEMP_CONST, PLL_75_MHZ_TEMP_CONST, PLL_76_MHZ_TEMP_CONST, PLL_77_MHZ_TEMP_CONST, PLL_78_MHZ_TEMP_CONST, PLL_79_MHZ_TEMP_CONST, PLL_80_MHZ_TEMP_CONST, _USS_SW_Library_configuration_::pllConfiguration, _USS_HSPLL_Configuration_::pllOutputFreq, RESONATOR_CALIB_ITERATION_COUNT, RESONATOR_CALIB_MONITORING_ACLK, RESONATOR_CALIB_MONITORING_ACLK_MIN_COUNT, _USS_SW_Library_configuration_::systemConfig, 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_low_power_mode_option_low_power_mode_0, USS_message_code_HSPLL_pll_unlock_error, USS_message_code_HSPLL_verification_expected_count_error, USS_message_code_no_error, USS_message_code_UUPS_power_down_error, and USS_message_code_UUPS_power_up_error.

§ USS_calibrateSignalGain()

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.

Parameters
[in]configis a pointer to the USS SW Library user configuration
Returns
USS_message_code

References ADC_MINIMUM_GAIN_SETTING, AGC_INDEX_OFFSET, AGC_LOOP_MAX_ITERATIONS, AGC_LOOP_SETTLING, _USS_Capture_Configuration_::agcConstant, _USS_SW_Library_configuration_::captureConfig, _USS_Capture_Configuration_::gainRange, gUSSGainLookUp, _USS_Capture_Configuration_::sampleSize, USS_findAGCIndex(), USS_getDNSPtr(), USS_getUPSPtr(), USS_message_code_Signal_Gain_Calibration_settling, USS_message_code_Signal_Gain_Calibration_successful, USS_message_code_Signal_Gain_Calibration_timeout, USS_startLowPowerUltrasonicCapture(), USS_updateSAPHConfiguration(), and USS_updateSDHSConfiguration().

§ USS_estimateDCoffset()

USS_message_code USS_estimateDCoffset ( USS_SW_Library_configuration config,
USS_dcOffEst_Calc_Mode  mode 
)

§ USS_calculateOffsets()

USS_message_code USS_calculateOffsets ( USS_SW_Library_configuration config,
USS_dTof_absTof_offset_results testResults,
USS_dTof_absTof_offset_test_config testConfig 
)
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale