LAPIS Semiconductor ML62Q1000 Series User Manual page 625

Table of Contents

Advertisement

19.3.1.1 Example of Use of Manual CRC Calculation Mode
The following chart shows the process flow of serial transmission with the CRC calculation result attached to data.
In this example, 11-byte data with 0x21 in the beginning is used as transmit data, and calculation result is obtained using
the calculation shift direction in LSB first mode.
Transmission and CRC calculation data: 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x81, 0x7F
Set CRC calculation shift direction
Set CRC calculation initial value
Serial transmission (data)
Confirm CRC calculation result
Serial transmission (CRC)
Serial transmission (CRC)
FEUL62Q1000
Start
Set serial transmission
Last data?
YES
End
Figure 19-3 CRC Calculation Processing Flow 1 (Serial Transmission/LSB First)
Configure settings such as the serial communication
mode, general-purpose port, and interrupt.
Write "0" to the CRCDIR bit to set to LSB first.
Write the initial value to the CRCRES register.
CRCRES = 0xFFFF
Write transmit data to the CRCDATA register.
CRCDATA = 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0x81, 0x7F
NO
When CRCRES is read, 0x87E6 is obtained.
Perform serial transmission of the calculation result
(lower: 0xE6).
Perform serial transmission of the calculation result
(higher: 0x87).
ML62Q1000 Series User's Manual
Chapter 19 CRC Generator
19-13

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents