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).
Tle5012 register functions API
Collaboration diagram for Tle5012 register functions API:

Data Structures

class  Reg
 
struct  Reg::BitField_t
 Bit field parameters. More...
 
struct  Reg::AddressField_t
 Register address field. More...
 

Enumerations

enum  Reg::calibrationMode_t { Reg::noAutoCal = 0x0 , Reg::mode1 , Reg::mode2 , Reg::mode3 }
 Automatic calibration of offset and amplitude synchronicity for applications with full-turn. Only 1 LSB corrected at each update. CRC check of calibration registers is automatically disabled if AUTOCAL activated. More...
 
enum  Reg::angleRange_t { Reg::factor1 = 0x080 , Reg::factor4 = 0x200 , Reg::factor5 = 0x040 }
 
enum  Reg::interfaceType_t {
  Reg::IIF = 0 , Reg::PWM , Reg::HSM , Reg::SPC ,
  Reg::SSC
}
 List of possible interface types witch are preset by fuses and can be changed into each other. More...
 
enum  Reg::sensorType_t {
  Reg::TLE5012B_E1000 = 0x0 , Reg::TLE5012B_E3005 , Reg::TLE5012B_E5000 , Reg::TLE5012B_E5020 ,
  Reg::TLE5012B_E9000
}
 
enum  Reg::Access_t {
  Reg::REG_ACCESS_R = (0x01U) , Reg::REG_ACCESS_W = (0x02U) , Reg::REG_ACCESS_RW = (0x03U) , Reg::REG_ACCESS_U = (0x04U) ,
  Reg::REG_ACCESS_RU = (0x05U) , Reg::REG_ACCESS_RWU = (0x07U) , Reg::REG_ACCESS_RES = (0x10U)
}
 Register access type. More...
 
enum  Reg::Addr_t {
  Reg::REG_STAT = (0x0000U) , Reg::REG_ACSTAT = (0x0010U) , Reg::REG_AVAL = (0x0020U) , Reg::REG_ASPD = (0x0030U) ,
  Reg::REG_AREV = (0x0040U) , Reg::REG_FSYNC = (0x0050U) , Reg::REG_MOD_1 = (0x0060U) , Reg::REG_SIL = (0x0070U) ,
  Reg::REG_MOD_2 = (0x0080U) , Reg::REG_MOD_3 = (0x0090U) , Reg::REG_OFFX = (0x00A0U) , Reg::REG_OFFY = (0x00B0U) ,
  Reg::REG_SYNCH = (0x00C0U) , Reg::REG_IFAB = (0x00D0U) , Reg::REG_MOD_4 = (0x00E0U) , Reg::REG_TCO_Y = (0x00F0U) ,
  Reg::REG_ADC_X = (0x0100U) , Reg::REG_ADC_Y = (0x0110U) , Reg::REG_D_MAG = (0x0140U) , Reg::REG_T_RAW = (0x0150U) ,
  Reg::REG_IIF_CNT = (0x0200U) , Reg::REG_T25O = (0x0300U)
}
 register address enumeration for all sensor registers More...
 

Variables

void * Reg::p
 
uint8_t Reg::BitField_t::regAccess
 Bitfield register access *‍/. More...
 
uint16_t Reg::BitField_t::regAddress
 Bitfiled register address *‍/. More...
 
uint16_t Reg::BitField_t::mask
 Bitfield mask *‍/. More...
 
uint8_t Reg::BitField_t::position
 Bitfiled position *‍/. More...
 
uint8_t Reg::BitField_t::resetValue
 Bitfield register reset value *‍/. More...
 
uint8_t Reg::BitField_t::posMap
 Bitfield position of register in regMap *‍/. More...
 
uint16_t Reg::AddressField_t::regAddress
 Addressfield register address *‍/. More...
 
uint8_t Reg::AddressField_t::posMap
 Addressfield register regMap position *‍/. More...
 
uint16_t Reg::regMap [MAX_NUM_REG]
 Register map *‍/. More...
 

tle5012b_reg.cpp - core support for the TLE5012B angle sensor.

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

Author
Infineon Technologies AG
Version
3.1.0

This file includes the registry definition macros of all Sensor registers and the bit settings for each of the register content values. Depending on the type of secondary interface (PWM, IIF or HSM) the meaning of some register values differs, so please have look in the TLE5012 manual for the exact meaning. Also included here are other sensefull macros for handling the TLE5012 sensor. Core Library

SPDX-License-Identifier: MIT

static const AddressField_t Reg::addrFields []
 Registers bitfields. More...
 
 Reg::Reg (void *p)
 Construct a new Reg::Reg object. More...
 
 Reg::~Reg ()
 Destroy the Reg::Reg object. More...
 
bool Reg::isStatusReset (void)
 Indication that there was a reset state. More...
 
bool Reg::isStatusWatchDog (void)
 Permanent check of watchdog. More...
 
bool Reg::isStatusVoltage (void)
 Permanent check of internal and external supply voltages. More...
 
bool Reg::isStatusFuse (void)
 Cyclic CRC check of configuration registers and startup CRC. More...
 
bool Reg::isStatusDSPU (void)
 Check DSPU, CORDIC and CAPCOM at startup. More...
 
bool Reg::isStatusOverflow (void)
 Cyclic scheck of DSPU (Digital Signal Processing Unit) overflow. More...
 
bool Reg::isStatusXYOutOfLimit (void)
 Cyclic check of X and > raw values. More...
 
bool Reg::isStatusMagnitideOutOfLimit (void)
 Vector lengths cyclic check of X,Y values after error compensation. More...
 
bool Reg::isStatusADC (void)
 Check signal path with test vectors. More...
 
bool Reg::isStatusROM (void)
 Check of ROM-CRC at statup. More...
 
bool Reg::isStatusGMRXY (void)
 No valid GMR X,Y values, cyclic check of ADC input. More...
 
bool Reg::isStatusGMRA (void)
 No value GMR angle value, cyclic check of DSPU output. More...
 
bool Reg::isStatusRead (void)
 Read status, checks if any status register changed since last readout. More...
 
uint8_t Reg::getSlaveNumber (void)
 Get the actual slave number of the sensor. Up to four sensors can be selected via this register field. More...
 
void Reg::setSlaveNumber (const uint8_t snr)
 Set the slave number of the sensor. Up to four sensors can be selected with this register field. More...
 
bool Reg::isActivationReset (void)
 Hardware reset, will be performed after chip select returns to high. More...
 
void Reg::setActivationReset (void)
 Set the Activation Reset object Performs a hardware reset. More...
 
void Reg::enableWatchdog (void)
 Enable the DSPU watchdog. More...
 
void Reg::disableWatchdog (void)
 disable the DSPU watchdog More...
 
bool Reg::isWatchdog (void)
 Get the status of the DSPU watchdog. More...
 
void Reg::enableVoltageCheck (void)
 Enable the voltage regulator check. More...
 
void Reg::disableVoltageCheck (void)
 disable the voltage regulator check More...
 
bool Reg::isVoltageCheck (void)
 Get the status of the voltage regulator check. More...
 
void Reg::enableFuseCRC (void)
 Enable the fuse CRC check. More...
 
void Reg::disableFuseCRC (void)
 disable the fuse CRC check More...
 
bool Reg::isFuseCRC (void)
 Get the status of the fuse CRC check. More...
 
void Reg::enableDSPUbist (void)
 Enable the DSPU bist check. More...
 
void Reg::disableDSPUbist (void)
 disable the DSPU bist check More...
 
bool Reg::isDSPUbist (void)
 Get the status of the DSPU bist check. More...
 
void Reg::enableDSPUoverflow (void)
 Enable the DSPU overflow check. More...
 
void Reg::disableDSPUoverflow (void)
 disable the DSPU overflow check More...
 
bool Reg::isDSPUoverflow (void)
 Get the status of the DSPU overflow check. More...
 
void Reg::enableXYCheck (void)
 Enable the X,Y out of limit check. More...
 
