CRC Checksum Setup

The CRC checksum needs to be contained in the last location of the section which the CRCSCAN is configured to check. This means that a CRC checksum needs to be calculated for an application using CRCSCAN, and added at the end, before the application is programmed to the device.

In this application note, the srec_input is the tool used to generate the checksum and add it to the end of the hex file. This is done through Atmel Studio, where srec_input is added as a post-build command for the project, and the end result will be a hex file which will contain the application code and its CRC checksum:

  1. 1.Open the project properties by clicking Project → <project_name> Properties, as shown in the figure below.
    Figure 1. Project Properties in Atmel Studio
  2. 2.Add a post-build command to the project under Build Events → Post-build event command line, as shown in the figure below.
    Figure 2. Post-Build Command in Atmel Studio
  3. 3.Rebuild the project by clicking Build → Rebuild <project_name>.