![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 1354](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_17218271354.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
1354 of 1441
NXP Semiconductors
UM10503
Chapter 48: 12-bit ADC (ADCHS)
When POWER_DOWN is set the ADC is powered down after the conversion has finished.
The ADC is automatically woken up before the next conversion. Wake up time is set in
RECOVERY_TIME (see
); this is default 144 fADC cycles.
Remark:
If a descriptor MATCH_VALUE time is earlier than RECOVERY_TIME, then
automatic wake up cannot be guaranteed to be ready on time and should not be used; in
that case the previous descriptor should not set POWER_DOWN. If a descriptor
MATCH_VALUE time is earlier than RECOVERY_TIME, the conversion result CHAN_ID
will be set to 0x111 and the interrupt flag DSCR_ERROR will be raised.
Power gating is not removed automatically. Software should remove power gating prior to
starting conversion.
48.7.3 Descriptor driven conversion
The ADC has 6 input channels and a dedicated descriptor timer. Two descriptor tables
define which ADC input channel should be sampled at what time and in what sequence.
The descriptors also can raise an interrupt when done and halt and/or reset the descriptor
timer. The two tables allow double buffering usage; one table is active while the other
table can be preloaded and swapped with the active table to become the new active table.
The sampling time instance is defined by a 14-bit descriptor timer clocked by fADC. When
the descriptor timer value is equal to descriptor field MATCH_VALUE a sample is
converted and the next descriptor is processed. The timer will wrap around if not halted or
reset before it reaches the maximum count value 0x3FFF. The timer can be reset by
descriptor field RESET_TIMER or a reset of the complete ADC controller.
The active descriptor table can be started by:
1. A software trigger (CPU writes to a register TRIGGER, see
2. An external trigger.
External triggers are selected with the GIMA ADCHS_TRIGGER_IN register (see
) and can be one of:
•
SCT outputs CTOUT_0 and CTOUT_8
•
Timer 0 match output T0_MAT0 and timer 2 output T2_MAT0.
•
PWM Timer output MCOB2
•
GPIO inputs GPIO6[28] (at pin PD_14) and GPIO5[3] (at pin P2_3)
•
SGPIO outputs SGPIO10 and SGPIO12
Once the descriptor timer is started, the descriptor table is processed entry by entry. This
continues until descriptor field HALT is set. After a halt the descriptor timer and hence
descriptor processing should be restarted by a new trigger.
The descriptor processing order is controlled by field BRANCH to be:
•
Linear, with wrap around to the table start after the last table entry
•
Branch to the table start
•
Swap the active table and branch to the table start of the new table