Crc16_Check(); Description; Actions; Prototype - Infineon SP37 Function Manual

High integrated single-chip tpms sensor with a low power embedded microcontroller and wireless fsk/ask uhf transmitter
Table of Contents

Advertisement

2.34

CRC16_Check()

2.34.1

Description

This function computes a 16-bit CRC of a code block from a start address with a defined length from FLASH, which
includes a pre-computed 16-bit CRC, which is stored in the last 2 Bytes of the memory block ((StartAddr + Length
- 2) is CRC High) and ((StartAddr + Length - 1) is CRC Low).
Note: The pre-computed CRC value has to be written by the application for code blocks in FLASH.
2.34.2

Actions

Calculate 16-bit CRC
Compare CRC with pre-computed CRC located in the last 2 Bytes of the code block
2.34.3

Prototype

signed char CRC16_Check(unsigned char code * StartAddr, unsigned int Length)
2.34.4

Inputs

Table 145
CRC16_Check: Input Parameters
Register / Address
R6 (MSB)
R7 (LSB)
R4 (MSB)
R5 (LSB)
2.34.5

Outputs

Table 146
CRC16_Check: Output values
Register/ Address
R7
ROM Library Function Guide
Type
Name
unsigned char
StartAddr
code*
unsigned int
Length
Type
Name
signed char
Statusbyte
Tire Pressure Monitoring Sensor
Description
Pointer to first Byte of the Data that is used for
calculating the checksum
Length in Bytes of the code block, including the
pre-computed CRC value, that is used for
calculating the checksum.
Description
0: CRC matches
-1: CRC does not match
113
SP37
ROM Library Functions
Revision 1.0, 2011-12-15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents