English
Language : 

PMA51XX Datasheet, PDF (123/202 Pages) Infineon Technologies AG – RF Transmitter ASK/FSK 315/434/868/915 MHz, Embedded 8051 Microcontroller, 10-bit ADC
PMA51xx
Functional Description
2.12
16 bit CRC (Cyclic Redundancy Check) Generator/Checker
CRC is a powerful method to detect errors in data packets that have been transmitted over a distorted connection.
The CRC Generator/Checker divides each byte of a transmitted/received data packet by a polynomial, leaving the
remainder, which represents the checksum. The CRC Generator/Checker uses the 16-bit CCITT polynomial
1021H (x16+x12+x5+1). The 16-bit start value is determined by SFR CRC0 and SFR CRC1.
The CRC Generator/Checker can process 8-bit parallel and/or serial data. Figure 43 gives an overview over the
CRC Generator/Checker. A CRC generation and CRC checking example can be found in Figure 44.
Polynomial = 0x1021
CRC-CCITT
SFR CRCC
CRCSS
CRCSD
Strobe
CRC Shift register/ Logic
Data
SFR CRCR1 CRC-Result <15:8>
Figure 43
SFR CRCD
MSB
CRC-Data 8 bit
SFR CRCR0
CRC (Cyclic Redundancy Check) Generator/Checker
CRC-Result <7:0>
SFR CRCS CRCValid
CRC Generation (Transmitter side )
CRC1 CRC0
Preload value 0xFF 0xFF
Example data 0xAB 0x02 0x04 0xCC 0x00
Resulting CRC16
CRC1 CRC0
0xB5 0x06
0xB5 0x06
Append checksum to
transmitted data
CRC Checking (Receiver side)
CRC1 CRC0
Preload value 0xFF 0xFF
Example data incl. 0xAB 0x02 0x04 0xCC 0x00 0xB5 0x06
Checksum
CRC1 CRC0
Resulting CRC16 0x00 0x00
(CRCC.CRCValid = 1)
Figure 44 CRC (Cyclic Redundancy Check) Generator/Checker example
2.12.1 Byte-aligned CRC Generation
CRC generation is done by executing the following steps:
• The CRC shift register has to be initialized by writing a start value to both SFR CRC0 and SFR CRC1. If the
CRC shift register is not initialized, the default value is 00H.
• The data bytes which are used for the CRC generation have to be shifted one after the other into the SFR
CRCD. The process of CRC generation is automatically invoked when data bytes are written to the
SFR CRCD.
Data Sheet
123
Revision 2.1, 2010-06-02