void Reg::disableXYCheck (void)
 disable the X,Y out of limit check More...
 
bool Reg::isXYCheck (void)
 Get the status of the X,Y out of limit check. More...
 
void Reg::enableGMRCheck (void)
 Enable the GMR magnitude check. More...
 
void Reg::disableGMRCheck (void)
 disable the GMR magnitude check More...
 
bool Reg::isGMRCheck (void)
 Get the status of the GMR magnitude check. More...
 
void Reg::enableADCCheck (void)
 Enable the ADC test vector check. More...
 
void Reg::disableADCCheck (void)
 disable the ADC test vector check More...
 
bool Reg::isADCCheck (void)
 Get the status of the ADC test vectorGMR magnitude check. More...
 
void Reg::activateFirmwareReset (void)
 Activate the firmware reset, all configuration registers retain their contents. Will also set the SRST register. More...
 
bool Reg::isFirmwareReset (void)
 Get the status of the firmware reset register. More...
 
bool Reg::isAngleValueNew (void)
 Do we have a new calculated angle value since last readout. More...
 
uint16_t Reg::getAngleValue (void)
 Get a new calculated angle value. More...
 
bool Reg::isSpeedValueNew (void)
 Do we have a new calculated speed value since last readout. More...
 
uint16_t Reg::getSpeedValue (void)
 Get a new calculated speed value. More...
 
bool Reg::isNumberOfRevolutionsNew (void)
 Do we have a new number of revolutions since last readout. More...
 
uint16_t Reg::getNumberOfRevolutions (void)
 Get a new number of revolutions value. More...
 
uint16_t Reg::getFrameCounter (void)
 Get the frame counter value. Internal frame counter increments every update period. More...
 
void Reg::setFrameCounter (uint16_t fcnt)
 Set the frame counter value. More...
 
uint16_t Reg::getFrameSyncCounter (void)
 Get the frame synchronisation counter value Internal frame sub counter within one frame. More...
 
void Reg::setFrameSyncCounter (uint16_t fsync)
 Set the frame synchronisation counter value. More...
 
uint16_t Reg::getTemperatureValue (void)
 Get the temperature value as signed offset compensated temperature value Saturated between -30°C and above 140°C. More...
 
void Reg::setFilterDecimation (uint8_t firmd)
 Set the filter decimation, update rate setting. More...
 
uint8_t Reg::getFilterDecimation (void)
 Get the filter decimation, update rate setting. More...
 
void Reg::setIIFMod (uint8_t iifmod)
 Set the IIF (Incremental Interfave Mode) More...
 
uint8_t Reg::getIIFMod (void)
 Get the temperature value as signed offset compensated temperature value Saturated between -30°C and above 140°C. More...
 
void Reg::holdDSPU (void)
 Set DSPU on hold. More...
 
void Reg::releaseDSPU (void)
 release DSPU operations More...
 
bool Reg::isDSPUhold (void)
 Get the status of DSPU operations. More...
 
void Reg::setInternalClock (void)
 Set the clock source to internal oscillator. More...
 
void Reg::setExternalClock (void)
 Set clock sourec to external SCK. More...
 
bool Reg::statusClockSource (void)
 Get the status of the clock source. More...
 
void Reg::enableFilterParallel (void)
 Enable the Filter parallel diagnostics function. More...
 
void Reg::disableFilterParallel (void)
 disable the Filter parallel diagnostics function More...
 
bool Reg::isFilterParallel (void)
 Get the status of the Filter parallel diagnostics function. More...
 
void Reg::enableFilterInverted (void)
 Enable the Filter inverted diagnostics function. More...
 
void Reg::disableFilterInverted (void)
 disable the Filter inverted diagnostics function More...
 
bool Reg::isFilterInverted (void)
 Get the status of the Filter inverted diagnostics function. More...
 
void Reg::enableADCTestVector (void)
 Enable the ADC test vector diagnostics function. More...
 
void Reg::disableADCTestVector (void)
 disable the ADC test vector diagnostics function More...
 
bool Reg::isADCTestVector (void)
 Get the status of the ADC test vector diagnostics function. More...
 
void Reg::setFuseReload (void)
 Set the fuse reload register and trigger a reload. More...
 
bool Reg::getFulseReload (void)
 Get the status of the fuse reload register. More...
 
void Reg::setTestVectorX (uint8_t adctvx)
 Set the test vector x. More...
 
uint8_t Reg::getTestVectorX (void)
 Get the test vector x. More...
 
void Reg::setTestVectorY (uint8_t adctvs)
 Set the test vector s. More...
 
uint8_t Reg::getTestVectorY (void)
 Get the test vector y. More...
 
void Reg::directionClockwise (void)
 Set angle direction clockwise. More...
 
void Reg::directionConterClockwise (void)
 Set angle direction counter clockwise. More...
 
bool Reg::isAngleDirection (void)
 Get the angle direction. More...
 
void Reg::enablePrediction (void)
 Enable the angle prediction based on current speed. More...
 
void Reg::disablePrediction (void)
 disable the angle prediction More...
 
bool Reg::isPrediction (void)
 Get the status of angle perdiction. More...
 
void Reg::setAngleRange (angleRange_t range)
 Set the representation of the angle output value and the speed value. More...
 
angleRange_t Reg::getAngleRange (void)
 Get the representation of the angle range. More...
 
void Reg::setCalibrationMode (calibrationMode_t autocal)
 Set the automatic calibration mode. More...
 
calibrationMode_t Reg::getCalibrationMode (void)
 Get the actual automatic calibration mode. More...
 
void Reg::enableSpikeFilter (void)
 Enable the analog spike filter to filter voltage spikes in IFC, SCK, CS. More...
 
void Reg::disableSpikeFilter (void)
 disable the analog spike filter to filter More...
 
bool Reg::isSpikeFilter (void)
 Get the status of the analog spike filter. More...
 
void Reg::enableSSCOpenDrain (void)
 Enable open drain on SSC interface. More...
 
void Reg::enableSSCPushPull (void)
 Enable push pull on SSC interface. More...
 
bool Reg::isSSCOutputMode (void)
 Get the status of the SSC output mode. More...
 
void Reg::setAngleBase (uint16_t base)
 Set a new value for the angle base calibration. More...
 
uint16_t Reg::getAngleBase (void)
 Get the actual 0° angle position The 0° angle position is factory calibrated parallel to the edge of the chip. More...
 
void Reg::setPadDriver (uint8_t pad)
 Set a new pad driver configuration. More...
 
uint8_t Reg::getPadDriver (void)
 Get the pad driver configuration. More...
 
int16_t Reg::getOffsetX (void)
 Get offset correction x value. More...
 
void Reg::setOffsetX (int16_t offx)
 Set offset correction x value. More...
 
int16_t Reg::getOffsetY (void)
 Get offset correction y value. More...
 
void Reg::setOffsetY (int16_t offy)
 Set offset correction y value. More...
 
void Reg::setAmplitudeSynch (int16_t synch)
 Set amplitude correction value. More...
 
int16_t Reg::getAmplitudeSynch (void)
 Get amplitude correction value. More...
 
void Reg::setFIRUpdateRate (bool fir)
 Set the FIR (Filter Initial Rate) update rate. More...
 
uint8_t Reg::getFIRUpdateRate (void)
 Get the FIR update rate. More...
 
void Reg::enableIFABOpenDrain (void)
 Enable open drain in IFA, IFB and IFC. More...
 
void Reg::enableIFABPushPull (void)
 Enable push pull in IFA, IFB and IFC. More...
 
bool Reg::isIFABOutputMode (void)
 Get the status of the IFA, IFB and IFC output mode. More...
 
void Reg::setOrthogonality (int16_t ortho)
 Set the orthogonality correction of x y components. More...
 
int16_t Reg::getOrthogonality (void)
 Get the orthogonality correction of x y components. More...
 
