TN236

Rabbit 3000™ IrDA Bug

A hardware bug was recently discovered with the asynchronous IrDA hardware. The bug results in the possibility of generating an extra pulse before the start bit is transmitted. This pulse may appear either before a multi-character transmission or before a single-character transmission. The problem can be fixed in software, and will be corrected in future generations of the processor.

Description of Problem

The asynchronous serial ports capable of supporting IrDA contain a pulse generator that runs continuously in the IrDA mode and is re-synchronized to the transmit data at each start bit. Because of a logic error, if the beginning of the start bit coincides with when the IrDA pulse generator output is high, there will be a spurious 1/16th-bit cell pulse on the transmit output. This occurs because the asynchronous start bit can be generated at any time after an idle line. Note that back-to-back characters will never have this problem, and that the problem only pertains to the start bit.

The odds of this occurring is 3 out of 16 in the /16 mode and 1 out of 8 in the /8 mode because these are the IrDA pulse widths.

HDLC will never have this problem except perhaps for the first bit after the transmitter is started. This is because HDLC is synchronous and the pulse generator will always stay in sync.

Software Fix

Because the problem can only occur during the transmission of the first character after an idle line, the key to the software fix is to transmit and discard a dummy character prior to transmitting a good character. This can be done in the following way.

  1. Turn off the serial port output by resetting the appropriate bit in the parallel port function register. This assumes that the port output bit has been previously set to zero, the IrDA idle line condition.
  2. Set the baud rate generator's time constant to zero (max serial rate).
  3. Write a dummy character of 0xFF to the transmitter. This value is important because only the start bit will have a valid IrDA pulse associated with it. Then write the desired character to the transmitter.
  4. Reset the baud rate generator's time constant to the desired value.
  5. Turn on the serial output. With the serial rate at maximum, the dummy start bit should already be finished, making it okay to restore the port output to output the serial data. Transmission of the dummy character will be finished, followed by the transmission of the desired character.


022-0085 Rev. A
Z-World, Inc.
www.zworld.com
Phone: 1.530.757.3737
FAX: 1.530.757.3792
Rabbit Semiconductor
www.rabbitsemiconductor.com
Phone: 1.530.757.8400
FAX: 1.530.757.8402