TLE5012B  3.1.0
The TLE5012B is a pre-calibrated 360° angle sensor that detects the orientation of a magnetic field. The raw signals (sine and cosine) are digitally processed internally to calculate the angle orientation of the magnetic field (magnet).
TLE5012b.cpp File Reference
#include "TLE5012b.hpp"
Include dependency graph for TLE5012b.cpp:

Functions

TLE5012b.cpp - core library for the TLE5012B angle sensor.

GMR-based angle sensor for angular position sensing in automotive applications Core Library

Author
Infineon Technologies AG
Version
3.1.0

SPDX-License-Identifier: MIT

uint8_t getFirstByte (uint16_t twoByteWord)
 
uint8_t getSecondByte (uint16_t twoByteWord)
 
uint8_t crc8 (uint8_t *data, uint8_t length)
 
uint8_t crcCalc (uint8_t *crcData, uint8_t length)
 
double calculateAngleSpeed (double angRange, int16_t rawAngleSpeed, uint16_t firMD, uint16_t predictionVal)
 

Function Documentation

◆ getFirstByte()

uint8_t getFirstByte ( uint16_t  twoByteWord)

Gets the first byte of a 2 byte word

Parameters
twoByteWordinsert word of two bytes long
Returns
returns the first byte

◆ getSecondByte()

uint8_t getSecondByte ( uint16_t  twoByteWord)

Gets the second byte of the 2 byte word

Parameters
twoByteWordinsert word of two bytes long
Returns
returns the second byte

◆ crc8()

uint8_t crc8 ( uint8_t *  data,
uint8_t  length 
)

Function for calculation the CRC.

Parameters
databyte long data for CRC check
lengthlength of data
Returns
returns 8bit CRC

◆ crcCalc()

uint8_t crcCalc ( uint8_t *  crcData,
uint8_t  length 
)

Function for calculation of the CRC

Parameters
crcDatabyte long data for CRC check
lengthlength of data
Returns
runs crc8 calculation and returns CRC
Here is the call graph for this function:

◆ calculateAngleSpeed()

double calculateAngleSpeed ( double  angRange,
int16_t  rawAngleSpeed,
uint16_t  firMD,
uint16_t  predictionVal 
)

Calculate the angle speed

Parameters
angRangeset angular range value
rawAngleSpeedraw speed value from read function
firMD
predictionVal
Returns
calculated angular speed