
UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
386 of 464
NXP Semiconductors
UM10850
Chapter 25: LPC5410x 12-bit ADC controller (ADC0)
25.7.2.1 Avoiding spurious hardware triggers
Care should be taken to avoid generating a spurious trigger when writing to the
SEQn_CTRL register to change the trigger selected for the sequence, switch the polarity
of the selected trigger, or to enable the sequence for operation.
In general, the TRIGGER and TRIGPOL bits in the SEQn_ENA bit is should only be
written when the sequence is disabled (while the SEQn_ENA bit = 0). The SEQn_ENA bit
itself should only be set when the selected trigger input is in its INACTIVE state (as
designated by the TRIGPOL bit). If this condition is not met, a trigger will be generated
immediately upon enabling the sequence - even though no actual transition has occurred
on the trigger input.
25.7.3 Software-triggered conversion
There are two ways that software can trigger a conversion sequence:
1.
Start Bit:
Setting the START bit in the corresponding SEQn_CTRL register. The
response to this is identical to occurrence of a hardware trigger on that sequence.
Specifically, one cycle of conversions through that conversion sequence will be
immediately triggered except as indicated above.
2.
Burst Mode
: Set the BURST bit in the SEQn_CTRL register. As long as this bit is 1
the designated conversion sequence will be continuously and repetitively cycled
through. Any new software or hardware trigger on this sequence will be ignored.
If a bursting A sequence is allowed to be interrupted (i.e. the LOWPRIO bit in its
SEQA_CTRL register is set to 1) and a software or hardware trigger for the B sequence
occurs, then the burst will be immediately interrupted and a B sequence will be initiated.
The interrupted A sequence will resume continuous cycling, starting with the aborted
conversion, after the alternate sequence has completed.
25.7.4 Interrupts
There are four interrupts that can be generated by the ADC:
•
Conversion-Complete or Sequence-Complete interrupt for sequence A
•
Conversion-Complete or Sequence-Complete interrupt for sequence B
•
Threshold-Compare Out-of-Range Interrupt
•
Data Overrun Interrupt
Any of these interrupt requests may be individually enabled or disabled in the INTEN
register. Note that the threshold and overrun interrupts share a slot in the NVIC.
25.7.4.1 Conversion-Complete or Sequence-Complete interrupts
For each of the two sequences, an interrupt/DMA trigger can either be asserted at the end
of each ADC conversion performed as part of that sequence or when the entire sequence
of conversions is completed. The MODE bits in the SEQn_CTRL registers select between
these alternative behaviors.
If the MODE bit for a sequence is 0 (conversion-complete mode), then the interrupt
flag/DMA request for that sequence will reflect the state of the DATAVALID bit in the global
data register (SEQn_GDAT) for that sequence. In this case, reading the SEQn_GDAT
register will automatically clear the interrupt/DMA trigger.