SCC Asynchronous HDLC Mode and IrDA
MPC885 PowerQUICC Family Reference Manual, Rev. 2
25-2
Freescale Semiconductor
If TxBD[CM] is set, the asynchronous HDLC transmitter updates frame status bits in the BD after
transmission but does not clear TxBD[R]. The transmitter then proceeds to the next TxBD and if necessary
waits until it is ready. As the transmitter sends data, it performs the transparency encoding specified by the
protocol. See
Section 25.4, “Transmitter Transparency Encoding.”
To rearrange buffers, such as for error handling or to expedite data ahead of previously linked buffers, issue
a
STOP
TRANSMIT
command before modifying the TxBD table or directly changing the current TxBD
pointer TBPTR. When the asynchronous HDLC controller receives a
STOP
TRANSMIT
command, it stops
the transmission and sends the asynchronous HDLC abort sequence. It then sends idle characters until the
RESTART
TRANSMIT
command is given, at which point it resumes transmission with the next TxBD.
25.3
Asynchronous HDLC Frame Reception Processing
The asynchronous HDLC receiver is designed to work with minimal core intervention. It can decode
transparency characters, check the CRC of the frame, and detect errors on the line and in the controller.
When the core enables the receiver and the receiver detects a data byte of the incoming frame preceded by
one or more opening flags, the asynchronous HDLC controller fetches the next BD. If RxBD[E] is set, the
controller starts transferring the incoming frame into the buffer. When the buffer is full, the controller
clears RxBD[E]. If the incoming frame is larger than the buffer, the controller fetches the next BD, and if
E is set, continues transferring the rest of the frame into its buffer.
The receiver decodes the transparency character required by asynchronous HDLC protocol as described
in
Section 25.5, “Receiver Transparency Decoding.”
When the frame ends, the controller checks the
incoming CRC field and writes it to the buffer. The controller then updates RxBD[Data Length] with the
total frame length, including the CRC bytes. The controller sets RxBD[L], writes the frame status bits, and
clears RxBD[E] (if RxBD[CM] is zero). It then sets SCCE[RXF], which indicates that a frame was
received and is in memory. The controller then waits for the start of the next frame, which may or may not
have an opening flag.
25.4
Transmitter Transparency Encoding
The asynchronous HDLC transmitter encodes characters according to RFC 1549, a de facto standard of
the Internet Engineering Task Force (IETF). It examines outgoing bytes and performs the transparency
algorithm for the following conditions:
•
The byte is a flag (0x7E for PPP, 0xC0 or 0xC1 for IrLAP)
•
The byte is a control-escape character (0x7D)
•
The byte value is between 0x00 and 0x1F and the corresponding bit in the Tx control character
table is set
When a condition applies, a two-byte sequence is sent instead of the byte. The sequence consists of the
control-escape character (0x7D) followed by the original byte exclusive-ORed with 0x20.
Figure 25-1. Asynchronous HDLC Frame Structure
BOF
Address
Control
Information
FCS (CRC)
EOF
8 bits
8 bits
8 bits
M * 8 bits
2 • 8 bits
8 bits
Summary of Contents for PowerQUICC MPC870
Page 98: ...MPC885 PowerQUICC Family Reference Manual Rev 2 I 4 Freescale Semiconductor ...
Page 118: ...MPC885 Overview MPC885 PowerQUICC Family Reference Manual Rev 2 1 20 Freescale Semiconductor ...
Page 158: ...The MPC8xx Core MPC885 PowerQUICC Family Reference Manual Rev 2 3 18 Freescale Semiconductor ...
Page 288: ...MPC885 PowerQUICC Family Reference Manual Rev 2 III 4 Freescale Semiconductor ...
Page 554: ...MPC885 PowerQUICC Family Reference Manual Rev 2 V 6 Freescale Semiconductor ...
Page 1090: ...UTOPIA Interface MPC885 PowerQUICC Family Reference Manual Rev 2 43 8 Freescale Semiconductor ...
Page 1312: ...Byte Ordering MPC885 PowerQUICC Family Reference Manual Rev 2 A 8 Freescale Semiconductor ...
Page 1336: ...MPC885 PowerQUICC Family Reference Manual Rev 2 D 16 Freescale Semiconductor ...
Page 1358: ...MPC885 PowerQUICC Family Reference Manual Rev 2 D 38 Freescale Semiconductor ...
Page 1370: ...MPC880 MPC885 PowerQUICC Family Reference Manual Rev 2 E 4 Freescale Semiconductor ...
Page 1386: ...Revision History MPC885 PowerQUICC Family Reference Manual Rev 2 I 2 Freescale Semiconductor ...