33.3.3.2 Conversion Triggers

A conversion is started by one of the following triggers, depending on the configuration of the START bit field in the Command (ADCn.COMMAND) register:

  • Writing the IMMEDIATE value to the START bit field in the Command register
  • Receiving an event input
  • Writing to one of the input multiplexer (ADCn.MUXPOS or ADCn.MUXNEG) registers

Continuously repeating Single conversions or Burst accumulations can be enabled by writing a ‘1’ to the FREERUN bit in the Control F (ADCn.CTRLF) register before starting the first conversion. This bit does not affect Series accumulations.

An ongoing conversion can be aborted by writing the STOP value to the START bit field in the Command register, and a new conversion can start immediately. Attempting to trigger a new conversion before the ongoing conversion has finished will set the Trigger Overrun Interrupt (TRIGOVR) flag in the Interrupt Flags (ADCn.INTFLAGS) register, and the attempted trigger will be ignored.

The Result Ready and Sample Ready (RESRDY and SAMPRDY) interrupt flags in the Interrupt Flags register show if a conversion or accumulation has finished. These flags also trigger the corresponding interrupts if enabled in the Interrupt Control (ADCn.INTCTRL) register.

Aborting a Conversion

These actions will abort an ongoing conversion:

  • Writing STOP to the START bit field in ADCn.COMMAND
  • Writing to the Reference Selection bit field (REFSEL) in the CTRLC register during a conversion
  • Selecting the DACREF, TEMPSENSE, or VDD in the Positive or Negative Input Multiplexer registers (ADCn.MUXPOS or ADCn.MUXNEG)

This will result in undefined values in the RESULT and SAMPLE registers. When triggering a new conversion: First, the settle time associated with the altered parameter will be waited out, then the conversion will start.