void Reg::setHysteresisMode (uint8_t hyst)
 Set the hysteresis mode for HSM, or the unit time if in SPC mode (see manual) More...
 
uint8_t Reg::getHysteresisMode (void)
 Get the hysteresis mode for HSM, or the unit time if in SPC mode (see manual) More...
 
void Reg::setInterfaceMode (interfaceType_t ifmd)
 Set the interface Mode on IFA,IFB,IFC. More...
 
interfaceType_t Reg::getInterfaceMode (void)
 Get the interface Mode on IFA,IFB,IFC. More...
 
void Reg::setIFABres (uint8_t res)
 Set multipurpose register, PWM frequency, IIF resolution, SPC frame configuration. More...
 
uint8_t Reg::getIFABres (void)
 Get multipurpose register. More...
 
void Reg::setHSMplp (uint8_t plp)
 Set multipurpose register,. More...
 
uint8_t Reg::getHSMplp (void)
 Get multipurpose register. More...
 
void Reg::setOffsetTemperatureX (int8_t tcox)
 Set offset temperature coefficient for x component. More...
 
int8_t Reg::getOffsetTemperatureX (void)
 Get offset temperature coefficient for x component. More...
 
void Reg::setOffsetTemperatureY (int8_t tcoy)
 Set offset temperature coefficient for y component. More...
 
int8_t Reg::getOffsetTemperatureY (void)
 Get offset temperature coefficient for y component. More...
 
void Reg::enableStartupBist (void)
 Enable startup bist. More...
 
void Reg::disableStartupBist (void)
 Disable startup bist. More...
 
bool Reg::isStartupBist (void)
 Get the status of startup bist. More...
 
void Reg::setCRCpar (uint16_t crc)
 Set CRC of parameters from address 08h to 0Fh. More...
 
uint16_t Reg::getCRCpar (void)
 Get CRC of parameters from address 08h to 0Fh. More...
 
int16_t Reg::getADCx (void)
 Get GMR ADC x value. More...
 
int16_t Reg::getADCy (void)
 Get GMR ADC y value. More...
 
uint16_t Reg::getVectorMagnitude (void)
 Get angle vactor magnitude. More...
 
uint16_t Reg::getTemperatureRAW (void)
 Get Temperature Sensor raw value. More...
 
bool Reg::isTemperatureToggle (void)
 Is there a new Temperature Sensor RAW value. More...
 
uint16_t Reg::getCounterIncrements (void)
 Get Counter value of increments. More...
 
uint16_t Reg::getT25Offset (void)
 Get Temperature 25°C offset value. More...
 

Detailed Description


Data Structure Documentation

◆ Reg

class Reg
Collaboration diagram for Reg:

Public Types

enum  calibrationMode_t { noAutoCal = 0x0 , mode1 , mode2 , mode3 }
 Automatic calibration of offset and amplitude synchronicity for applications with full-turn. Only 1 LSB corrected at each update. CRC check of calibration registers is automatically disabled if AUTOCAL activated. More...
 
enum  angleRange_t { factor1 = 0x080 , factor4 = 0x200 , factor5 = 0x040 }
 
enum  interfaceType_t {
  IIF = 0 , PWM , HSM , SPC ,
  SSC
}
 List of possible interface types witch are preset by fuses and can be changed into each other. More...
 
enum  sensorType_t {
  TLE5012B_E1000 = 0x0 , TLE5012B_E3005 , TLE5012B_E5000 , TLE5012B_E5020 ,
  TLE5012B_E9000
}
 
enum  Access_t {
  REG_ACCESS_R = (0x01U) , REG_ACCESS_W = (0x02U) , REG_ACCESS_RW = (0x03U) , REG_ACCESS_U = (0x04U) ,
  REG_ACCESS_RU = (0x05U) , REG_ACCESS_RWU = (0x07U) , REG_ACCESS_RES = (0x10U)
}
 Register access type. More...
 
enum  Addr_t {
  REG_STAT = (0x0000U) , REG_ACSTAT = (0x0010U) , REG_AVAL = (0x0020U) , REG_ASPD = (0x0030U) ,
  REG_AREV = (0x0040U) , REG_FSYNC = (0x0050U) , REG_MOD_1 = (0x0060U) , REG_SIL = (0x0070U) ,
  REG_MOD_2 = (0x0080U) , REG_MOD_3 = (0x0090U) , REG_OFFX = (0x00A0U) , REG_OFFY = (0x00B0U) ,
  REG_SYNCH = (0x00C0U) , REG_IFAB = (0x00D0U) , REG_MOD_4 = (0x00E0U) , REG_TCO_Y = (0x00F0U) ,
  REG_ADC_X = (0x0100U) , REG_ADC_Y = (0x0110U) , REG_D_MAG = (0x0140U) , REG_T_RAW = (0x0150U) ,
  REG_IIF_CNT = (0x0200U) , REG_T25O = (0x0300U)
}
 register address enumeration for all sensor registers More...
 

Data Fields

void * p
 
uint16_t regMap [MAX_NUM_REG]
 Register map *‍/. More...
 

tle5012b_reg.cpp - core support for the TLE5012B angle sensor.

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

Author
Infineon Technologies AG
Version
3.1.0

This file includes the registry definition macros of all Sensor registers and the bit settings for each of the register content values. Depending on the type of secondary interface (PWM, IIF or HSM) the meaning of some register values differs, so please have look in the TLE5012 manual for the exact meaning. Also included here are other sensefull macros for handling the TLE5012 sensor. Core Library

SPDX-License-Identifier: MIT

static const AddressField_t addrFields []
 Registers bitfields. More...
 
 Reg (void *p)
 Construct a new Reg::Reg object. More...
 
 ~Reg ()
 Destroy the Reg::Reg object. More...
 
bool isStatusReset (void)
 Indication that there was a reset state. More...
 
bool isStatusWatchDog (void)
 Permanent check of watchdog. More...
 
bool isStatusVoltage (void)
 Permanent check of internal and external supply voltages. More...
 
bool isStatusFuse (void)
 Cyclic CRC check of configuration registers and startup CRC. More...
 
bool isStatusDSPU (void)
 Check DSPU, CORDIC and CAPCOM at startup. More...
 
bool isStatusOverflow (void)
 Cyclic scheck of DSPU (Digital Signal Processing Unit) overflow. More...
 
bool isStatusXYOutOfLimit (void)
 Cyclic check of X and > raw values. More...
 
bool isStatusMagnitideOutOfLimit (void)
 Vector lengths cyclic check of X,Y values after error compensation. More...
 
bool isStatusADC (void)
 Check signal path with test vectors. More...
 
bool isStatusROM (void)
 Check of ROM-CRC at statup. More...
 
bool isStatusGMRXY (void)
 No valid GMR X,Y values, cyclic check of ADC input. More...
 
bool isStatusGMRA (void)
 No value GMR angle value, cyclic check of DSPU output. More...
 
bool isStatusRead (void)
 Read status, checks if any status register changed since last readout. More...
 
uint8_t getSlaveNumber (void)
 Get the actual slave number of the sensor. Up to four sensors can be selected via this register field. More...
 
void setSlaveNumber (const uint8_t snr)
 Set the slave number of the sensor. Up to four sensors can be selected with this register field. More...
 
bool isActivationReset (void)
 Hardware reset, will be performed after chip select returns to high. More...
 
void setActivationReset (void)
 Set the Activation Reset object Performs a hardware reset. More...
 
void enableWatchdog (void)
 Enable the DSPU watchdog. More...
 
void disableWatchdog (void)
 disable the DSPU watchdog More...
 
bool isWatchdog (void)
 Get the status of the DSPU watchdog. More...
 
void enableVoltageCheck (void)
 Enable the voltage regulator check. More...
 
void disableVoltageCheck (void)
 disable the voltage regulator check More...
 
bool isVoltageCheck (void)
 Get the status of the voltage regulator check. More...
 
void enableFuseCRC (void)
 Enable the fuse CRC check. More...
 
