LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
LPC8xx Cyclic Redundancy Check (CRC) generator example

Detailed Description

Example description
The CRC example demonstrates using the CRC engine for 8-bit, 16-bit, and 32-bit CRC computation. The CRC engine will continuously run via CRC computations and verify the CRC checksum. The system tick is used to occasionally introduce CRC errors into the expected data. The board LED will turn on for an error and turn off for no errors.

Special connection requirements
There are no special connection requirements for this example.

Build procedures:
LPC8xx example quickstart for IAR EWARM
LPC8xx example quickstart for Keil uVision4
LPC8xx example quickstart for Code Red Xpresso

Supported boards and board setup:
NXP Xpresso LPC812 board

Submitting LPCOpen issues:
Community support for LPCOpen

Macros

#define TICKRATE_HZ   (10) /* 10 ticks per second */
 

Functions

void SysTick_Handler (void)
 Handle interrupt from SysTick timer.
 
int main (void)
 Application main function.
 

Variables

static const uint8_t bytes [] = {0x38, 0x38, 0x38, 0x38}
 
static const uint16_t words [] = {0x3534, 0x3534, 0x3534, 0x3534}
 
static const uint32_t dwords [] = {0x33323130, 0x33323130, 0x33323130, 0x33323130}
 
static const uint32_t expect [] = {0x56AB, 0x7A89, 0xD7D6, 0x7D27, 0xA6669D7D}
 
static volatile uint32_t ticks
 

Macro Definition Documentation

#define TICKRATE_HZ   (10) /* 10 ticks per second */

Definition at line 69 of file crc.c.

Function Documentation

int main ( void  )

Application main function.

Main program body.

Returns
Does not return
Note
This function will not return.

defined(CHIP_LPC175X_6X)

Definition at line 99 of file crc.c.

void SysTick_Handler ( void  )

Handle interrupt from SysTick timer.

SysTick 1mS tick handler.

Returns
Nothing

Definition at line 88 of file crc.c.

Variable Documentation

const uint8_t bytes[] = {0x38, 0x38, 0x38, 0x38}
static

Definition at line 64 of file crc.c.

const uint32_t dwords[] = {0x33323130, 0x33323130, 0x33323130, 0x33323130}
static

Definition at line 66 of file crc.c.

const uint32_t expect[] = {0x56AB, 0x7A89, 0xD7D6, 0x7D27, 0xA6669D7D}
static

Definition at line 67 of file crc.c.

volatile uint32_t ticks
static

Definition at line 70 of file crc.c.

const uint16_t words[] = {0x3534, 0x3534, 0x3534, 0x3534}
static

Definition at line 65 of file crc.c.