English
Language : 

PXS20RM Datasheet, PDF (203/1368 Pages) Freescale Semiconductor, Inc – PXS20 Microcontroller
Analog-to-Digital Converter (ADC)
Three types of Self Testing algorithms have been implemented inside ADC analog.
• Supply Self test: Algorithm S. It includes the conversion of the ADC internal bandgap voltage,
ADC supply voltage, and ADC reference voltage. It includes a sequence of 3 test conversions
(steps). The supply test conversions must be an atomic operation (no functional conversions
interleaved).
• Resistive-Capacitive Self test: Algorithm RC. It includes a sequence of 19 test conversions (steps)
by setting the ADC internal resistive digital-to-analog converter (DAC).
• Capacitive Self test: Algorithm C. It includes a sequence of 17 test conversions (steps) by setting
the capacitive elements comprising the sampling capacitor/ capacitive DAC.
The ADC implements an additional test channel dedicated for Self testing. It also provides signals to
schedule self testing algorithms using Configuration registers, monitors the converted data using analog
watchdog registers, flags the error to FCCU in case some failure occurs in any of the algorithms.
Test channel can be activated in CPU or CTU mode as described in Table 9-45.
Table 9-45. Test channel activation
ADC mode
Test channel (ADC)
Test channel (CTU)
CPU mode (MCR[CTUEN] = 0) Yes (one shot mode and scan No
mode)
CTU trigger mode
No
Yes
CTU control mode
No
Yes
9.4.11.2 CPU mode
In this case, test channel works similar to normal conversion. In CPU mode, test channel is enabled by
setting STCR2[EN].
The Self testing channel conversions are carried along with the functional conversions. The sequencing of
steps of the selected algorithm for test channel depends on the operating mode of normal conversions
interleaved, selected by the MCR[MODE] bit.
In One shot mode, if test channel is enabled, only one step of selected Self Testing algorithm is executed
at the end of the chain. The step number and algorithm to be executed is programmed in STCR3 register.
So, in one shot mode the sequence will be as follows:
• Program NCMR0 to select channels to be converted for normal conversion.
• Program MCR[MODE] = 0 to select one shot mode.
• Program sampling duration values in STCR1[INPSAMPn] field.
• Select the Self Testing algorithm in STCR3.ALG. Default is Algorithm S.
• Enable self testing channel by setting EN bit in the STCR2 register.
• Start the normal conversion by setting NSTART bit in the MCR.
• All normal conversions are executed as usual.
• At the end of all the normal conversions, Step Number programmed in STCR3.MSTEP field of
Self testing algorithm selected by STCR3.ALG is executed similar to a normal functional channel.
Freescale Semiconductor
PXS20 Microcontroller Reference Manual, Rev. 1
9-45