void disableFuseCRC (void)
 disable the fuse CRC check More...
 
bool isFuseCRC (void)
 Get the status of the fuse CRC check. More...
 
void enableDSPUbist (void)
 Enable the DSPU bist check. More...
 
void disableDSPUbist (void)
 disable the DSPU bist check More...
 
bool isDSPUbist (void)
 Get the status of the DSPU bist check. More...
 
void enableDSPUoverflow (void)
 Enable the DSPU overflow check. More...
 
void disableDSPUoverflow (void)
 disable the DSPU overflow check More...
 
bool isDSPUoverflow (void)
 Get the status of the DSPU overflow check. More...
 
void enableXYCheck (void)
 Enable the X,Y out of limit check. More...
 
void disableXYCheck (void)
 disable the X,Y out of limit check More...
 
bool isXYCheck (void)
 Get the status of the X,Y out of limit check. More...
 
void enableGMRCheck (void)
 Enable the GMR magnitude check. More...
 
void disableGMRCheck (void)
 disable the GMR magnitude check More...
 
bool isGMRCheck (void)
 Get the status of the GMR magnitude check. More...
 
void enableADCCheck (void)
 Enable the ADC test vector check. More...
 
void disableADCCheck (void)
 disable the ADC test vector check More...
 
bool isADCCheck (void)
 Get the status of the ADC test vectorGMR magnitude check. More...
 
void activateFirmwareReset (void)
 Activate the firmware reset, all configuration registers retain their contents. Will also set the SRST register. More...
 
bool isFirmwareReset (void)
 Get the status of the firmware reset register. More...
 
bool isAngleValueNew (void)
 Do we have a new calculated angle value since last readout. More...
 
uint16_t getAngleValue (void)
 Get a new calculated angle value. More...
 
bool isSpeedValueNew (void)
 Do we have a new calculated speed value since last readout. More...
 
uint16_t getSpeedValue (void)
 Get a new calculated speed value. More...
 
bool isNumberOfRevolutionsNew (void)
 Do we have a new number of revolutions since last readout. More...
 
uint16_t getNumberOfRevolutions (void)
 Get a new number of revolutions value. More...
 
uint16_t getFrameCounter (void)
 Get the frame counter value. Internal frame counter increments every update period. More...
 
void setFrameCounter (uint16_t fcnt)
 Set the frame counter value. More...
 
uint16_t getFrameSyncCounter (void)
 Get the frame synchronisation counter value Internal frame sub counter within one frame. More...
 
void setFrameSyncCounter (uint16_t fsync)
 Set the frame synchronisation counter value. More...
 
uint16_t getTemperatureValue (void)
 Get the temperature value as signed offset compensated temperature value Saturated between -30°C and above 140°C. More...
 
void setFilterDecimation (uint8_t firmd)
 Set the filter decimation, update rate setting. More...
 
uint8_t getFilterDecimation (void)
 Get the filter decimation, update rate setting. More...
 
void setIIFMod (uint8_t iifmod)
 Set the IIF (Incremental Interfave Mode) More...
 
uint8_t getIIFMod (void)
 Get the temperature value as signed offset compensated temperature value Saturated between -30°C and above 140°C. More...
 
void holdDSPU (void)
 Set DSPU on hold. More...
 
void releaseDSPU (void)
 release DSPU operations More...
 
bool isDSPUhold (void)
 Get the status of DSPU operations. More...
 
void setInternalClock (void)
 Set the clock source to internal oscillator. More...
 
void setExternalClock (void)
 Set clock sourec to external SCK. More...
 
bool statusClockSource (void)
 Get the status of the clock source. More...
 
void enableFilterParallel (void)
 Enable the Filter parallel diagnostics function. More...
 
void disableFilterParallel (void)
 disable the Filter parallel diagnostics function More...
 
bool isFilterParallel (void)
 Get the status of the Filter parallel diagnostics function. More...
 
void enableFilterInverted (void)
 Enable the Filter inverted diagnostics function. More...
 
void disableFilterInverted (void)
 disable the Filter inverted diagnostics function More...
 
bool isFilterInverted (void)
 Get the status of the Filter inverted diagnostics function. More...
 
void enableADCTestVector (void)
 Enable the ADC test vector diagnostics function. More...
 
void disableADCTestVector (void)
 disable the ADC test vector diagnostics function More...
 
bool isADCTestVector (void)
 Get the status of the ADC test vector diagnostics function. More...
 
void setFuseReload (void)
 Set the fuse reload register and trigger a reload. More...
 
bool getFulseReload (void)
 Get the status of the fuse reload register. More...
 
void setTestVectorX (uint8_t adctvx)
 Set the test vector x. More...
 
uint8_t getTestVectorX (void)
 Get the test vector x. More...
 
void setTestVectorY (uint8_t adctvs)
 Set the test vector s. More...
 
uint8_t getTestVectorY (void)
 Get the test vector y. More...
 
void directionClockwise (void)
 Set angle direction clockwise. More...
 
void directionConterClockwise (void)
 Set angle direction counter clockwise. More...
 
bool isAngleDirection (void)
 Get the angle direction. More...
 
void enablePrediction (void)
 Enable the angle prediction based on current speed. More...
 
void disablePrediction (void)
 disable the angle prediction More...
 
bool isPrediction (void)
 Get the status of angle perdiction. More...
 
void setAngleRange (angleRange_t range)
 Set the representation of the angle output value and the speed value. More...
 
angleRange_t getAngleRange (void)
 Get the representation of the angle range. More...
 
void setCalibrationMode (calibrationMode_t autocal)
 Set the automatic calibration mode. More...
 
calibrationMode_t getCalibrationMode (void)
 Get the actual automatic calibration mode. More...
 
void enableSpikeFilter (void)
 Enable the analog spike filter to filter voltage spikes in IFC, SCK, CS. More...
 
void disableSpikeFilter (void)
 disable the analog spike filter to filter More...
 
bool isSpikeFilter (void)
 Get the status of the analog spike filter. More...
 
void enableSSCOpenDrain (void)
 Enable open drain on SSC interface. More...
 
void enableSSCPushPull (void)
 Enable push pull on SSC interface. More...
 
bool isSSCOutputMode (void)
 Get the status of the SSC output mode. More...
 
void setAngleBase (uint16_t base)
 Set a new value for the angle base calibration. More...
 
uint16_t getAngleBase (void)
 Get the actual 0° angle position The 0° angle position is factory calibrated parallel to the edge of the chip. More...
 
void setPadDriver (uint8_t pad)
 Set a new pad driver configuration. More...
 
uint8_t getPadDriver (void)
 Get the pad driver configuration. More...
 
int16_t getOffsetX (void)
 Get offset correction x value. More...
 
void setOffsetX (int16_t offx)
 Set offset correction x value. More...
 
int16_t getOffsetY (void)
 Get offset correction y value. More...
 
void setOffsetY (int16_t offy)
 Set offset correction y value. More...
 
void setAmplitudeSynch (int16_t synch)
 Set amplitude correction value. More...
 
int16_t getAmplitudeSynch (void)
 Get amplitude correction value. More...
 
void setFIRUpdateRate (bool fir)
 Set the FIR (Filter Initial Rate) update rate. More...
 
uint8_t getFIRUpdateRate (void)
 Get the FIR update rate. More...
 
void enableIFABOpenDrain (void)
 Enable open drain in IFA, IFB and IFC. More...
 
void enableIFABPushPull (void)
 Enable push pull in IFA, IFB and IFC. More...
 
bool isIFABOutputMode (void)
 Get the status of the IFA, IFB and IFC output mode. More...
 
void setOrthogonality (int16_t ortho)
 Set the orthogonality correction of x y components. More...
 
int16_t getOrthogonality (void)
 Get the orthogonality correction of x y components. More...
 
void setHysteresisMode (uint8_t hyst)
 Set the hysteresis mode for HSM, or the unit time if in SPC mode (see manual) More...
 
