EasyManua.ls Logo

Texas Instruments CC3235 SimpleLink Series - Page 755

Texas Instruments CC3235 SimpleLink Series
799 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
www.ti.com
Initialization and Configuration
755
SWRU543–January 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
Cyclical Redundancy Check (CRC)
20.2 Initialization and Configuration
The following sections describe the initialization and configuration procedures of the CRC module.
20.2.1 CRC Initialization and Configuration
The CRC engine works in push-through mode, which works on streaming data. This section describes the
steps for initializing the CRC module:
1. Enable the clock to cryptography module (that includes CRC) by setting the R0 bit in the
CRYPTOCLKEN register in the application reset and clock management module (physical address:
0x4402 50B8).
2. Configure the desired CRC data size, bit order, endian configuration, and CRC type by programming
the CRC Control (CRCCTRL) register, offset 0xC00.
3. If the CRC value has not been initialized to all 0s or all 1s using the INIT field in the CRCCTRL
register, program the initial value in the CRC SEED/Context (CRCSEED) register, offset 0xC10.
4. Repeatedly write the DATAIN field in the CRC Data Input (CRCDIN) register, offset 0xC14. If the SIZE
bit in the CRCCTRL register is set to select byte, the CRC engine operates in byte mode and only the
least significant byte (LSByte) is used for CRC calculation.
5. When CRC is finished, read the CRCSEED register for the final result. If using post-processing, the
raw CRC result is stored in the CRCSEED register and the final, post-processed result can be read
from the CRC Post-Processing Result (CRCRSLTPP) register, offset 0xC18. Post-processing options
are selectable through the OBR and OLNV bits of the CRCCTRL register.
20.2.1.1 Data Endian Convention for the CRC Engine
If the input stream is expressed as a byte stream, Din, where Din = {D0, D1, D2, D3, D4, D5, D6, D7, D8,
D9, D11, D12, D13, D14, D15, D16.....}, then data should be fed to the CRC engine as follows:
• If operating in byte mode, the CRCDIN register should be written in the following order:
1. {00, 00, 00, D0}
2. {00, 00, 00, D1}
3. {00, 00, 00, D2}
4. {00, 00, 00, D3}
5. {00, 00, 00, D4}
6. {00, 00, 00, D5}
7. {00, 00, 00, D6}
8. ......
9. .....
• If operating in word mode, the CRCDIN register should be written in the following order:
1. {D3, D2, D1, D0}
2. {D7, D6, D5, D4}
3. {D11, D10, D9, D8}
4. ......
5. ......

Table of Contents