ModusToolbox Safety Test Library
Loading...
Searching...
No Matches
ATOP ADC Filter (ATOP ADC digital filter STL module)

General Description

The ATOP ADC Filter self-test validates the digital filter chain that post-processes the ADC converted-data stream: the Median filter, the Linear Interpolation filter (LINTP), the Low-Pass filter (LP), the 3rd-order Comb filter (CIC3), the configurable Average filter (AVG) and the MIN/MAX detection logic.

For each filter type a known input sample sequence is applied, the selected filter is run in isolation (the other filter stages are bypassed) and the read-back output is verified to lie within a tolerance of the value expected for that filter's transfer function. Inputs are chosen so the expected output is trivially known (for example, a constant DC level for the LP / AVG / CIC3 filters, whose steady-state response to a constant is a known scaling of that constant), which is sufficient for the Class B gross-fault-detection goal.

The Median, LP, AVG, CIC3 and MIN/MAX stages are tested functionally this way. The Linear Interpolation (LINTP) stage needs an independent hardware conversion-start trigger that firmware injection cannot provide, so it is covered instead by a configuration-register integrity check.

The device exposes six filter instances distributed across the four ADC groups:

  • ADC group 0: ADC_FILT_00, ADC_FILT_01
  • ADC group 1: ADC_FILT_10
  • ADC group 2: ADC_FILT_20
  • ADC group 3: ADC_FILT_30, ADC_FILT_31

More Information

The test procedure for one filter instance and one filter type:

 1) Save the ADC / filter configuration registers that are modified by
    the test.
 2) Configure the filter with only the filter type under test enabled and
    all other stages bypassed, selecting the source ADC channel.
 3) Apply the known input sample sequence to the filter input.
 4) Read the filter output register and compare it against the
    pre-computed expected value within a fixed tolerance.
 5) If the ERROR_IN_ATOP_ADC_FILTER error-injection flag is set, corrupt
    the measured value by more than the tolerance so that a fault-free run
    is forced outside the acceptance window and reported as failed.
 6) Restore the original configuration and return the result.

API Reference

 Macros
 
 Functions