PPCA ATOP AFE (Analog Front End) programmable-gain verification self-test.
The AFE is a differential programmable-gain amplifier placed in front of the 12-bit SAR ADC. Each of the four ADC groups has one AFE, on the first differential channel (channel 0) of that group:
The self-test verifies that the amplifier applies the expected gain to a differential input. It converts the same differential input three times:
The AFE differential input is a dedicated analog pin pair (AINxP / AINxN) that has no on-chip stimulus source, so this is an EXTERNAL-reference test: before calling it, the application must apply a small, stable differential voltage across the selected group's AFE pins, within the AFE input window:
The test procedure for one ADC group:
1) Save the ADC and AFE configuration registers that the test modifies.
2) Convert differential channel 0 with the AFE off, obtaining the raw
(un-amplified) code, and confirm it lies inside the caller's
expected raw window (stimulus present and in range).
3) Convert the same channel with the AFE at 8.25x and then at 16.5x.
4) Confirm neither amplified code is saturated, and that each matches
the raw code scaled by its gain (8.25x, 16.5x) and that the 16.5x
code is about twice the 8.25x code, all within the tolerance.
5) If the ERROR_IN_ATOP_AFE error-injection flag is set, corrupt one
amplified code beyond the tolerance so that a fault-free run is
forced outside the acceptance window and reported as failed.
6) Restore the original ADC / AFE configuration and return the result.
Cy_PPCA_CNFG_Init() and Cy_PPCA_Enable(), and for bringing up AREF, before calling this function. The ADC and AFE are enabled and restored by the test itself. API Reference | |
| Macros | |
| Data Structures | |
| Functions | |