Module Overview

The CRCSCAN takes a stream of data from the Nonvolatile Memory (NVM) (either the entire Flash, only the Boot section, or both application code and Boot section) and generates a checksum. The last location in the section to check must contain the correct pre-calculated 16-bit checksum for comparison. If the checksum calculated by CRCSCAN and the pre-calculated checksum matches, a status bit in CRCSCAN will be set. If they do not match, the same status bit will be cleared. CRCSCAN can be configured to generate a non-maskable interrupt (NMI) if the checksums don’t match. The CRC-generator supports CRC-16 (CRC-CCITT).

CRCSCAN is a Core Independent Peripheral (CIP) which can be configured to run without any intervention from the CPU after initialization. It can be enabled in the firmware or via a debugger. When the NMIEN bit in the CTRLA register is set, any CRC failure will trigger the NMI, and the CRC failure can be handled in the NMI interrupt routine. Priority scan mode is supported, and the module can also be enabled during startup to ensure the Flash is OK before letting the CPU execute the code. Refer to fuse description in the data sheet for further information.