Microchip® Advanced Software Framework

Use case #1

In this use case, the CRC module is configured for:

  • Performing CRC on an address range in flash
  • Using CRC-32

This use case shows how to calculate the checksum for an address range in flash.

Setup steps

Example code

An address in flash must be defined:

#define FLASHADDR 0x0300

Add to application initialization:

Workflow

  1. Initialize system clock:

Usage steps

Example code

uint32_t checksum;

Workflow

  1. Calculate the checksum of 4 bytes in flash from FLASHADDR