
Enhanced Queued Analog-to-Digital Converter (EQADC)
MPC5644A Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
1119
The Receive Next Data Pointer points to the next available RFIFO location for storing the next incoming
message from the on-chip ADCs or from the external device. The
RFIFO Counter Logic
counts the
number of entries in RFIFO and generates interrupt or DMA requests to drain the RFIFO.
POPNXTPTR in
Section 25.5.2.9, EQADC FIFO and Interrupt Status Registers (EQADC_FISR)
,
indicates which entry is currently being addressed by the Pop Next Data Pointer, and RFCTR, in the same
register, provides the number of entries stored in the RFIFO. Using POPNXTPTR and RFCTR, the
absolute addresses for Pop Next Data Pointer and Receive Next Data Pointer can be calculated using the
following formulas:
Pop Next Data Pointer Address= RFIFOx_BASE_A POPNXTPTRx*4
Receive Next Data Pointer Address = RFIFOx_BASE_A
[(POPRFCTRx) mod RFIFO_DEPTH] * 4
where
•
a
mod b
returns the remainder of the division of
a
by
b
.
•
RFIFOx_BASE_ADDRESS is the smallest memory mapped address allocated to an RFIFOx
entry.
•
RFIFO_DEPTH is the number of entries contained in a RFIFO - four in this implementation.
When a new message arrives and RFIFOx is not full, the EQADC copies its contents into the entry pointed
by the Receive Next Data Pointer. The RFIFO counter RFCTRx in
Section 25.5.2.9, EQADC FIFO and
Interrupt Status Registers (EQADC_FISR)
, is incremented by one, and the Receive Next Data Pointer x is
also incremented by one (or wrapped around) to point to the next empty entry in RFIFOx. However, if the
RFIFOx is full, the EQADC sets the RFOF in
Section 25.5.2.9, EQADC FIFO and Interrupt Status
. The RFIFOx will not overwrite the older data in the RFIFO, the new data will
be ignored, and the Receive Next Data Pointer x is not incremented or wrapped around. RFIFOx is full
when the Receive Next Data Pointer x equals the Pop Next Data Pointer x and RFCTRx is not zero.
RFIFOx is empty when the Receive Next Data Pointer x equals the Pop Next Data Pointer x and RFCTRx
is zero.
When the EQADC RFIFO Pop Register x is read and the RFIFOx is not empty, the RFIFO counter
RFCTRx is decremented by one, and the POP Next Data Pointer is incremented by one (or wrapped
around) to point to the next RFIFO entry.
When the EQADC RFIFO Pop Register x is read and RFIFOx is empty, EQADC will not decrement the
counter value and the POP Next Data Pointer x will not be updated. The read value will be undefined.
Summary of Contents for MPC5644A
Page 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Page 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Page 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Page 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Page 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Page 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Page 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...