uint8_t getHysteresisMode (void)
 Get the hysteresis mode for HSM, or the unit time if in SPC mode (see manual) More...
 
void setInterfaceMode (interfaceType_t ifmd)
 Set the interface Mode on IFA,IFB,IFC. More...
 
interfaceType_t getInterfaceMode (void)
 Get the interface Mode on IFA,IFB,IFC. More...
 
void setIFABres (uint8_t res)
 Set multipurpose register, PWM frequency, IIF resolution, SPC frame configuration. More...
 
uint8_t getIFABres (void)
 Get multipurpose register. More...
 
void setHSMplp (uint8_t plp)
 Set multipurpose register,. More...
 
uint8_t getHSMplp (void)
 Get multipurpose register. More...
 
void setOffsetTemperatureX (int8_t tcox)
 Set offset temperature coefficient for x component. More...
 
int8_t getOffsetTemperatureX (void)
 Get offset temperature coefficient for x component. More...
 
void setOffsetTemperatureY (int8_t tcoy)
 Set offset temperature coefficient for y component. More...
 
int8_t getOffsetTemperatureY (void)
 Get offset temperature coefficient for y component. More...
 
void enableStartupBist (void)
 Enable startup bist. More...
 
void disableStartupBist (void)
 Disable startup bist. More...
 
bool isStartupBist (void)
 Get the status of startup bist. More...
 
void setCRCpar (uint16_t crc)
 Set CRC of parameters from address 08h to 0Fh. More...
 
uint16_t getCRCpar (void)
 Get CRC of parameters from address 08h to 0Fh. More...
 
int16_t getADCx (void)
 Get GMR ADC x value. More...
 
int16_t getADCy (void)
 Get GMR ADC y value. More...
 
uint16_t getVectorMagnitude (void)
 Get angle vactor magnitude. More...
 
uint16_t getTemperatureRAW (void)
 Get Temperature Sensor raw value. More...
 
bool isTemperatureToggle (void)
 Is there a new Temperature Sensor RAW value. More...
 
uint16_t getCounterIncrements (void)
 Get Counter value of increments. More...
 
uint16_t getT25Offset (void)
 Get Temperature 25°C offset value. More...
 

◆ Reg::BitField_t

struct Reg::BitField_t

Bit field parameters.

Data Fields
uint8_t regAccess Bitfield register access *‍/.
uint16_t regAddress Bitfiled register address *‍/.
uint16_t mask Bitfield mask *‍/.
uint8_t position Bitfiled position *‍/.
uint8_t resetValue Bitfield register reset value *‍/.
uint8_t posMap Bitfield position of register in regMap *‍/.

◆ Reg::AddressField_t

struct Reg::AddressField_t

Register address field.

Data Fields
uint16_t regAddress Addressfield register address *‍/.
uint8_t posMap Addressfield register regMap position *‍/.

Enumeration Type Documentation

◆ calibrationMode_t

Automatic calibration of offset and amplitude synchronicity for applications with full-turn. Only 1 LSB corrected at each update. CRC check of calibration registers is automatically disabled if AUTOCAL activated.

Enumerator
noAutoCal 

noAutoCal = no auto-calibration

mode1 

mode1 update every angle update cycle (FIR_MD setting)

mode2 

mode2 update every 1.5 revolutions

mode3 

mode3 update every 11.25°

◆ angleRange_t

Enumerator
factor1 

magnetic angle from -180° to +180°, mapped values from -16384 to 16384

factor4 

magnetic angle from -45° to +45°, mapped values from -16384 to 16384

factor5 

magnetic angle from -180° to +180°, mapped values from -8192 to 8192

◆ interfaceType_t

List of possible interface types witch are preset by fuses and can be changed into each other.

Enumerator
IIF 

IIF Incremental Interface (IIF)

PWM 

PWM Pulse-Width-Modulation (PWM)

HSM 

HSM Hall Switch Mode (HSM)

SPC 

SPC Short-PWM-Code (SPC)

SSC 

SSC Synchronous Serial Communication (SSC)

◆ sensorType_t

Enumerator
TLE5012B_E1000 

TLE5012B_E1000 Sensor2Go variant.

TLE5012B_E3005 

TLE5012B_E3005.

TLE5012B_E5000 

TLE5012B_E5000 Sensor2Go variant.

TLE5012B_E5020 

TLE5012B_E5020.

TLE5012B_E9000 

TLE5012B_E9000 Sensor2Go variant.

◆ Access_t

Register access type.

Enumerator
REG_ACCESS_R 

Read access register *‍/.

REG_ACCESS_W 

Write access register *‍/.

REG_ACCESS_RW 

Read & write access register *‍/.

REG_ACCESS_U 

Update register *‍/.

REG_ACCESS_RU 

Read & update register *‍/.

REG_ACCESS_RWU 

Read & write & update register *‍/.

REG_ACCESS_RES 

Reserved access register *‍/.

◆ Addr_t

register address enumeration for all sensor registers

Enumerator
REG_STAT 

STAT status register.

REG_ACSTAT 

ACSTAT activation status register.

REG_AVAL 

AVAL angle value register.

REG_ASPD 

ASPD angle speed register.

REG_AREV 

AREV angle revolution register.

REG_FSYNC 

FSYNC frame synchronization register.

REG_MOD_1 

MOD_1 interface mode1 register.

REG_SIL 

SIL register.

REG_MOD_2 

MOD_2 interface mode2 register.

REG_MOD_3 

MOD_3 interface mode3 register.

REG_OFFX 

OFFX offset x.

REG_OFFY 

OFFY offset y.

REG_SYNCH 

SYNCH synchronicity.

REG_IFAB 

IFAB register.

REG_MOD_4 

MOD_4 interface mode4 register.

REG_TCO_Y 

TCO_Y temperature coefficient register.

REG_ADC_X 

ADC_X ADC X-raw value.

REG_ADC_Y 

ADC_Y ADC Y-raw value.

REG_D_MAG 

D_MAG angle vector magnitude.

REG_T_RAW 

T_RAW temperature sensor raw-value.

REG_IIF_CNT 

IIF_CNT IIF counter value.

REG_T25O 

T25O temperature 25°c offset value.

Function Documentation

◆ Reg()

Reg::Reg ( void *  p)

Construct a new Reg::Reg object.

Parameters
pnested pointer to parent

◆ ~Reg()

Reg::~Reg ( )

Destroy the Reg::Reg object.

◆ isStatusReset()

bool Reg::isStatusReset ( void  )

Indication that there was a reset state.

Returns
true indication of reset, power up power break firmware or active reset
false no reset since last readout

◆ isStatusWatchDog()

bool Reg::isStatusWatchDog ( void  )

Permanent check of watchdog.

Returns
true watchdog counter expired, ASRST must be activated
false normal operation

◆ isStatusVoltage()

bool Reg::isStatusVoltage ( void  )

Permanent check of internal and external supply voltages.

Returns
true over voltage, GND off
false voltages ok

◆ isStatusFuse()

bool Reg::isStatusFuse ( void  )

Cyclic CRC check of configuration registers and startup CRC.

Returns
true CRC fail
false CRC ok

◆ isStatusDSPU()

bool Reg::isStatusDSPU ( void  )

Check DSPU, CORDIC and CAPCOM at startup.

Returns
true DSPU self-test not ok or still running
false DSPU self-test ok

◆ isStatusOverflow()

bool Reg::isStatusOverflow ( void  )

Cyclic scheck of DSPU (Digital Signal Processing Unit) overflow.

Returns
true DSPU overflow occurred
false No DSPU overflow occurred

◆ isStatusXYOutOfLimit()

bool Reg::isStatusXYOutOfLimit ( void  )

Cyclic check of X and > raw values.

Returns
true X,Y data out of limit
false X,Y data ok

◆ isStatusMagnitideOutOfLimit()

bool Reg::isStatusMagnitideOutOfLimit ( void  )

