ModusToolbox Safety Test Library
Loading...
Searching...
No Matches

General Description

Functions

uint8_t SelfTests_ATOP_DCMP (ATOPSS_ADC_TYPE *adcBase, ATOPSS_DCMP_TYPE *dcmpBase)
 Performs ATOP DCMP self-test using ADC test-data injection.

Function Documentation

◆ SelfTests_ATOP_DCMP()

uint8_t SelfTests_ATOP_DCMP ( ATOPSS_ADC_TYPE * adcBase,
ATOPSS_DCMP_TYPE * dcmpBase )

Performs ATOP DCMP self-test using ADC test-data injection.

The function sets an initial DCMP threshold, adapts it for signed mode if needed, and then checks DCMP status for three injected ADC values.

Parameters
adcBasePointer to ADC base used for test-data injection and conversion trigger.
dcmpBasePointer to DCMP base used for threshold setup and status read.
Returns
OK_STATUS (0) - All comparator results match expected values.
ERROR_STATUS (1) - At least one comparator result mismatches.
MTB_STL_ERROR_TIMEOUT (10) if ADC conversion times out.