Logo
MSP430IEC60730SWPackage
Adc_test_api

Functions

uint8_t IEC60730_ADC_TEST_testAdcInput (IEC60730_ADC_TEST_adcTest_Handle *adcTestHandle)
 

Detailed Description

Function Documentation

uint8_t IEC60730_ADC_TEST_testAdcInput ( IEC60730_ADC_TEST_adcTest_Handle adcTestHandle)

Tests functionality of ADC converter

Parameters
adcTestHandlecontains 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

Returns
SIG_ADC_TEST.- if the counts provided by the user match the converted counts. TEST_FAILED. - if ADC test fail and JUMP_TO_FAILSAFE is disabled in "IEC60730_user_config.h".