Vector lengths cyclic check of X,Y values after error compensation.

Returns
true GMR-magnitude out of limit
false GMR magnitude ok

◆ isStatusADC()

bool Reg::isStatusADC ( void  )

Check signal path with test vectors.

Returns
true Test vetors out of limit
false Test vectors ok

◆ isStatusROM()

bool Reg::isStatusROM ( void  )

Check of ROM-CRC at statup.

Returns
true CRC fail or running
false CRC ok

◆ isStatusGMRXY()

bool Reg::isStatusGMRXY ( void  )

No valid GMR X,Y values, cyclic check of ADC input.

Returns
true no valid GMR X,Y values
false valid GMR X,Y value

◆ isStatusGMRA()

bool Reg::isStatusGMRA ( void  )

No value GMR angle value, cyclic check of DSPU output.

Returns
true no valid GMR angle values on the interface
false valid GMR angle values

◆ isStatusRead()

bool Reg::isStatusRead ( void  )

Read status, checks if any status register changed since last readout.

Returns
true status values changed since last readout
false status values not changed

◆ getSlaveNumber()

uint8_t Reg::getSlaveNumber ( void  )

Get the actual slave number of the sensor. Up to four sensors can be selected via this register field.

Returns
uint8_t

◆ setSlaveNumber()

void Reg::setSlaveNumber ( const uint8_t  snr)

Set the slave number of the sensor. Up to four sensors can be selected with this register field.

Parameters
snrSlave number between 0 and 3

◆ isActivationReset()

bool Reg::isActivationReset ( void  )

Hardware reset, will be performed after chip select returns to high.

Returns
true activation of harware reset
false after reset, thus always returns false

◆ setActivationReset()

void Reg::setActivationReset ( void  )

Set the Activation Reset object Performs a hardware reset.

◆ enableWatchdog()

void Reg::enableWatchdog ( void  )

Enable the DSPU watchdog.

◆ disableWatchdog()

void Reg::disableWatchdog ( void  )

disable the DSPU watchdog

◆ isWatchdog()

bool Reg::isWatchdog ( void  )

Get the status of the DSPU watchdog.

Returns
true DSPU watchdog is enabled
false DSPU watchdog is disabled

◆ enableVoltageCheck()

void Reg::enableVoltageCheck ( void  )

Enable the voltage regulator check.

◆ disableVoltageCheck()

void Reg::disableVoltageCheck ( void  )

disable the voltage regulator check

◆ isVoltageCheck()

bool Reg::isVoltageCheck ( void  )

Get the status of the voltage regulator check.

Returns
true voltage regulator check is enabled
false voltage regulator check is disabled

◆ enableFuseCRC()

void Reg::enableFuseCRC ( void  )

Enable the fuse CRC check.

◆ disableFuseCRC()

void Reg::disableFuseCRC ( void  )

disable the fuse CRC check

◆ isFuseCRC()

bool Reg::isFuseCRC ( void  )

Get the status of the fuse CRC check.

Returns
true fuse CRC check is enabled
false fuse CRC check is disabled

◆ enableDSPUbist()

void Reg::enableDSPUbist ( void  )

Enable the DSPU bist check.

◆ disableDSPUbist()

void Reg::disableDSPUbist ( void  )

disable the DSPU bist check

◆ isDSPUbist()

bool Reg::isDSPUbist ( void  )

Get the status of the DSPU bist check.

Returns
true DSPU bist check is enabled
false DSPU bist check is disabled

◆ enableDSPUoverflow()

void Reg::enableDSPUoverflow ( void  )

Enable the DSPU overflow check.

◆ disableDSPUoverflow()

void Reg::disableDSPUoverflow ( void  )

disable the DSPU overflow check

◆ isDSPUoverflow()

bool Reg::isDSPUoverflow ( void  )

Get the status of the DSPU overflow check.

Returns
true DSPU overflow check is enabled
false DSPU overflow check is disabled

◆ enableXYCheck()

void Reg::enableXYCheck ( void  )

Enable the X,Y out of limit check.

◆ disableXYCheck()

void Reg::disableXYCheck ( void  )

disable the X,Y out of limit check

◆ isXYCheck()

bool Reg::isXYCheck ( void  )

Get the status of the X,Y out of limit check.

Returns
true X,Y out of limit check is enabled
false X,Y out of limit check is disabled

◆ enableGMRCheck()

void Reg::enableGMRCheck ( void  )

Enable the GMR magnitude check.

◆ disableGMRCheck()

void Reg::disableGMRCheck ( void  )

disable the GMR magnitude check

◆ isGMRCheck()

bool Reg::isGMRCheck ( void  )

Get the status of the GMR magnitude check.

Returns
true GMR magnitude check is enabled
false GMR magnitude check is disabled

◆ enableADCCheck()

void Reg::enableADCCheck ( void  )

Enable the ADC test vector check.

◆ disableADCCheck()

void Reg::disableADCCheck ( void  )

disable the ADC test vector check

◆ isADCCheck()

bool Reg::isADCCheck ( void  )

Get the status of the ADC test vectorGMR magnitude check.

Returns
true ADC test vector check is enabled
false ADC test vector check is disabled

◆ activateFirmwareReset()

void Reg::activateFirmwareReset ( void  )

Activate the firmware reset, all configuration registers retain their contents. Will also set the SRST register.

◆ isFirmwareReset()

bool Reg::isFirmwareReset ( void  )

Get the status of the firmware reset register.

Returns
true activation on firmware reset
false default after execution of reset

◆ isAngleValueNew()

bool Reg::isAngleValueNew ( void  )

Do we have a new calculated angle value since last readout.

Returns
true new angle value available
false no new angle value calculated

◆ getAngleValue()

uint16_t Reg::getAngleValue ( void  )

Get a new calculated angle value.

Returns
uint16_t calculated angle value

◆ isSpeedValueNew()

bool Reg::isSpeedValueNew ( void  )

Do we have a new calculated speed value since last readout.

Returns
true new speed value available
false no new speed value calculated

◆ getSpeedValue()

uint16_t Reg::getSpeedValue ( void  )

Get a new calculated speed value.

Returns
uint16_t calculated speed value

◆ isNumberOfRevolutionsNew()

bool Reg::isNumberOfRevolutionsNew ( void  )

Do we have a new number of revolutions since last readout.

Returns
true new number of revolutions available
false no number of revolutions

◆ getNumberOfRevolutions()

uint16_t Reg::getNumberOfRevolutions ( void  )

Get a new number of revolutions value.

Returns
uint16_t number of revolutions

◆ getFrameCounter()

uint16_t Reg::getFrameCounter ( void  )

Get the frame counter value. Internal frame counter increments every update period.

Returns
uint16_t frame counter

◆ setFrameCounter()

void Reg::setFrameCounter ( uint16_t  fcnt)

Set the frame counter value.

◆ getFrameSyncCounter()

uint16_t Reg::getFrameSyncCounter ( void  )

Get the frame synchronisation counter value Internal frame sub counter within one frame.

Returns
uint16_t frame synchronisation counter

◆ setFrameSyncCounter()

void Reg::setFrameSyncCounter ( uint16_t  fsync)

Set the frame synchronisation counter value.

◆ getTemperatureValue()

uint16_t Reg::getTemperatureValue ( void  )

Get the temperature value as signed offset compensated temperature value Saturated between -30°C and above 140°C.

Returns
uint16_t temperature value

◆ setFilterDecimation()

void Reg::setFilterDecimation ( uint8_t  firmd)

Set the filter decimation, update rate setting.

◆ getFilterDecimation()

uint8_t Reg::getFilterDecimation ( void  )

Get the filter decimation, update rate setting.

Returns
uint16_t filter decimation

◆ setIIFMod()

void Reg::setIIFMod ( uint8_t  iifmod)

Set the IIF (Incremental Interfave Mode)

◆ getIIFMod()

uint8_t Reg::getIIFMod ( void  )

