Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CRC Example

/*!

Overview

The CRC Example project is a demonstration program that uses the KSDK software to generate checksum for an array. After entering all input numbers, the checksum number is calculated and printed to the terminal.

Supported Platforms

These Freescale Freedom development platforms and Tower System modules are supported by the CRC example.

System Requirement

Hardware requirements

Toolchain requirements

Getting Started

Hardware settings

The CRC Example project does not call for any special hardware configurations. Although not required, the recommendation is to leave the development board's jumper settings and configurations in default state when running this example.

Prepare the example

  1. Connect a USB cable between the PC host and the OpenSDA USB port on the board.
  2. Open a serial terminal with these settings:
    • 115200 baud rate
    • 8 data bits
    • No parity
    • One stop bit
    • No flow control
  3. Download the program to the target board.
  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Run the example

These instructions are displayed/shown on the terminal window:

CRC EXAMPLE
Please input size of buffer:

Input the size of the array. After the array is initialized, populate the specific values for each array element one-by-one. These instructions are displayed/shown on the terminal window:

Please input size of buffer: 10
Please input 10 random numbers [0 - 255]:
buffer[0] = 21
buffer[1] = 22
buffer[2] = 23
buffer[3] = 24
buffer[4] = 25
buffer[5] = 26
buffer[6] = 27
buffer[7] = 28
buffer[8] = 29
buffer[9] = 30

The checksum number of the array is calculated and displayed in the terminal as shown here:

Checksum value of buffer array 0x8ED9
Press any key to continue