LAPIS Semiconductor ML62Q1000 Series User Manual page 628

Table of Contents

Advertisement

The following chart shows the CRC calculation process flow with the CRC calculation result attached to the serial
receive data.
In this example, 13-byte data with 0x21 in the beginning is used as calculation data. From the calculation data,
calculation result is obtained using the calculation shift direction in MSB first mode. The first 11 bytes of the CRC
calculation result is added to the last two bytes.
Set serial reception
Set CRC calculation shift direction
Set CRC calculation initial value
Serial reception
Last data?
Check operation result
FEUL62Q1000
Start
NO
YES
End
Figure 19-6 CRC Calculation Processing Flow 4 (Serial Reception/MSB First)
Configure settings such as the serial communication mode,
general-purpose port, and interrupt.
Write "1" to the CRCDIR bit to set to MSB first
Write the initial value to the CRCRES register.
CRCRES = 0xFFFF
Write receive data to the CRCDATA register.
CRCDATA = 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
0x29, 0x81, 0x7F, 0x72, 0xD5
When CRCRES is read, 0x0000 is obtained.
ML62Q1000 Series User's Manual
Chapter 19 CRC Generator
19-16

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents