【AUTOSAR】【Communication Security】CRC

Table of contents

I. Overview

2. Function description

2.1 Common Behavior

2.2 8-bit CRC calculation

2.2.1 8-bit SAE J1850 CRC calculation

2.2.2 8-bit 0x2F polynomial CRC calculation

2.3 16-bit CRC calculation

2.3.1 16-bit CCITT-FALSE CRC16

2.3.2 16-bit 0x8005 polynomial CRC calculation

2.4 32-bit CRC calculation

2.4.1 32-bit Ethernet CRC calculation

2.4.2 32-bit 0xF4ACFB13 polynomial CRC calculation

2.5 64-bit CRC calculation

2.5.1 64-bit ECMA polynomial CRC calculation

3. API interface


I. Overview

This specification stipulates the function, API and configuration of AUTOSAR basic software module CRC.

The CRC library contains the following CRC calculation routines:

  • CRC8: SAEJ1850
  • CRC8H2F: CRC8 0x2F polynomial
  • CRC16
  • CRC32
  • CRC32P4: CRC32 0xF4ACFB13 polynomial
  • CRC64: CRC-64-ECMA

For all routines (CRC8, CRC8H2F, CRC16, CRC32, CRC32P4 and CRC64), the following calculation methods are possible:

  • Table-based calculations: Fast execution, but larger code size (ROM tables)
  • Run-time computation: slower execution, but smaller code size (no ROM tables)
  • Hardware supported CRC calculation (device specific): fast execution, less CPU time

Some routines are reintroducible and can be used by multiple applications at the same time. In the future, some devices may support hardware-backed CRC calculations.

2. Function description

2.1 Common Behavior

The data block is passed to the CRC routine with the parameters "start address", "size" and "start value". The return value is the CRC result.

2.2 8-bit CRC calculation

2.2.1 8-bit SAE J1850 CRC calculation

[Specification] The Crc_CalculateCRC8 function of the CRC module should implement the CRC8 routine according to the SAE-J1850 CRC8 standard, and the Crc_CalculateCRC8 function of the CRC module should provide the following CRC results:

2.2.2 8-bit 0x2F polynomial CRC calculation

[Specification] The Crc_CalculateCRC8H2F function of the CRC module should implement the CRC8 routine based on the polynomial 0x2F, and the Crc_CalculateCRC8H2F function of the CRC module should provide the following CRC results:

2.3 16-bit CRC calculation

2.3.1 16-bit CCITT-FALSE CRC16

2.3.2 16-bit 0x8005 polynomial CRC calculation

2.4 32-bit CRC calculation

2.4.1 32-bit Ethernet CRC calculation

2.4.2 32-bit 0xF4ACFB13 polynomial CRC calculation

2.5 64-bit CRC calculation

2.5.1 64-bit ECMA polynomial CRC calculation

3. API interface

  1. Crc_CalculateCRC8
  2. Crc_CalculateCRC8H2F
  3. Crc_CalculateCRC16
  4. Crc_CalculateCRC16ARC
  5. Crc_CalculateCRC32
  6. Crc_CalculateCRC32P4
  7. Crc_CalculateCRC64
  8. Crc_GetVersionInfo

Guess you like

Origin blog.csdn.net/qq_42357877/article/details/130492708