28.10.2014 Views

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Freescale</strong> <strong>Semiconductor</strong>, Inc.<br />

Queued Analog-to-Digital Converter (QADC)<br />

nc...<br />

<strong>Freescale</strong> <strong>Semiconductor</strong>, I<br />

The end-of-queue 1 is identified when execution is complete on the<br />

CCW in the location prior to that pointed to by BQ2, when the current<br />

CCW contains an end-of-queue code instead of a valid channel<br />

number, or when the currently completed CCW is in the last location<br />

of the CCW RAM.<br />

When CF1 is set and interrupts are enabled for that queue completion<br />

flag, the QADC asserts an interrupt request. The software reads the<br />

completion flag during an interrupt service routine to identify the<br />

interrupt request. The interrupt request is cleared when the software<br />

writes a 0 to the completion flag bit, when the bit was previously read<br />

as a 1. Once set, only software or reset can clear CF1.<br />

CF1 is maintained by the QADC regardless of whether the<br />

corresponding interrupt is enabled. The software polls for CF1 bit to<br />

see if it is set. This allows the software to recognize that the QADC is<br />

finished with a queue 1 scan. The software acknowledges that it has<br />

detected the completion flag being set by writing a 0 to the completion<br />

flag after the bit was read as a 1.<br />

PF1 — Queue 1 Pause Flag<br />

PF1 indicates that a queue 1 scan has reached a pause. PF1 is set<br />

by the QADC when the current queue 1 CCW has the pause bit set,<br />

the selected input channel has been converted, and the result has<br />

been stored in the result table.<br />

Once PF1 is set, the queue enters the paused state and waits for a<br />

trigger event to allow queue execution to continue. However, if the<br />

CCW with the pause bit set is the last CCW in a queue, the queue<br />

execution is complete. The queue status becomes idle, not paused,<br />

and both the pause and completion flags are set. Another exception<br />

occurs in software controlled mode, where the PF1 can be set but<br />

queue 1 never enters the pause state since queue 1 continues without<br />

pausing.<br />

When PF1 is set and interrupts are enabled for the corresponding<br />

queue, the QADC asserts an interrupt request. The software may<br />

read PF1 during an interrupt service routine to identify the interrupt<br />

request. The interrupt request is cleared when the software writes a 0<br />

to PF1, when the bit was previously read as a 1. Once set, only<br />

software or reset can clear PF1.<br />

Technical Data <strong>MMC2107</strong> – Rev. 2.0<br />

428 Queued Analog-to-Digital Converter (QADC) MOTOROLA<br />

For More Information On This Product,<br />

Go to: www.freescale.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!