Get the temperature value as signed offset compensated temperature value Saturated between -30°C and above 140°C.

Returns
uint16_t IIF mode

◆ holdDSPU()

void Reg::holdDSPU ( void  )

Set DSPU on hold.

◆ releaseDSPU()

void Reg::releaseDSPU ( void  )

release DSPU operations

◆ isDSPUhold()

bool Reg::isDSPUhold ( void  )

Get the status of DSPU operations.

Returns
true DSPU is on hold
false DSPU is in operation

◆ setInternalClock()

void Reg::setInternalClock ( void  )

Set the clock source to internal oscillator.

◆ setExternalClock()

void Reg::setExternalClock ( void  )

Set clock sourec to external SCK.

◆ statusClockSource()

bool Reg::statusClockSource ( void  )

Get the status of the clock source.

Returns
true external 4MHz clock on pin IFC selected
false internal oscillator

◆ enableFilterParallel()

void Reg::enableFilterParallel ( void  )

Enable the Filter parallel diagnostics function.

◆ disableFilterParallel()

void Reg::disableFilterParallel ( void  )

disable the Filter parallel diagnostics function

◆ isFilterParallel()

bool Reg::isFilterParallel ( void  )

Get the status of the Filter parallel diagnostics function.

Returns
true filter parallel is enabled
false filter parallel is disabled

◆ enableFilterInverted()

void Reg::enableFilterInverted ( void  )

Enable the Filter inverted diagnostics function.

◆ disableFilterInverted()

void Reg::disableFilterInverted ( void  )

disable the Filter inverted diagnostics function

◆ isFilterInverted()

bool Reg::isFilterInverted ( void  )

Get the status of the Filter inverted diagnostics function.

Returns
true filter inverted is enabled
false filter inverted is disabled

◆ enableADCTestVector()

void Reg::enableADCTestVector ( void  )

Enable the ADC test vector diagnostics function.

◆ disableADCTestVector()

void Reg::disableADCTestVector ( void  )

disable the ADC test vector diagnostics function

◆ isADCTestVector()

bool Reg::isADCTestVector ( void  )

Get the status of the ADC test vector diagnostics function.

Returns
true ADC test vector is enabled
false ADC test vector is disabled

◆ setFuseReload()

void Reg::setFuseReload ( void  )

Set the fuse reload register and trigger a reload.

◆ getFulseReload()

bool Reg::getFulseReload ( void  )

Get the status of the fuse reload register.

Returns
true reload of registers from fuses immediately
false normal operations

◆ setTestVectorX()

void Reg::setTestVectorX ( uint8_t  adctvx)

Set the test vector x.

◆ getTestVectorX()

uint8_t Reg::getTestVectorX ( void  )

Get the test vector x.

Returns
uint8_t test vector x

◆ setTestVectorY()

void Reg::setTestVectorY ( uint8_t  adctvs)

Set the test vector s.

◆ getTestVectorY()

uint8_t Reg::getTestVectorY ( void  )

Get the test vector y.

Returns
uint8_t test vector y

◆ directionClockwise()

void Reg::directionClockwise ( void  )

Set angle direction clockwise.

◆ directionConterClockwise()

void Reg::directionConterClockwise ( void  )

Set angle direction counter clockwise.

◆ isAngleDirection()

bool Reg::isAngleDirection ( void  )

Get the angle direction.

Returns
true angle direction is clockwise
false angle direction is counter clockwise

◆ enablePrediction()

void Reg::enablePrediction ( void  )

Enable the angle prediction based on current speed.

◆ disablePrediction()

void Reg::disablePrediction ( void  )

disable the angle prediction

◆ isPrediction()

bool Reg::isPrediction ( void  )

Get the status of angle perdiction.

Returns
true perdiction is enabled
false perdiction is disabled

◆ setAngleRange()

void Reg::setAngleRange ( angleRange_t  range)

Set the representation of the angle output value and the speed value.

◆ getAngleRange()

Reg::angleRange_t Reg::getAngleRange ( void  )

Get the representation of the angle range.

Returns
angleRange_t type of angle range

◆ setCalibrationMode()

void Reg::setCalibrationMode ( calibrationMode_t  autocal)

Set the automatic calibration mode.

◆ getCalibrationMode()

Reg::calibrationMode_t Reg::getCalibrationMode ( void  )

Get the actual automatic calibration mode.

Returns
angleRange_t type of calibration mode

◆ enableSpikeFilter()

void Reg::enableSpikeFilter ( void  )

Enable the analog spike filter to filter voltage spikes in IFC, SCK, CS.

◆ disableSpikeFilter()

void Reg::disableSpikeFilter ( void  )

disable the analog spike filter to filter

◆ isSpikeFilter()

bool Reg::isSpikeFilter ( void  )

Get the status of the analog spike filter.

Returns
true spike filter is enabled
false spike filter is disabled

◆ enableSSCOpenDrain()

void Reg::enableSSCOpenDrain ( void  )

Enable open drain on SSC interface.

◆ enableSSCPushPull()

void Reg::enableSSCPushPull ( void  )

Enable push pull on SSC interface.

◆ isSSCOutputMode()

bool Reg::isSSCOutputMode ( void  )

Get the status of the SSC output mode.

Returns
true SSC open drain
false SSC push pull default

◆ setAngleBase()

void Reg::setAngleBase ( uint16_t  base)

Set a new value for the angle base calibration.

◆ getAngleBase()

uint16_t Reg::getAngleBase ( void  )

Get the actual 0° angle position The 0° angle position is factory calibrated parallel to the edge of the chip.

Returns
uint16_t angle base calibration

◆ setPadDriver()

void Reg::setPadDriver ( uint8_t  pad)

Set a new pad driver configuration.

◆ getPadDriver()

uint8_t Reg::getPadDriver ( void  )

Get the pad driver configuration.

Returns
uint8_t pad driver

◆ getOffsetX()

int16_t Reg::getOffsetX ( void  )

Get offset correction x value.

Returns
int16_t offset x value

◆ setOffsetX()

void Reg::setOffsetX ( int16_t  offx)

Set offset correction x value.

◆ getOffsetY()

int16_t Reg::getOffsetY ( void  )

Get offset correction y value.

Returns
int16_t offset y value

◆ setOffsetY()

void Reg::setOffsetY ( int16_t  offy)

Set offset correction y value.

◆ setAmplitudeSynch()

void Reg::setAmplitudeSynch ( int16_t  synch)

Set amplitude correction value.

◆ getAmplitudeSynch()

int16_t Reg::getAmplitudeSynch ( void  )

Get amplitude correction value.

Returns
int16_t offset y value

◆ setFIRUpdateRate()

void Reg::setFIRUpdateRate ( bool  fir)

Set the FIR (Filter Initial Rate) update rate.

◆ getFIRUpdateRate()

uint8_t Reg::getFIRUpdateRate ( void  )

Get the FIR update rate.

Returns
uint8_t(bool) FIR update rate

◆ enableIFABOpenDrain()

void Reg::enableIFABOpenDrain ( void  )

Enable open drain in IFA, IFB and IFC.

◆ enableIFABPushPull()

void Reg::enableIFABPushPull ( void  )

Enable push pull in IFA, IFB and IFC.

◆ isIFABOutputMode()

bool Reg::isIFABOutputMode ( void  )

Get the status of the IFA, IFB and IFC output mode.

Returns
true IFA, IFB and IFC open drain
false IFA, IFB and IFC push pull default

◆ setOrthogonality()

void Reg::setOrthogonality ( int16_t  ortho)

Set the orthogonality correction of x y components.

◆ getOrthogonality()

int16_t Reg::getOrthogonality ( void  )

Get the orthogonality correction of x y components.

Returns
int16_t orthogonality correction

◆ setHysteresisMode()

void Reg::setHysteresisMode ( uint8_t  hyst)

Set the hysteresis mode for HSM, or the unit time if in SPC mode (see manual)

