6 hdlc bus protocol programming, 2 hdlc bus controller programming example, Hdlc bus protocol programming -23 – Motorola MPC8260 User Manual
Page 631: Hdlc bus controller programming example -23
MOTOROLA
Chapter 21. SCC HDLC Mode
21-23
Part IV. Communications Processor Module
21.14.6 HDLC Bus Protocol Programming
The HDLC bus on the MPC8260 is implemented using the SCC in HDLC mode with bus-
speciÞc options selected in the PSMR and GSMR, as outlined below. See also Section 21.5,
ÒProgramming the SCC in HDLC Mode.Ó
21.14.6.1 Programming GSMR and PSMR for the HDLC Bus Protocol
To program the protocol-speciÞc mode register (PSMR), set the bits as described below:
¥
ConÞgure NOF as preferred
¥
Set RTE and BUS to 1
¥
Set BRM to 1 if delayed RTS is desired
¥
ConÞgure CRC to 16-bit CRC CCITT (0b00).
¥
ConÞgure other bits to zero or default.
To program the general SCC mode register (GSMR), set the bits as described below:
¥
Set MODE to HDLC mode (0b0000).
¥
ConÞgure CTSS to 1 and all other bits to zero or default.
¥
ConÞgure the DIAG bits for normal operation (0b00).
¥
ConÞgure RDCR and TDCR for 1
´ clock (0b00).
¥
ConÞgure TENC and RENC for NRZ (0b000).
¥
Clear RTSM to send idles between frames.
¥
Set GSMR_L[ENT, ENR] as the last step to begin operation.
21.14.6.2 HDLC Bus Controller Programming Example
Except for the above discussion in Section 21.14.6.1, ÒProgramming GSMR and PSMR for
the HDLC Bus Protocol,Ó use the example in Section 21.13.1, ÒSCC HDLC Programming
Example #1.У