Enhanced Queued Analog-to-Digital Converter (eQADC)
MPC5510 Microcontroller Family Reference Manual, Rev. 1
Freescale Semiconductor
31-57
Preliminary
When a new message arrives and RFIFO
n
is not full, the eQADC copies its contents into the entry pointed
by receive next data pointer. The RFIFO counter EQADC_FISR
n
[RFCTR
n
“eQADC FIFO and Interrupt Status Registers 0–5 (EQADC_FISRn)
”) is incremented by 1, and the receive
next data pointer
n
is also incremented by 1 (or wrapped around) to point to the next empty entry in
RFIFO
n
. However, if the RFIFO
n
is full, the eQADC sets the EQADC_FISR
n
[RFOF] (see
Section 31.3.3.8, “eQADC FIFO and Interrupt Status Registers 0–5 (EQADC_FISRn)
”). The RFIFO
n
will
not overwrite the older data in the RFIFO, the new data will be ignored, and the receive next data pointer
n
is not incremented or wrapped around. RFIFO
n
is full when the receive next data pointer
n
equals the
pop next data pointer
n
and RFCTR
n
is not 0. RFIFO
n
is empty when the receive next data pointer
n
equals
the pop next data pointer
n
and RFCTR
n
is 0.
When the eQADC RFIFO pop register
n
is read and the RFIFO
n
is not empty, the RFIFO counter RFCTR
n
is decremented by 1, and the pop next data pointer is incremented by 1 (or wrapped around) to point to the
next RFIFO entry.
When the eQADC RFIFO pop register
n
is read and RFIFO
n
is empty, eQADC will not decrement the
counter value and the pop next data pointer
n
will not be updated. The read value will be undefined.
Figure 31-33. RFIFO Diagram
The detailed behavior of the pop next data pointer and receive next data pointer is described in the example
shown in
where an RFIFO with 16 entries is shown for clarity of explanation, the actual
hardware implementation has only four entries. In this example, RFIFO
n
with 16 entries is shown in
sequence after popping or receiving entries.
Pop Next
Data Entry 1
Data Entry 2
Control Signals
RFIFO
Counter Control
Logic
Data Pointer *
Receive Next
Data Pointer *
Data from
External
Device or
from
On-Chip
Read
from Bus
Interface
by CPU
or DMA
DMA Done
Interrupt/DMA Request
All RFIFO entries are memory mapped and the entries addressed by these pointers
can have their absolute addresses calculated using POPNXTPTR and RFCTR.
*
RFIFO
Pop Register
ADCs