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 />

CF2 — Queue 2 Completion Flag<br />

CF2 indicates that a queue 2 scan has been completed. CF2 is set by<br />

the QADC when the input channel sample requested by the last CCW<br />

in queue 2 is converted, and the result is stored in the result table.<br />

The end-of-queue 2 is identified when the current CCW contains an<br />

end-of-queue code instead of a valid channel number or when the<br />

currently completed CCW is in the last location of the CCW RAM.<br />

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

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

during an interrupt service routine to identify the interrupt request. The<br />

interrupt request is cleared when the software writes a 0 to the CF2<br />

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

or reset can clear CF2.<br />

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

corresponding interrupts are enabled. The software polls for CF2 to<br />

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

finished with a queue 2 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 />

PF2 — Queue 2 Pause Flag<br />

PF2 indicates that a queue 2 scan has reached a pause. PF2 is set<br />

by the QADC when the current queue 2 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 PF2 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 PF2 can be set but<br />

queue 2 never enters the pause state.<br />

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

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

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

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

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

software or reset can clear PF2.<br />

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

430 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!