Fast AMBA Peripherals
12-46
GMS30C7201 Data Sheet
Transmit Operation
Before enabling the FIr for transmission, the user may either
“
prime
”
the transmit buffer
by filling it with data or allow service requests to cause the CPU or DMA to fill the buffer
once the FIr is enabled. Once enabled, the transmit logic issues a service request if its
buffer is empty. For each frame output, a minimum of sixteen preambles are
transmitted. If data is not available after the sixteenth preamble, additional preambles
are output until a byte of valid data resides within the bottom of the transmit buffer. The
preambles are then followed by the start flag and then the data from the transmit buffer.
Four symbols (8 bits) are encoded at a time and then loaded into a serial shift register.
The contents are shifted out onto the transmit pin clocked by the 8MHz baud clock.
Note that the preamble, start and stop flags, and CRC value is automatically
transmitted, and need not be placed in the transmit buffer.
When the transmit buffer is emptied, an interrupt and/or DMA service request is
signalled. If new data is not supplied quickly enough, and the transmit logic attempts to
take additional data from the empty buffer, one of two actions can be taken as
programmed by the user. An underrun can either signal the normal completion of a
frame or an unexpected termination of a frame in progress.
When normal frame completion is selected and an underrun occurs, the transmit logic
transmits the 32-bit CRC value calculated during the transmission of all data within the
frame (including the address and control bytes), followed by the stop flag to denote the
end of the frame. The transmitter then continuously transmits preambles until data is
once again available within the buffer. Once data is available, the transmitter begins
transmission of the next frame.
When unexpected frame termination is selected and an underrun occurs, the transmit
logic outputs an abort and interrupts the CPU. An abort continues to be transmitted until
data is once again available in the transmit buffer. The FIr then transmits 16 preambles,
a start flag, and starts the new frame. The remote receiver may choose to ignore the
abort and continue to receive data, or to signal the FIr to retry transmission of the
aborted frame.
At the end of each frame transmitted, the FIr outputs a pulse called the serial infrared
interaction pulse (SIP). A SIP is required at least every 500ms to keep slower speed
devices (115.2Kbps and slower) from colliding with the higher speed transmission. The
SIP simulates a start bit which causes all low speed devices to stay off the bus for at
least another 500ms. Transmission of the SIP pulse causes the transmit pin to be
forced high for a duration of 1.625us and low for 7.375us (total SIP period = 9.0us).
After the 9.0us elapses, the preamble is then transmitted continuously to indicate to the
remote receiver that the FIr
’
s transmitter is in the idle state. The preamble continues to
be transmitted until new data is available within the transmit buffer, or the FIr
’
s
transmitter is disabled. Note that it is the responsibility of the user to ensure that a frame
completes once every 500ms such that a SIP pulse is produced keeping all low speed
devices from interrupting transmission. Because most IrDA compatible devices
produce a SIP after each frame transmitted, the user may only need to ensure that a
frame is either transmitted or received by the FIr every 500ms. Note that frame length
does not represent a significant portion of the 500ms time frame in which a SIP must
be produced. At 4.0Mbps, the longest frame allowed is 16,568 bits, which takes just
over 4ms to transmit. Also note that the FIr issues a SIP when the transmitter is first
enabled, to ensure all low speed devices are silenced before transmitting it
’
s first frame.
If the user disables the FIr
’
s transmitter during operation, transmission of the current
data byte is stopped immediately, the serial shifter and transmit buffer are cleared and
all clocks used by the transmit logic are automatically shut off to conserve power.