Infineon TLE5014P16 User Manual page 12

Gmr-based angle sensor
Table of Contents

Advertisement

TLE5014
GMR-Based Angle Sensor
Interfaces overview
CRC calculation for SENT protocol
The checksum nibble is a 4-bit CRC of the data nibbles and does not include the status nibble (different to SPC
CRC implementation). The CRC is calculated using a polynomial x4+x3+x2+1 with a seed value of 0101
. The
B
remainder after the last data nibble is transmitted as CRC. The CRC calculation method is based on
"recommended" implementation in the SENT standard 2010. For this "recommended" implementation, the
CRC is calculated based on the input data (without STATUS nibble) which is then augmented with four extra
zero bits and an additional CRC calculation step.
Code example:
//Table CRC, Poly=0xD
uint8_t cr4Table[16] = {0, 13, 7, 10, 14, 3, 9, 4, 1, 12, 6, 11, 15, 2, 8, 5};
//Example:
//Data Nibble = 0x7, 0x4, 0x8, 0x7, 0x4, 0x8
uint8_t nibble[6] = {7, 4, 8, 7, 4, 8};
uint8_t nb_nibble = 0x6;
//Seed value = 0x5
uint8_t crc = 0x5;
for(uint8_t i=0;i<nb_nibble;i++){
crc = nibble[i] ^ cr4Table[crc];
}
//Final XOR
crc = 0x0 ^ cr4Table[crc];
User's Manual
12
Rev. 1.0
2019-03-12

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tle5014s16Tle5014c16Tle5014s16dTle5014c16dTle5014p16d

Table of Contents