Staging:CC3220 CRC Demo Application

Overview
The Cyclic Redundancy Check (CRC) computation module can be used for message transfer and for safety system checks. The purpose of the CRC engine is to accelerate CRC and TCP checksum operation. The result of the CRC operation is a 32- and 16-bit signature that can be used to check the sanity of data. The following features are supported:


 * Four major CRC forms


 * 1) CRC16-IBM as used by USB and ANSI
 * 2) CRC32-IEEE as used by IEEE 802.3 and MPEG-2
 * 3) CRC32C as used by G.Hn
 * 4) CRC16-CCITT as used by CCITT/ITU X.25


 * Checksum (TCP)
 * Word and byte feed
 * Byte and half-word swapping for input and output data
 * Bit reversal

Application details
The application is a reference to usage of CRC DriverLib functions on CC3220. Developer/User can refer to this simple application and re-use the functions in their applications. This application can be used with or without "Uart Terminal".

If the user wishes to use "Uart Terminal" to give some inputs and follow the execution path prints, then they might do so by defining "USER-INPUT" in the des_main.c file.


 * crcdemo: This command allows the user to exercise the CRC functionality on CC3220. The command needs a parameter, crc_mode.


 * - crc_mode is the CRC algorithm that user can choose, the value can be P8005 or P1021 or P4C11DB7 or P1EDC6F41 or TCPCHKSUM.

P8005 - CRC-16-IBM 0x8005 P1021 - CRC-16-ICCITT 0x1021 P4C11DB7 - CRC-32 0x4C11DB7 P1EDC6F41 - CRC-32 0x1EDC6F41 TCPCHKSUM - TCP Checksum

Further, user will be prompted for more inputs.

Not defining or un-defining the USER-INPUT will allow the user to follow the execution path on the IAR or CCS IDE, in the "debugging" mode and no input is needed to be given by the user.

Source Files briefly explained

 * main.c - The main file that contains the core-logic for encryption and decryption. The functions in the file uses DriverLib calls to perform encryption and decryption.

 Supporting files 


 * crc_userinput.c - This file is used in the USER-INPUT mode. The function in the file reads the input from the user, parses the input string and feed the core-logic functions in the crc_main.c
 * cc_launchpad.c - Contains mandatory board specific initialization. Also initializes the peripherals exercised.
 * pinmux.c - Generated by the PinMUX utility. UART0 pins are brought out in this file.
 * startup_*.c - IDE specific startup functions (not required when working with TI-RTOS)
 * uart_if.c - Functions to display information on UART

Usage

 * 1) Setup a serial communication application (HyperTerminal/TeraTerm). For detail info visit Terminal setup On the host PC, open a hyperterminal, with the following settings
 * 2) *Port: Enumerated COM port (XDS110 Class Application/User UART)
 * 3) *Baud rate: 115200
 * 4) *Data: 8 bit
 * 5) *Parity: None
 * 6) *Stop: 1 bit
 * 7) *Flow control: None
 * 8) Run the reference application.
 * 9) *Flash the bin
 * 10) *Open the project in IAR/CCS. Build and download the application to the board
 * 11) On the Hyperterminal, a prompt appears
 * 12) *The CRC commands need to be issued and the results can be seen



Limitations/Known Issues
None.