13 / 21 page

3-4200-D1-2.0-0403
13
STIr4200
USB/IrDA Bridge Controller
OFFICIAL
PRODUCT
DOCUMENTA TI ON
5.1.3.2.
FIR Receive Frame
The FIR encoding scheme is modified slightly from the standard scheme. The char-
acter 0x7E is used to delineate the BOF and EOF. The STIr4200 escapes three
characters in the data field on receive, 0x7F, 0x7E and 0x7D, which allows the 0x7E
characters used as BOF and EOF to be unique. The 0x7E character can then be
used to delineate the infrared frame boundaries. This hardware escaping in the
data portion is specific to the STIr4200, and the software must un-escape the data
portion of the received frame to restore the original data. Figure 7 summarizes the
FIR receive frame format encoding scheme.
0x7E
0x7E
BOF = Beginning of frame
Data
Data
Data
Data
Data
Data
A
CI
Address/Control/Information Fields
Special characters must be un-escaped
Escaped Data
Original Data
0x7D 0x5D
0x7D
0x7D 0x5E
0x7E
0x7D 0x5F
0x7F
…
…
MSB CRC
FCS : 32 bit CRC-IEEE802
0x7E
EOF - End of frame
Data
0x7E
…
LSB CRC
Data
Figure 7. FIR Receive Frame Format