4.5 CRCSCAN - Cyclic Redundancy Check Scan

Cyclic Redundancy Check Memory Scan

4.5.1 Introduction

The MCC Melody Cyclic Redundancy Check (CRC) PLIB (Peripheral Library) driver generates APIs to support CRCSCAN-specific peripheral functionality on AVRxxxDx and ATtiny target MCUs.

The CRCSCAN is an important safety feature. It scans the Non-volatile Memory (NVM) and makes sure that the code is correct. By ensuring no code corruption has occurred, any potentially unintended behavior of the application that can cause a dangerous situation can be avoided. The CRCSCAN module can be set up to scan the entire Flash section, only the boot section, or both the boot and application code sections.

4.5.2 Supported Device Families

AVR® Dx AVR® Ex ATtiny ATmega

4.5.3 Required Header Files:

#include "mcc_generated_files/crc/crc.h"

4.5.4 Module Documentation

4.5.4.1 CRCSCAN

This file contains the API prototypes for the CRCSCAN module.

4.5.4.1.1 Module description

This file contains the API prototypes for the CRCSCAN module.

Version: CRCSCAN Driver Version 1.0.0
Functions
  • int8_t CRC_Initialize (void)

    Initializes the CRCSCAN module. This is called only once before calling other CRCSCAN APIs.

  • bool CRC_Reset (void)

    Resets the CRCSCAN module.

4.5.4.1.2 Function Documentation

CRC_Initialize()

int8_t CRC_Initialize (void )

Initializes the CRCSCAN module. This is called only once before calling other CRCSCAN APIs.

Section: Included FilesSection: CRCSCAN APIs

Parameters:
None.
Returns:

None.

Section: Included FilesSection: CRCSCAN APIs

CRC_Reset()

bool CRC_Reset (void )

Resets the CRCSCAN module.

Parameters:
None.
Return values:
True

- CRCSCAN module has been reset.

False

- CRCSCAN module has not been reset.

4.5.5 File Documentation

4.5.5.1 source/crc.c File Reference

#include "../crc.h"

4.5.5.1.1 Functions

  • int8_t CRC_Initialize (void)

    Initializes the CRCSCAN module. This is called only once before calling other CRCSCAN APIs.

  • bool CRC_Reset (void)

    Resets the CRCSCAN module.

  • ISR (NMI_vect)

4.5.5.1.2 Function Documentation

ISR()

ISR (NMI_vect )

4.5.5.2 source/crc.h File Reference

#include "../system/utils/compiler.h"

4.5.5.2.1 Functions

  • int8_t CRC_Initialize (void)

    Initializes the CRCSCAN module. This is called only once before calling other CRCSCAN APIs.

  • bool CRC_Reset (void)

    Resets the CRCSCAN module.