•
CRC-16:
–
Polynomial: x
16
+ x
12
+ x
5
+ 1
–
Hex value: 0x1021
•
CRC-32:
–
Polynomial: x
32
+x
26
+ x
23
+ x
22
+x
16
+ x
12
+ x
11
+ x
10
+ x
8
+ x
7
+ x
5
+ x
4
+ x
2
+ x + 1
–
Hex value: 0x04C11DB7
The data source for the CRC engine can either be one of the DMA channels or the APB bus interface,
and must be selected by writing to the CRC Input Source bits in the CRC Control register
(CRCCTRL.CRCSRC). The CRC engine then takes data input from the selected source and generates a
checksum based on these data. The checksum is available in the CRC Checksum register
(
). When CRC-32 polynomial is used, the final checksum read is bit reversed and
complemented, as shown in
The CRC polynomial is selected by writing to the CRC Polynomial Type bit in the CRC Control register
(CRCCTRL.CRCPOLY), the default is CRC-16. The CRC engine operates on byte only. When the DMA is
used as data source for the CRC engine, the DMA channel beat size setting will be used. When used with
APB bus interface, the application must select the CRC Beat Size bit field of CRC Control register
(
.CRCBEATSIZE). 8-, 16-, or 32-bit bus transfer access type is supported. The corresponding
number of bytes will be written in the
register and the CRC engine will operate on the input
data in a byte by byte manner.
Figure 26-16. CRC Generator Block Diagram
16
8
8
32
Checksum
read
crc32
CRCCTRL
CHECKSUM
bit-r
complement
CRC-16
CRC-32
DMAC
Channels
CRCDATAIN
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
452