Functions | |
uint8_t | IEC60730_ADC_TEST_testAdcInput (IEC60730_ADC_TEST_adcTest_Handle *adcTestHandle) |
uint8_t IEC60730_ADC_TEST_testAdcInput | ( | IEC60730_ADC_TEST_adcTest_Handle * | adcTestHandle) |
Tests functionality of ADC converter
adcTestHandle | contains parameter to test ADC channel. |
This function performs a plausibility check on the ADC10 or ADC12 module. The proper operation of the pin mux selection, and the A/D converter is checked with this function. Before calling this API the user must set values for pinCount, useInternalInput, and muxChannel in IEC60730_ADC_TEST_adcTest_Handle structure. The ADC conversion result is compared with "pinCount" value. The user can define the acceptable ADC count drift by adjusting the values of MINIMUM_ADC_COUNT_DRIFT and MAXIMUM_ADC_COUNT_DRIFT macros in "IEC60730_user_config.h" file.
Modified registers are ADCxxCTL0
References INT_REF_1_5_V, INT_REF_2_0_V, INT_REF_2_5_V, MAXIMUM_ADC_COUNT_DRIFT, MINIMUM_ADC_COUNT_DRIFT, IEC60730_ADC_TEST_adcTest_Handle::muxChannel, IEC60730_ADC_TEST_adcTest_Handle::pinCount, SIG_ADC_TEST, TEST_FAILURE, and IEC60730_ADC_TEST_adcTest_Handle::useInternalInput.