Data Structures | |
class | Tle5012Ino |
represents a basic TLE5012b Arduino class. More... | |
class Tle5012Ino |
represents a basic TLE5012b Arduino class.
represents the TLE5012 base class This file is only a startup wrapper for Arduino IDE so that the framework setup can be handeld without any special setup.
represents the TLE5012 base class
This class provides a simple API for connecting Arduino/Genuio and compatible MCUs. As the default interface for the sensor is the 3wire SSC SPI interface, the default SPIClass is extended by the SPIclass3W.
This class provides a simple API for connecting the TLE5012 via SSC interface, which is included into all flavours the TLE5012 sensor. This setup also works with the Sens2Kit (Sensor including XMC1100 mcu), breakout board (only the Sensor from the Sens2Kit) and bulk chip (read the section on how to connect the bulk chip via 3wire SPI).
Public Types | |
enum | slaveNum { TLE5012B_S0 = 0x0000 , TLE5012B_S1 = 0x2000 , TLE5012B_S2 = 0x4000 , TLE5012B_S3 = 0x6000 } |
Public Member Functions | |
Tle5012Ino () | |
Tle5012Ino (uint8_t csPin, slaveNum slave=TLE5012B_S0) | |
Construct a new Tle5012Ino::Tle5012Ino object with chipselect and sensor slave Use this constructor if: More... | |
Tle5012Ino (SPIClass3W &bus, uint8_t csPin, uint8_t misoPin, uint8_t mosiPin, uint8_t sckPin, slaveNum slave=TLE5012B_S0) | |
errorTypes | begin () |
begin method with default assignments for the SPI bus and pin setting. The EN pin is only available for the Sensor2go kit, therefore we only set it in that case, otherwise it will be NULL. More... | |
errorTypes | begin (uint8_t csPin, slaveNum slave=TLE5012B_S0) |
begin method with default assignments for the SPI bus and the slave setting. Only the csPin is needed. More... | |
errorTypes | readActiveStatus (uint16_t &data) |
read register offset 0x01 More... | |
Data Fields | |
uint8_t | mSpiNum = 0 |
Number of used SPI channel. More... | |
SPIC * | sBus |
SPI cover class as representation of the SPI bus. More... | |
GPIO * | en |
shield enable GPIO to switch sensor2go on/off More... | |
Reg | reg |
Register map. More... | |
slaveNum | mSlave |
actual set slave number More... | |
struct Tle5012b::safetyWord | safetyWord_t |
constructor for the Sensor More... | |
safetyWord | safetyStatus |
uint16_t | safetyWord |
the last fetched safety word More... | |
Protected Attributes | |
uint16_t | _command [2] |
command write data [0] = command [1] = data to write More... | |
uint16_t | _received [MAX_REGISTER_MEM] |
fetched data from sensor with last word = safety word More... | |
uint16_t | _registers [CRC_NUM_REGISTERS+1] |
keeps track of the values stored in the 8 _registers, for which the CRC is calculated More... | |
TLE5012b.cpp - core library for the TLE5012B angle sensor. | |
GMR-based angle sensor for angular position sensing in automotive applications Core Library
SPDX-License-Identifier: MIT | |
void | end () |
void | enableSensor () |
void | disableSensor () |
errorTypes | readBlockCRC () |
errorTypes | readFromSensor (uint16_t command, uint16_t &data, updTypes upd=UPD_low, safetyTypes safe=SAFE_high) |
errorTypes | readMoreRegisters (uint16_t command, uint16_t data[], updTypes upd=UPD_low, safetyTypes safe=SAFE_high) |
errorTypes | readStatus (uint16_t &data, updTypes upd=UPD_low, safetyTypes safe=SAFE_high) |
errorTypes | readActivationStatus (uint16_t &data, updTypes upd=UPD_low, safetyTypes safe=SAFE_high) |
errorTypes | readIntMode1 (uint16_t &data) |
read register offset 0x06 More... | |
errorTypes | readSIL (uint16_t &data) |
read register offset 0x07 More... | |
errorTypes | readIntMode2 (uint16_t &data) |
read register offset 0x08 More... | |
errorTypes | readIntMode3 (uint16_t &data) |
read register offset 0x09 More... | |
errorTypes | readOffsetX (uint16_t &data) |
read register offset 0x0A More... | |
errorTypes | readOffsetY (uint16_t &data) |
read register offset 0x0B More... | |
errorTypes | readSynch (uint16_t &data) |
read register offset 0x0C More... | |
errorTypes | readIFAB (uint16_t &data) |
read register offset 0x0D More... | |
errorTypes | readIntMode4 (uint16_t &data) |
read register offset 0x0E More... | |
errorTypes | readTempCoeff (uint16_t &data) |
read register offset 0x0F More... | |
errorTypes | readTempDMag (uint16_t &data) |
read register offset 0x14 More... | |
errorTypes | readTempRaw (uint16_t &data) |
read register offset 0x15 More... | |
errorTypes | readTempIIFCnt (uint16_t &data) |
read register offset 0x20 More... | |
errorTypes | readTempT25 (uint16_t &data) |
read register offset 0x30 More... | |
errorTypes | readRawX (int16_t &data) |
errorTypes | readRawY (int16_t &data) |
errorTypes | getAngleRange (double &angleRange) |
errorTypes | getAngleValue (double &angleValue) |
errorTypes | getAngleValue (double &angleValue, int16_t &rawAnglevalue, updTypes upd=UPD_low, safetyTypes safe=SAFE_high) |
errorTypes | getNumRevolutions (int16_t &numRev, updTypes upd=UPD_low, safetyTypes safe=SAFE_high) |
errorTypes | getTemperature (double &temp) |
errorTypes | getTemperature (double &temp, int16_t &rawTemp, updTypes upd=UPD_low, safetyTypes safe=SAFE_high) |
errorTypes | getAngleSpeed (double &angleSpeed) |
errorTypes | getAngleSpeed (double &angleSpeed, int16_t &rawSpeed, updTypes upd=UPD_low, safetyTypes safe=SAFE_high) |
errorTypes | writeSlaveNumber (uint16_t dataToWrite) |
errorTypes | writeToSensor (uint16_t command, uint16_t dataToWrite, bool changeCRC) |
errorTypes | writeTempCoeffUpdate (uint16_t dataToWrite) |
errorTypes | writeActivationStatus (uint16_t dataToWrite) |
write register offset 0x01 More... | |
errorTypes | writeIntMode1 (uint16_t dataToWrite) |
write register offset 0x06 More... | |
errorTypes | writeSIL (uint16_t dataToWrite) |
write register offset 0x07 More... | |
errorTypes | writeIntMode2 (uint16_t dataToWrite) |
write register offset 0x08 More... | |
errorTypes | writeIntMode3 (uint16_t dataToWrite) |
write register offset 0x09 More... | |
errorTypes | writeOffsetX (uint16_t dataToWrite) |
write register offset 0x0A More... | |
errorTypes | writeOffsetY (uint16_t dataToWrite) |
write register offset 0x0B More... | |
errorTypes | writeSynch (uint16_t dataToWrite) |
write register offset 0x0C More... | |
errorTypes | writeIFAB (uint16_t dataToWrite) |
write register offset 0x0D More... | |
errorTypes | writeIntMode4 (uint16_t dataToWrite) |
write register offset 0x0E More... | |
errorTypes | writeTempCoeff (uint16_t dataToWrite) |
write register offset 0x0F More... | |
errorTypes | resetFirmware () |
errorTypes | readRegMap () |
errorTypes | writeInterfaceType (Reg::interfaceType_t iface) |
errorTypes | setCalibration (Reg::calibrationMode_t calMode) |
errorTypes | regularCrcUpdate () |
errorTypes | checkSafety (uint16_t safety, uint16_t command, uint16_t *readreg, uint16_t length) |
void | resetSafety () |