Cirrus Logic EP93xx User Manual
Page 602

17-6
DS785UM1
Copyright 2007 Cirrus Logic
IrDA
EP93xx User’s Guide
1
7
1
7
17
Set up DMA
Set up a DMA buffer (the buffer should be greater than 
twice the maximum possible size of received frames). 
Enable DMA.
Alternatively, two buffers may be used which are each the 
maximum possible frame size long. The DMA would then 
be programmed to switch between the two buffers.
Enable Ir Receive Set the Receive Enable bit (RXE) in IrEnable.
17.3.2.3.2 End of Frame Interrupt
The Receive Frame Complete (RFC) interrupt is generated when the last data in a frame is 
read from the receive FIFO. To check whether the frame was received correctly (no errors) 
and for information on frame size, the Receive Information Buffer register (IrRIB) must be 
read by the interrupt service routine. This also clears the RFC interrupt condition.
Note: By the time the ARM Core responds to this interrupt, the interface may have already
started reception of a new frame.
17.3.2.3.3 End of Frame: Using Programmed I/O
If interrupt driven programmed I/O is used instead of DMA, every time the Receive Buffer 
Service (RFS) interrupt is serviced the IrFlag register must be read before the IrData register, 
if the IrFlag values are needed. Their Flag register gives information about error conditions 
that correspond to the data value at the head of the receive FIFO. 
Note: The IrRIB registers stores status flags for a complete frame.
17.3.2.3.4 Error Conditions
Receive error conditions do not generate interrupts. Reading the IrData word clears the 
IrFlag register bits listed below.
Receiver Abort Detected When set, this indicates that the transmitter sent an
abort signal during frame transmission.
Receiver Overrun This indicates that data has not been read for the IrData
register in time and has resulted in data loss from the 
frame. When this occurs the interface automatically 
discards the remainder of the incoming frame.
CRC Error
If the CRC for the received data does not match the CRC 
value contained in the incoming data stream this condition 
will occur.
Frame Error (FIR only) This indicates that a framing error has been detected.
