English
Language : 

M32C86 Datasheet, PDF (329/505 Pages) Renesas Technology Corp – RENESAS 16/32-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M32C/80 SERIES
M32C/86 Group (M32C/86, M32C/86T)
22. Intelligent I/O (Communication Function)
22.4.3 HDLC Data Processing Mode (Communication Units 0 and 1)
In HDLC data processing mode, bit stuffing, flag detection, abort detection and CRC calculation are available
for HDLC control. f1, f8 or f2n can be selected as the communication unit 0 transfer clock. f1, f8, f2n or clock,
generated in the channel 0 or 1, can be selected as the communication unit 1 transfer clock. No pin is used.
To convert data, data to be transmitted is written to the GiTB register (i=0,1) and the data conversion result is
restored after data conversion. If any data are in the GiTO register after data conversion, the conversion is
terminated. If no data is in the GiTO register, bit stuffing processing is executed regardless of no data avail-
able in the transmit output buffer. A CRC value is calculated every time one bit is converted. If no data is in the
GiRI register, received data conversion is terminated.
Table 22.25 list specifications of the HDLC data processing mode. Tables 22.26 and 22.27 list clock settings.
Table 22.28 lists register settings.
Table 22.25 HDLC Processing Mode Specifications (Communication Units 0 and 1)
Item
Specification
Input Data Format
8-bit data fixed, bit alignment is optional
Output Data Format
8-bit data fixed
Transfer Clock
See Tables 22.26 and 22.27
I/O Method
• During transmit data processing,
value set in the GiTB register is converted in HDLC data processing mode and
transferred to the GiTO register.
• During received data processing,
value set in the GiRI register is converted in HDLC data processing mode and
transferred to the GiRB register. The value in the GiRI register is also transferred to
the GiTB register (received data register).
Bit Stuffing
During transmit data processing, "0" following five continuous "1" is inserted.
During received data processing, "0" following five continuous "1" is deleted.
Flag Detection
Write the flag data "7E16" to the GiCMPj register (j=0 to 3) to use the special commu-
nication interrupt (the SRTiR bit in the IIO4IR register)
Abort Detection
CRC
Write the masked data "0116" to the GiMSKj register
The CRC1 and CRC0 bits are set to "112" (X16+X12+X5+1).
The CRCV bit is set to "1" (set to "FFFF16").
• During transmit data processing,
CRC calculation result is stored into the GiTCRC register. The TCRCE bit in the
GiETC register is set to "1" (transmit CRC used).
The CRC calculation result is reset when the TE bit in the GiCR register is set to "0"
(transmit disabled).
• During received data processing,
CRC calculation result is stored into the GiRCRC register. The RCRCE bit in the
GiERC register is set to "1" (receive CRC used).
The CRC calculation result is reset by comparing the flag data "7E16" and matching
the result with the value in the GiCMP3 register. The ACRC bit in the GiEMR regis-
ter is set to "1" (CRC reset).
Data Processing Start
The following conditions are required to start transmit data processing:
Condition
• The TE bit in the GiCR register is set to "1" (transmit enable)
• Data is written to the GiTB register
The following conditions are required to start receive data processing:
• The RE bit in the GiCR register is set to "1" (receive enable)
• Data is written to the GiRI register
Rev. 1.00 Sep. 08, 2005 Page 306 of 479
REJ09B0204-0100