EasyManuals Logo
Home>Texas Instruments>Microcontrollers>Tiva TM4C123GH6PM

Texas Instruments Tiva TM4C123GH6PM User Manual

Texas Instruments Tiva TM4C123GH6PM
352 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #69 background imageLoading...
Page #69 background image
CRC
7 CRC
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.1 Introduction
CRC (Cyclic Redundancy Check) is a technique to validate a span of data has the same contents
as when previously checked. This technique can be used to validate correct receipt of messages
(nothing lost or modified in transit), to validate data after decompression, to validate that Flash
memory contents have not been changed, and for other cases where the data must be validated. A
CRC is preferred over a simple checksum (for example, XOR all bits) because it catches changes
more readily.
The CRC API provides functions to compute the CRC-8-CCITT and CRC-16 of a buffer of data.
Support is provided for computing a running CRC, where a partial CRC is computed on one portion
of the data, and then continued at a later time on another portion of the data. This is useful when
computing the CRC on a stream of data that is coming in via a serial link (for example).
The CRC-16 APIs implement the standard CRC-16 polynomial (also known as CRC-16-IBM):
x
16
+ x
15
+ x
2
+ 1
The CRC-8-CCITT API implements the standard CRC-8-CCITT polynomial:
x
8
+ x
2
+ x + 1
The ROM_Crc16Array3() function fperforms three separate CRC-16 calculations; one across all
bytes in the input data array, one across the even bytes, and one across the odd bytes. The ability
of a CRC to detect errors decreases as the size of the data array increases. The triple CRC-16
function tries to slow this decrease in error detection rate as it is more difficult for a data error (or
errors) to result in all three CRC-16 calculations being correct.
7.2 Functions
Functions
uint16_t ROM_Crc16 (uint16_t ui16Crc, const uint8_t pui8Data, uint32_t ui32Count)
uint16_t ROM_Crc16Array (uint32_t ui32WordLen, uint32_t pui32Data)
void ROM_Crc16Array3 (uint32_t ui32WordLen, uint32_t pui32Data, uint16_t pui16Crc3)
uint8_t ROM_Crc8CCITT (uint8_t ui8Crc, const uint8_t pui8Data, uint32_t ui32Count)
April 8, 2013 69

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments Tiva TM4C123GH6PM and is the answer not in the manual?

Texas Instruments Tiva TM4C123GH6PM Specifications

General IconGeneral
BrandTexas Instruments
ModelTiva TM4C123GH6PM
CategoryMicrocontrollers
LanguageEnglish

Related product manuals