3.2.6.3 DIAG_DAC_Linearity

Returns the status of the DAC_LINEARITY diagnostic

This function verifies linearity on the selected DAC instance and channel, by calculating a least-squares fit of DAC code output captured by DAC.

DIAG_TEST_STATUS 
DIAG_DAC_Linearity
(
    DIAG_ADC_PERIPHS adc_periph
);

Diagnostic verifies the following faults do not exist

  • Results nonlinear

Operating Mode

  • Interface can be used at POST
Precondition
  • none

Parameters

  • adc_periph - enum value for which ADC peripheral to be tested

Returns

  • DIAG_TEST_PASSED if no faults were found, otherwise, DIAG_TEST_FAILED.