3 receiving data, 3 receiving data -5 – Cirrus Logic EP93xx User Manual

Page 601

Advertising
background image

DS785UM1

17-5

Copyright 2007 Cirrus Logic

IrDA

EP93xx User’s Guide

1

7

1

7

17

17.3.2.2.3 Sending Packets Which are Not a Multiple of 4 Bytes In Length

The transmit FIFO is 32 bits wide. When using polling or interrupts to effect the transfer,
loading the FIFO with less than 32 bits would cause extraneous zero bits to be transmitted.
This issue is taken care of automatically by the DMA, so no special action is required.
However in the case of polling or interrupt-driven transfers, the IrDataTail register is the
mechanism used to preload the last 1, 2 or 3 bytes of a frame. When the transfer is complete
and the FIFO is empty, any bytes stored in the IrDataTail register are transmitted before the Ir
encoder sends the CRC and end-of-frame flags. There are three distinct addresses to which
the end of frame data is written. This allows a single word write to specify the data to be
transmitted and the number of trailing bytes to send If there is a single trailing byte to
transmit, write to address offset 0x014, for two bytes write to 0x018, and if there are three
trailing bytes write to 0x01C. (See

Table 17-2

.)

17.3.2.2.4 End of Frame Interrupt

Once all the data sent to the FIFO has been taken by the Ir interface, the FIFO will underrun.
When this occurs any data that has been preloaded into the IrDataTail register will be used
and the Transmitted Frame Complete (TFC) interrupt will be generated.

17.3.2.2.5 Disable Transmit Circuitry

To save power, the Transmit Enable (TXE) bit can be cleared in the IrEnable register if there
are no frames that need to be sent.

17.3.2.2.6 Error conditions

Transmitted frame abort is only signalled if IrCon register bit TUS is set to 1.

17.3.2.3 Receiving Data

The end of a reception frame will cause an interrupt, which may be masked using the mask
register (MIMR/FIMR). The end of frame interrupt occurs after the last data value has been
transferred, including any odd bytes in the frame tail.

17.3.2.3.1 Initialization

The following settings are required:

Address Matching To use Address Match filtering, set the local 8 bit address

in the Address Match Value Register and set the Address
Match Enable bit in the IrCon register.

Table 17-2. Address Offsets for End-of-Frame Data

Bytes to transmit

Address offset to use

1

0x014

2

0x018

3

0x01C

Advertising