◆ getHysteresisMode()

uint8_t Reg::getHysteresisMode ( void  )

Get the hysteresis mode for HSM, or the unit time if in SPC mode (see manual)

Returns
uint8_t hysteresis mode/unit time

◆ setInterfaceMode()

void Reg::setInterfaceMode ( interfaceType_t  ifmd)

Set the interface Mode on IFA,IFB,IFC.

◆ getInterfaceMode()

Reg::interfaceType_t Reg::getInterfaceMode ( void  )

Get the interface Mode on IFA,IFB,IFC.

Returns
interfaceType_t interface type

◆ setIFABres()

void Reg::setIFABres ( uint8_t  res)

Set multipurpose register, PWM frequency, IIF resolution, SPC frame configuration.

◆ getIFABres()

uint8_t Reg::getIFABres ( void  )

Get multipurpose register.

Returns
uint8_t multipurpose, PWM frequency, IIF resolution, SPC frame configuration

◆ setHSMplp()

void Reg::setHSMplp ( uint8_t  plp)

Set multipurpose register,.

◆ getHSMplp()

uint8_t Reg::getHSMplp ( void  )

Get multipurpose register.

Returns
uint8_t multipurpose, PWM frequency, IIF resolution, SPC frame configuration

◆ setOffsetTemperatureX()

void Reg::setOffsetTemperatureX ( int8_t  tcox)

Set offset temperature coefficient for x component.

◆ getOffsetTemperatureX()

int8_t Reg::getOffsetTemperatureX ( void  )

Get offset temperature coefficient for x component.

Returns
int8_t x temperature coefficient

◆ setOffsetTemperatureY()

void Reg::setOffsetTemperatureY ( int8_t  tcoy)

Set offset temperature coefficient for y component.

◆ getOffsetTemperatureY()

int8_t Reg::getOffsetTemperatureY ( void  )

Get offset temperature coefficient for y component.

Returns
int8_t x temperature coefficient

◆ enableStartupBist()

void Reg::enableStartupBist ( void  )

Enable startup bist.

◆ disableStartupBist()

void Reg::disableStartupBist ( void  )

Disable startup bist.

◆ isStartupBist()

bool Reg::isStartupBist ( void  )

Get the status of startup bist.

Returns
true Bist enabled
false Bist disabled

◆ setCRCpar()

void Reg::setCRCpar ( uint16_t  crc)

Set CRC of parameters from address 08h to 0Fh.

◆ getCRCpar()

uint16_t Reg::getCRCpar ( void  )

Get CRC of parameters from address 08h to 0Fh.

Returns
uint16_t CRC

◆ getADCx()

int16_t Reg::getADCx ( void  )

Get GMR ADC x value.

Returns
uint16_t ADC x

◆ getADCy()

int16_t Reg::getADCy ( void  )

Get GMR ADC y value.

Returns
uint16_t ADC y

◆ getVectorMagnitude()

uint16_t Reg::getVectorMagnitude ( void  )

Get angle vactor magnitude.

Returns
uint16_t MAG

◆ getTemperatureRAW()

uint16_t Reg::getTemperatureRAW ( void  )

Get Temperature Sensor raw value.

Returns
uint16_t Temperature raw value

◆ isTemperatureToggle()

bool Reg::isTemperatureToggle ( void  )

Is there a new Temperature Sensor RAW value.

Returns
true Bist enabled
false Bist disabled

◆ getCounterIncrements()

uint16_t Reg::getCounterIncrements ( void  )

Get Counter value of increments.

Returns
uint16_t Temperature raw value

◆ getT25Offset()

uint16_t Reg::getT25Offset ( void  )

Get Temperature 25°C offset value.

Returns
uint16_t T25 offset value

Variable Documentation

◆ p

void* Reg::p

◆ regAccess

uint8_t Reg::BitField_t::regAccess

Bitfield register access *‍/.

◆ regAddress [1/2]

uint16_t Reg::BitField_t::regAddress

Bitfiled register address *‍/.

◆ mask

uint16_t Reg::BitField_t::mask

Bitfield mask *‍/.

◆ position

uint8_t Reg::BitField_t::position

Bitfiled position *‍/.

◆ resetValue

uint8_t Reg::BitField_t::resetValue

Bitfield register reset value *‍/.

◆ posMap [1/2]

uint8_t Reg::BitField_t::posMap

Bitfield position of register in regMap *‍/.

◆ regAddress [2/2]

uint16_t Reg::AddressField_t::regAddress

Addressfield register address *‍/.

◆ posMap [2/2]

uint8_t Reg::AddressField_t::posMap

Addressfield register regMap position *‍/.

◆ addrFields

const Reg::AddressField_t Reg::addrFields
static
Initial value:
=
{
{REG_STAT, 1 },
{REG_ACSTAT, 2 },
{REG_AVAL, 3 },
{REG_ASPD, 4 },
{REG_AREV, 5 },
{REG_FSYNC, 6 },
{REG_MOD_1, 7 },
{REG_SIL, 8 },
{REG_MOD_2, 9 },
{REG_MOD_3, 10 },
{REG_OFFX, 11 },
{REG_OFFY, 12 },
{REG_SYNCH, 13 },
{REG_IFAB, 14 },
{REG_MOD_4, 15 },
{REG_TCO_Y, 16 },
{REG_ADC_X, 17 },
{REG_ADC_Y, 18 },
{REG_D_MAG, 19 },
{REG_T_RAW, 20 },
{REG_IIF_CNT, 21 },
{REG_T25O, 22 },
}
@ REG_MOD_4
MOD_4 interface mode4 register.
Definition: tle5012b_reg.hpp:142
@ REG_AVAL
AVAL angle value register.
Definition: tle5012b_reg.hpp:130
@ REG_IIF_CNT
IIF_CNT IIF counter value.
Definition: tle5012b_reg.hpp:148
@ REG_T25O
T25O temperature 25°c offset value.
Definition: tle5012b_reg.hpp:149
@ REG_SIL
SIL register.
Definition: tle5012b_reg.hpp:135
@ REG_IFAB
IFAB register.
Definition: tle5012b_reg.hpp:141
@ REG_ASPD
ASPD angle speed register.
Definition: tle5012b_reg.hpp:131
@ REG_T_RAW
T_RAW temperature sensor raw-value.
Definition: tle5012b_reg.hpp:147
@ REG_MOD_3
MOD_3 interface mode3 register.
Definition: tle5012b_reg.hpp:137
@ REG_D_MAG
D_MAG angle vector magnitude.
Definition: tle5012b_reg.hpp:146
@ REG_MOD_2
MOD_2 interface mode2 register.
Definition: tle5012b_reg.hpp:136
@ REG_SYNCH
SYNCH synchronicity.
Definition: tle5012b_reg.hpp:140
@ REG_OFFY
OFFY offset y.
Definition: tle5012b_reg.hpp:139
@ REG_ADC_X
ADC_X ADC X-raw value.
Definition: tle5012b_reg.hpp:144
@ REG_AREV
AREV angle revolution register.
Definition: tle5012b_reg.hpp:132
@ REG_OFFX
OFFX offset x.
Definition: tle5012b_reg.hpp:138
@ REG_MOD_1
MOD_1 interface mode1 register.
Definition: tle5012b_reg.hpp:134
@ REG_FSYNC
FSYNC frame synchronization register.
Definition: tle5012b_reg.hpp:133
@ REG_STAT
STAT status register.
Definition: tle5012b_reg.hpp:128
@ REG_ACSTAT
ACSTAT activation status register.
Definition: tle5012b_reg.hpp:129
@ REG_ADC_Y
ADC_Y ADC Y-raw value.
Definition: tle5012b_reg.hpp:145
@ REG_TCO_Y
TCO_Y temperature coefficient register.
Definition: tle5012b_reg.hpp:143

Registers bitfields.

◆ regMap

uint16_t Reg::regMap[MAX_NUM_REG]

Register map *‍/.