![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 1356](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_17218271356.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
1356 of 1441
NXP Semiconductors
UM10503
Chapter 48: 12-bit ADC (ADCHS)
). If the FIFO fill level is not equal to one of the
other DMA-supported burst sizes (applicable DMA burst sizes are 1, 4, 8 or 16), set the
burst size to 1. Reading an empty FIFO will result in a value 0x00008000 or 0x80008000.
48.7.4.2 DMA write
The descriptor tables can be loaded by DMA channel 7. Setting DMA_REQ_WR will
assert a DMA write request to the general purpose DMA. A complete table of 8 entries will
be copied from memory to the ADC. The DMA burst size should be set to equal or more
than the number of entries to be loaded. DMA-supported burst sizes are 1, 4, and 8. E.g.
for a table with 6 entries, burst size should be set to 8.
Non-contiguous channels can be transferred by the DMA using the scatter/gather linked
lists (
).
48.7.5 Interrupts
The ADC can generate three types of interrupts.
48.7.5.1 Descriptor related interrupts
A descriptor related interrupt is raised under the following conditions (see also
:
):
•
when a descriptor entry with the descriptor INTERRUPT field set has been
processed.
•
when a sample was converted before the ADC was fully woken up.
•
when the input value caused under- or overflow of the ADC.
48.7.5.2 Comparator interrupts
Two window comparators are available to detect whether samples are within a range and
cross from one range to another. Window comparator A or B can be assigned to an input
channel. A comparator should only be assigned to one input. See also
48.7.5.2.1
Range interrupt
Each channel may be compared to the THR_A register values (or to the THR_B register
values) if comparator A (or B) is linked to a channel by the descriptor table
THRESHOLD_SEL field.
The comparator compares input samples against two levels THR_LOW and THR_HIGH
to detect whether input samples are within a range. The range status is stored per
channel in status bits THCMP_RANGE (see
). A below or above range
interrupts can be raised when the input channel sample is:
•
sample < THR_LOW; TCHMP_RANGE set to 0b01, interrupt flag THCMP_BRANGE
is set.
•
THR_LOW < sample < THR_HIGH; TCHMP_RANGE set to 0b00, no comparator
interrupt is raised.
•
sample > THR_HIGH; TCHMP_RANGE set to 0b10, interrupt flag THCMP_ARANGE
is set.