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_reg.hpp
Go to the documentation of this file.
1 
21 #ifndef TLE5012B_REG_HPP
22 #define TLE5012B_REG_HPP
23 
24 #include <stdint.h>
25 #include <stdlib.h>
26 #include "TLE5012b.hpp"
27 
34 class Reg
35 {
36  public:
37 
38  void *p;
39 
46  {
47  noAutoCal = 0x0,
50  mode3
51  };
52 
54  {
55  factor1 = 0x080,
56  factor4 = 0x200,
57  factor5 = 0x040
58  };
59 
65  {
66  IIF = 0,
67  PWM,
68  HSM,
69  SPC,
70  SSC
71  };
72 
75  {
81  };
82 
86  enum Access_t
87  {
88  REG_ACCESS_R = (0x01U),
89  REG_ACCESS_W = (0x02U),
90  REG_ACCESS_RW = (0x03U),
91  REG_ACCESS_U = (0x04U),
92  REG_ACCESS_RU = (0x05U),
93  REG_ACCESS_RWU = (0x07U),
94  REG_ACCESS_RES = (0x10U)
95  };
96 
100  typedef struct
101  {
102  uint8_t regAccess;
103  uint16_t regAddress;
104  uint16_t mask;
105  uint8_t position;
106  uint8_t resetValue;
107  uint8_t posMap;
108  }BitField_t;
109 
114  typedef struct
115  {
116  uint16_t regAddress;
117  uint8_t posMap;
119 
120  static const AddressField_t addrFields[];
121 
126  enum Addr_t
127  {
128  REG_STAT = (0x0000U),
129  REG_ACSTAT = (0x0010U),
130  REG_AVAL = (0x0020U),
131  REG_ASPD = (0x0030U),
132  REG_AREV = (0x0040U),
133  REG_FSYNC = (0x0050U),
134  REG_MOD_1 = (0x0060U),
135  REG_SIL = (0x0070U),
136  REG_MOD_2 = (0x0080U),
137  REG_MOD_3 = (0x0090U),
138  REG_OFFX = (0x00A0U),
139  REG_OFFY = (0x00B0U),
140  REG_SYNCH = (0x00C0U),
141  REG_IFAB = (0x00D0U),
142  REG_MOD_4 = (0x00E0U),
143  REG_TCO_Y = (0x00F0U),
144  REG_ADC_X = (0x0100U),
145  REG_ADC_Y = (0x0110U),
146  REG_D_MAG = (0x0140U),
147  REG_T_RAW = (0x0150U),
148  REG_IIF_CNT = (0x0200U),
149  REG_T25O = (0x0300U)
150  };
151 
152  uint16_t regMap[MAX_NUM_REG];
153 
154  Reg(void* p);
155  ~Reg();
156 
157  // REG_STAT
158  bool isStatusReset(void);
159  bool isStatusWatchDog(void);
160  bool isStatusVoltage(void);
161  bool isStatusFuse(void);
162  bool isStatusDSPU(void);
163  bool isStatusOverflow(void);
164  bool isStatusXYOutOfLimit(void);
165  bool isStatusMagnitideOutOfLimit(void);
166  bool isStatusADC(void);
167  bool isStatusROM(void);
168  bool isStatusGMRXY(void);
169  bool isStatusGMRA(void);
170  bool isStatusRead(void);
171  uint8_t getSlaveNumber(void);
172  void setSlaveNumber(const uint8_t snr);
173 
174  // REG_ACSTAT
175  bool isActivationReset(void);
176  void setActivationReset(void);
177  void enableWatchdog(void);
178  void disableWatchdog(void);
179  bool isWatchdog(void);
180  void enableVoltageCheck(void);
181  void disableVoltageCheck(void);
182  bool isVoltageCheck(void);
183  void enableFuseCRC(void);
184  void disableFuseCRC(void);
185  bool isFuseCRC(void);
186  void enableDSPUbist(void);
187  void disableDSPUbist(void);
188  bool isDSPUbist(void);
189  void enableDSPUoverflow(void);
190  void disableDSPUoverflow(void);
191  bool isDSPUoverflow(void);
192  void enableXYCheck(void);
193  void disableXYCheck(void);
194  bool isXYCheck(void);
195  void enableGMRCheck(void);
196  void disableGMRCheck(void);
197  bool isGMRCheck(void);
198  void enableADCCheck(void);
199  void disableADCCheck(void);
200  bool isADCCheck(void);
201  void activateFirmwareReset(void);
202  bool isFirmwareReset(void);
203 
204  // REG_AVAL
205  bool isAngleValueNew(void);
206  uint16_t getAngleValue(void);
207 
208  // REG_ASPD
209  bool isSpeedValueNew(void);
210  uint16_t getSpeedValue(void);
211 
212  // REG_AREV
213  bool isNumberOfRevolutionsNew(void);
214  uint16_t getNumberOfRevolutions(void);
215  uint16_t getFrameCounter(void);
216  void setFrameCounter(uint16_t fcnt);
217 
218  // REG_FSYNC
219  uint16_t getFrameSyncCounter(void);
220  void setFrameSyncCounter(uint16_t fsync);
221  uint16_t getTemperatureValue(void);
222 
223  // REG_MOD_1
224  void setFilterDecimation(uint8_t firmd);
225  uint8_t getFilterDecimation(void);
226  void setIIFMod(uint8_t iifmod);
227  uint8_t getIIFMod(void);
228  void holdDSPU(void);
229  void releaseDSPU(void);
230  bool isDSPUhold(void);
231  void setInternalClock(void);
232  void setExternalClock(void);
233  bool statusClockSource(void);
234 
235  // REG_SIL
236  void enableFilterParallel(void);
237  void disableFilterParallel(void);
238  bool isFilterParallel(void);
239  void enableFilterInverted(void);
240  void disableFilterInverted(void);
241  bool isFilterInverted(void);
242  void enableADCTestVector(void);
243  void disableADCTestVector(void);
244  bool isADCTestVector(void);
245  void setFuseReload(void);
246  bool getFulseReload(void);
247  void setTestVectorX(uint8_t adctvx);
248  uint8_t getTestVectorX(void);
249  void setTestVectorY(uint8_t adctvs);
250  uint8_t getTestVectorY(void);
251 
252  // REG_MOD_2
253  void directionClockwise(void);
254  void directionConterClockwise(void);
255  bool isAngleDirection(void);
256  void enablePrediction(void);
257  void disablePrediction(void);
258  bool isPrediction(void);
259  void setAngleRange(angleRange_t range);
263 
264  // REG_MOD_3
265  void enableSpikeFilter(void);
266  void disableSpikeFilter(void);
267  bool isSpikeFilter(void);
268  void enableSSCOpenDrain(void);
269  void enableSSCPushPull(void);
270  bool isSSCOutputMode(void);
271  void setAngleBase(uint16_t base);
272  uint16_t getAngleBase(void);
273  void setPadDriver(uint8_t pad);
274  uint8_t getPadDriver(void);
275 
276  // REG_OFFX
277  int16_t getOffsetX(void);
278  void setOffsetX(int16_t offx);
279 
280  // REG_OFFY
281  int16_t getOffsetY(void);
282  void setOffsetY(int16_t offy);
283 
284  // REG_SYNCH
285  void setAmplitudeSynch(int16_t synch);
286  int16_t getAmplitudeSynch(void);
287 
288  // REG_IFAB
289  void setFIRUpdateRate(bool fir);
290  uint8_t getFIRUpdateRate(void);
291  void enableIFABOpenDrain(void);
292  void enableIFABPushPull(void);
293  bool isIFABOutputMode(void);
294  void setOrthogonality(int16_t ortho);
295  int16_t getOrthogonality(void);
296  void setHysteresisMode(uint8_t hyst);
297  uint8_t getHysteresisMode(void);
298 
299  // REG_MOD_4
302  void setIFABres(uint8_t res);
303  uint8_t getIFABres(void);
304  void setHSMplp(uint8_t plp);
305  uint8_t getHSMplp(void);
306  void setOffsetTemperatureX(int8_t tcox);
307  int8_t getOffsetTemperatureX(void);
308 
309  // REG_TCO_Y
310  void setOffsetTemperatureY(int8_t tcoy);
311  int8_t getOffsetTemperatureY(void);
312  void enableStartupBist(void);
313  void disableStartupBist(void);
314  bool isStartupBist(void);
315  void setCRCpar(uint16_t crc);
316  uint16_t getCRCpar(void);
317 
318  // REG_ADC_X REG_ADC_Y
319  int16_t getADCx(void);
320  int16_t getADCy(void);
321 
322  // REG_D_MAG
323  uint16_t getVectorMagnitude(void);
324  uint16_t getTemperatureRAW(void);
325  bool isTemperatureToggle(void);
326 
327  // REG_T25O
328  uint16_t getCounterIncrements(void);
329  uint16_t getT25Offset(void);
330 
331  private:
332 
333  static const BitField_t bitFields[];
334 
338  enum BitFieldReg_t
339  {
340  REG_STAT_SRST,
341  REG_STAT_SWD,
342  REG_STAT_SVR,
343  REG_STAT_SFUSE,
344  REG_STAT_SDSPU,
345  REG_STAT_SOV,
346  REG_STAT_SXYOL,
347  REG_STAT_SMAGOL,
348  REG_STAT_RESERVED,
349  REG_STAT_SADCT,
350  REG_STAT_SROM,
351  REG_STAT_NOGMRXY,
352  REG_STAT_NOGMRA,
353  REG_STAT_SNR,
354  REG_STAT_RDST,
355 
356  REG_ACSTAT_ASRST,
357  REG_ACSTAT_ASWD,
358  REG_ACSTAT_ASVR,
359  REG_ACSTAT_ASFUSE,
360  REG_ACSTAT_ASDSPU,
361  REG_ACSTAT_ASOV,
362  REG_ACSTAT_ASVECXY,
363  REG_ACSTAT_ASVEGMAG,
364  REG_ACSTAT_RESERVED1,
365  REG_ACSTAT_ASADCT,
366  REG_ACSTAT_ASFRST,
367  REG_ACSTAT_RESERVED2,
368 
369  REG_AVAL_ANGVAL,
370  REG_AVAL_RDAV,
371 
372  REG_ASPD_ANGSPD,
373  REG_ASPD_RDAS,
374 
375  REG_AREV_REVOL,
376  REG_AREV_FCNT,
377  REG_AREV_RDREV,
378 
379  REG_FSYNC_TEMPR,
380  REG_FSYNC_FSYNC,
381 
382  REG_MOD_1_IIFMOD,
383  REG_MOD_1_DSPUHOLD,
384  REG_MOD_1_RESERVED1,
385  REG_MOD_1_CLKSEL,
386  REG_MOD_1_RESERVED2,
387  REG_MOD_1_FIRMD,
388 
389  REG_SIL_ADCTVX,
390  REG_SIL_ADCTVY,
391  REG_SIL_ADCTVEN,
392  REG_SIL_RESERVED1,
393  REG_SIL_FUSEREL,
394  REG_SIL_RESERVED2,
395  REG_SIL_FILTINV,
396  REG_SIL_FILTPAR,
397 
398  REG_MOD_2_AUTOCAL,
399  REG_MOD_2_PREDICT,
400  REG_MOD_2_ANGDIR,
401  REG_MOD_2_ANGRANGE,
402  REG_MOD_2_RESERVED1,
403 
404  REG_MOD_3_PADDRV,
405  REG_MOD_3_SSCOD,
406  REG_MOD_3_SPIKEF,
407  REG_MOD_3_ANG_BASE,
408 
409  REG_OFFX_RESERVED1,
410  REG_OFFX_XOFFSET,
411 
412  REG_OFFY_RESERVED1,
413  REG_OFFY_YOFFSET,
414 
415  REG_SYNCH_RESERVED1,
416  REG_SYNCH_SYNCH,
417 
418  REG_IFAB_IFADHYST,
419  REG_IFAB_IFABOD,
420  REG_IFAB_FIRUDR,
421  REG_IFAB_ORTHO,
422 
423  REG_MOD_4_IFMD,
424  REG_MOD_4_RESERVED1,
425  REG_MOD_4_IFABRES,
426  REG_MOD_4_HSMPLP,
427  REG_MOD_4_TCOXT,
428 
429  REG_TCO_Y_CRCPAR,
430  REG_TCO_Y_SBIST,
431  REG_TCO_Y_TCOYT,
432 
433  REG_ADC_X_ADCX,
434 
435  REG_ADC_Y_ADCY,
436 
437  REG_D_MAG_MAG,
438  REG_D_MAG_RESERVED1,
439 
440  REG_T_RAW_TRAW,
441  REG_T_RAW_RESERVED1,
442  REG_T_RAW_TTGL,
443 
444  REG_IIF_CNT_IIFCNT,
445  REG_IIF_CNT_RESERVED1,
446 
447  REG_T25O_T250,
448  REG_T25O_RESERVED1,
449  };
450 
451  bool getBitField (BitField_t bitField, uint16_t & bitFValue);
452  bool setBitField (BitField_t bitField, uint16_t bitFNewValue);
453 
454  void* parent_;
455 
456 };
457 
462 #endif /* TLE5012B_REG_HPP */
Bit field parameters.
Definition: tle5012b_reg.hpp:101
Definition: tle5012b_reg.hpp:35
Register address field.
Definition: tle5012b_reg.hpp:115
void disablePrediction(void)
disable the angle prediction
Definition: tle5012b_reg.cpp:1166
bool isSSCOutputMode(void)
Get the status of the SSC output mode.
Definition: tle5012b_reg.cpp:1281
void setTestVectorY(uint8_t adctvs)
Set the test vector s.
Definition: tle5012b_reg.cpp:1105
void enableVoltageCheck(void)
Enable the voltage regulator check.
Definition: tle5012b_reg.cpp:478
void setSlaveNumber(const uint8_t snr)
Set the slave number of the sensor. Up to four sensors can be selected with this register field.
Definition: tle5012b_reg.cpp:416
void releaseDSPU(void)
release DSPU operations
Definition: tle5012b_reg.cpp:916
void setTestVectorX(uint8_t adctvx)
Set the test vector x.
Definition: tle5012b_reg.cpp:1084
uint16_t getNumberOfRevolutions(void)
Get a new number of revolutions value.
Definition: tle5012b_reg.cpp:782
void disableVoltageCheck(void)
disable the voltage regulator check
Definition: tle5012b_reg.cpp:487
uint8_t getIIFMod(void)
Get the temperature value as signed offset compensated temperature value Saturated between -30°C and ...
Definition: tle5012b_reg.cpp:896
bool isADCCheck(void)
Get the status of the ADC test vectorGMR magnitude check.
Definition: tle5012b_reg.cpp:684
bool isStatusReset(void)
Indication that there was a reset state.
Definition: tle5012b_reg.cpp:236
uint8_t posMap
Addressfield register regMap position *‍/.
Definition: tle5012b_reg.hpp:117
void enableDSPUbist(void)
Enable the DSPU bist check.
Definition: tle5012b_reg.cpp:540
uint16_t getSpeedValue(void)
Get a new calculated speed value.
Definition: tle5012b_reg.cpp:757
void disableXYCheck(void)
disable the X,Y out of limit check
Definition: tle5012b_reg.cpp:611
bool isStatusVoltage(void)
Permanent check of internal and external supply voltages.
Definition: tle5012b_reg.cpp:262
bool isStatusGMRXY(void)
No valid GMR X,Y values, cyclic check of ADC input.
Definition: tle5012b_reg.cpp:366
void setFrameSyncCounter(uint16_t fsync)
Set the frame synchronisation counter value.
Definition: tle5012b_reg.cpp:835
bool isDSPUbist(void)
Get the status of the DSPU bist check.
Definition: tle5012b_reg.cpp:560
bool isPrediction(void)
Get the status of angle perdiction.
Definition: tle5012b_reg.cpp:1177
bool isDSPUoverflow(void)
Get the status of the DSPU overflow check.
Definition: tle5012b_reg.cpp:591
bool isStatusRead(void)
Read status, checks if any status register changed since last readout.
Definition: tle5012b_reg.cpp:392
void disableDSPUoverflow(void)
disable the DSPU overflow check
Definition: tle5012b_reg.cpp:580
uint16_t getAngleBase(void)
Get the actual 0° angle position The 0° angle position is factory calibrated parallel to the edge of ...
Definition: tle5012b_reg.cpp:1303
void holdDSPU(void)
Set DSPU on hold.
Definition: tle5012b_reg.cpp:907
uint16_t getVectorMagnitude(void)
Get angle vactor magnitude.
Definition: tle5012b_reg.cpp:1684
void setFuseReload(void)
Set the fuse reload register and trigger a reload.
Definition: tle5012b_reg.cpp:1062
int16_t getADCx(void)
Get GMR ADC x value.
Definition: tle5012b_reg.cpp:1660
void activateFirmwareReset(void)
Activate the firmware reset, all configuration registers retain their contents. Will also set the SRS...
Definition: tle5012b_reg.cpp:696
uint8_t position
Bitfiled position *‍/.
Definition: tle5012b_reg.hpp:105
void enableXYCheck(void)
Enable the X,Y out of limit check.
Definition: tle5012b_reg.cpp:602
void directionClockwise(void)
Set angle direction clockwise.
Definition: tle5012b_reg.cpp:1126
bool isSpeedValueNew(void)
Do we have a new calculated speed value since last readout.
Definition: tle5012b_reg.cpp:745
interfaceType_t getInterfaceMode(void)
Get the interface Mode on IFA,IFB,IFC.
Definition: tle5012b_reg.cpp:1504
bool isTemperatureToggle(void)
Is there a new Temperature Sensor RAW value.
Definition: tle5012b_reg.cpp:1709
uint16_t getCounterIncrements(void)
Get Counter value of increments.
Definition: tle5012b_reg.cpp:1721
uint16_t mask
Bitfield mask *‍/.
Definition: tle5012b_reg.hpp:104
uint8_t posMap
Bitfield position of register in regMap *‍/.
Definition: tle5012b_reg.hpp:107
uint16_t getTemperatureRAW(void)
Get Temperature Sensor raw value.
Definition: tle5012b_reg.cpp:1696
void disableFilterInverted(void)
disable the Filter inverted diagnostics function
Definition: tle5012b_reg.cpp:1009
void setHysteresisMode(uint8_t hyst)
Set the hysteresis mode for HSM, or the unit time if in SPC mode (see manual)
Definition: tle5012b_reg.cpp:1472
int8_t getOffsetTemperatureX(void)
Get offset temperature coefficient for x component.
Definition: tle5012b_reg.cpp:1567
void setOrthogonality(int16_t ortho)
Set the orthogonality correction of x y components.
Definition: tle5012b_reg.cpp:1450
bool isStartupBist(void)
Get the status of startup bist.
Definition: tle5012b_reg.cpp:1627
void setAngleBase(uint16_t base)
Set a new value for the angle base calibration.
Definition: tle5012b_reg.cpp:1292
void disableFilterParallel(void)
disable the Filter parallel diagnostics function
Definition: tle5012b_reg.cpp:978
bool isGMRCheck(void)
Get the status of the GMR magnitude check.
Definition: tle5012b_reg.cpp:653
bool isStatusROM(void)
Check of ROM-CRC at statup.
Definition: tle5012b_reg.cpp:353
bool getFulseReload(void)
Get the status of the fuse reload register.
Definition: tle5012b_reg.cpp:1073
bool isWatchdog(void)
Get the status of the DSPU watchdog.
Definition: tle5012b_reg.cpp:467
void enableFilterInverted(void)
Enable the Filter inverted diagnostics function.
Definition: tle5012b_reg.cpp:1000
uint16_t getT25Offset(void)
Get Temperature 25°C offset value.
Definition: tle5012b_reg.cpp:1733
uint16_t getAngleValue(void)
Get a new calculated angle value.
Definition: tle5012b_reg.cpp:732
bool isNumberOfRevolutionsNew(void)
Do we have a new number of revolutions since last readout.
Definition: tle5012b_reg.cpp:770
calibrationMode_t
Automatic calibration of offset and amplitude synchronicity for applications with full-turn....
Definition: tle5012b_reg.hpp:46
bool isDSPUhold(void)
Get the status of DSPU operations.
Definition: tle5012b_reg.cpp:927
bool isStatusOverflow(void)
Cyclic scheck of DSPU (Digital Signal Processing Unit) overflow.
Definition: tle5012b_reg.cpp:301
void setAngleRange(angleRange_t range)
Set the representation of the angle output value and the speed value.
Definition: tle5012b_reg.cpp:1188
void * p
Definition: tle5012b_reg.hpp:38
uint16_t getCRCpar(void)
Get CRC of parameters from address 08h to 0Fh.
Definition: tle5012b_reg.cpp:1648
void disableWatchdog(void)
disable the DSPU watchdog
Definition: tle5012b_reg.cpp:456
void enableSSCOpenDrain(void)
Enable open drain on SSC interface.
Definition: tle5012b_reg.cpp:1261
uint8_t getSlaveNumber(void)
Get the actual slave number of the sensor. Up to four sensors can be selected via this register field...
Definition: tle5012b_reg.cpp:404
bool isIFABOutputMode(void)
Get the status of the IFA, IFB and IFC output mode.
Definition: tle5012b_reg.cpp:1439
bool isStatusXYOutOfLimit(void)
Cyclic check of X and > raw values.
Definition: tle5012b_reg.cpp:314
bool isStatusDSPU(void)
Check DSPU, CORDIC and CAPCOM at startup.
Definition: tle5012b_reg.cpp:288
bool isADCTestVector(void)
Get the status of the ADC test vector diagnostics function.
Definition: tle5012b_reg.cpp:1051
int16_t getADCy(void)
Get GMR ADC y value.
Definition: tle5012b_reg.cpp:1672
void enableIFABOpenDrain(void)
Enable open drain in IFA, IFB and IFC.
Definition: tle5012b_reg.cpp:1419
int16_t getOffsetY(void)
Get offset correction y value.
Definition: tle5012b_reg.cpp:1366
void directionConterClockwise(void)
Set angle direction counter clockwise.
Definition: tle5012b_reg.cpp:1135
bool isStatusADC(void)
Check signal path with test vectors.
Definition: tle5012b_reg.cpp:340
uint8_t getPadDriver(void)
Get the pad driver configuration.
Definition: tle5012b_reg.cpp:1324
static const AddressField_t addrFields[]
Registers bitfields.
Definition: tle5012b_reg.hpp:120
bool isVoltageCheck(void)
Get the status of the voltage regulator check.
Definition: tle5012b_reg.cpp:498
void enableStartupBist(void)
Enable startup bist.
Definition: tle5012b_reg.cpp:1607
sensorType_t
Definition: tle5012b_reg.hpp:75
bool isFirmwareReset(void)
Get the status of the firmware reset register.
Definition: tle5012b_reg.cpp:707
uint16_t getFrameCounter(void)
Get the frame counter value. Internal frame counter increments every update period.
Definition: tle5012b_reg.cpp:801
angleRange_t getAngleRange(void)
Get the representation of the angle range.
Definition: tle5012b_reg.cpp:1198
bool isStatusFuse(void)
Cyclic CRC check of configuration registers and startup CRC.
Definition: tle5012b_reg.cpp:275
void disableFuseCRC(void)
disable the fuse CRC check
Definition: tle5012b_reg.cpp:518
void setFilterDecimation(uint8_t firmd)
Set the filter decimation, update rate setting.
Definition: tle5012b_reg.cpp:864
bool isSpikeFilter(void)
Get the status of the analog spike filter.
Definition: tle5012b_reg.cpp:1250
bool statusClockSource(void)
Get the status of the clock source.
Definition: tle5012b_reg.cpp:958
int16_t getAmplitudeSynch(void)
Get amplitude correction value.
Definition: tle5012b_reg.cpp:1387
uint8_t getHysteresisMode(void)
Get the hysteresis mode for HSM, or the unit time if in SPC mode (see manual)
Definition: tle5012b_reg.cpp:1483
bool isStatusGMRA(void)
No value GMR angle value, cyclic check of DSPU output.
Definition: tle5012b_reg.cpp:379
void setOffsetTemperatureX(int8_t tcox)
Set offset temperature coefficient for x component.
Definition: tle5012b_reg.cpp:1557
void setCRCpar(uint16_t crc)
Set CRC of parameters from address 08h to 0Fh.
Definition: tle5012b_reg.cpp:1638
uint16_t regAddress
Bitfiled register address *‍/.
Definition: tle5012b_reg.hpp:103
bool isActivationReset(void)
Hardware reset, will be performed after chip select returns to high.
Definition: tle5012b_reg.cpp:427
void setOffsetX(int16_t offx)
Set offset correction x value.
Definition: tle5012b_reg.cpp:1335
uint8_t getFilterDecimation(void)
Get the filter decimation, update rate setting.
Definition: tle5012b_reg.cpp:874
uint8_t getTestVectorY(void)
Get the test vector y.
Definition: tle5012b_reg.cpp:1115
uint8_t getTestVectorX(void)
Get the test vector x.
Definition: tle5012b_reg.cpp:1094
void setHSMplp(uint8_t plp)
Set multipurpose register,.
Definition: tle5012b_reg.cpp:1536
uint8_t resetValue
Bitfield register reset value *‍/.
Definition: tle5012b_reg.hpp:106
void setIIFMod(uint8_t iifmod)
Set the IIF (Incremental Interfave Mode)
Definition: tle5012b_reg.cpp:885
uint8_t getFIRUpdateRate(void)
Get the FIR update rate.
Definition: tle5012b_reg.cpp:1408
Addr_t
register address enumeration for all sensor registers
Definition: tle5012b_reg.hpp:127
void setExternalClock(void)
Set clock sourec to external SCK.
Definition: tle5012b_reg.cpp:947
void disableSpikeFilter(void)
disable the analog spike filter to filter
Definition: tle5012b_reg.cpp:1239
int16_t getOrthogonality(void)
Get the orthogonality correction of x y components.
Definition: tle5012b_reg.cpp:1460
angleRange_t
Definition: tle5012b_reg.hpp:54
void enableFilterParallel(void)
Enable the Filter parallel diagnostics function.
Definition: tle5012b_reg.cpp:969
void setCalibrationMode(calibrationMode_t autocal)
Set the automatic calibration mode.
Definition: tle5012b_reg.cpp:1209
bool isFilterInverted(void)
Get the status of the Filter inverted diagnostics function.
Definition: tle5012b_reg.cpp:1020
int16_t getOffsetX(void)
Get offset correction x value.
Definition: tle5012b_reg.cpp:1345
void enableIFABPushPull(void)
Enable push pull in IFA, IFB and IFC.
Definition: tle5012b_reg.cpp:1428
calibrationMode_t getCalibrationMode(void)
Get the actual automatic calibration mode.
Definition: tle5012b_reg.cpp:1219
bool isStatusWatchDog(void)
Permanent check of watchdog.
Definition: tle5012b_reg.cpp:249
uint16_t getTemperatureValue(void)
Get the temperature value as signed offset compensated temperature value Saturated between -30°C and ...
Definition: tle5012b_reg.cpp:846
bool isStatusMagnitideOutOfLimit(void)
Vector lengths cyclic check of X,Y values after error compensation.
Definition: tle5012b_reg.cpp:327
void setAmplitudeSynch(int16_t synch)
Set amplitude correction value.
Definition: tle5012b_reg.cpp:1377
void enableWatchdog(void)
Enable the DSPU watchdog.
Definition: tle5012b_reg.cpp:447
int8_t getOffsetTemperatureY(void)
Get offset temperature coefficient for y component.
Definition: tle5012b_reg.cpp:1592
void enableADCCheck(void)
Enable the ADC test vector check.
Definition: tle5012b_reg.cpp:664
void setPadDriver(uint8_t pad)
Set a new pad driver configuration.
Definition: tle5012b_reg.cpp:1314
Reg(void *p)
Construct a new Reg::Reg object.
Definition: tle5012b_reg.cpp:167
Access_t
Register access type.
Definition: tle5012b_reg.hpp:87
void disableDSPUbist(void)
disable the DSPU bist check
Definition: tle5012b_reg.cpp:549
void setFIRUpdateRate(bool fir)
Set the FIR (Filter Initial Rate) update rate.
Definition: tle5012b_reg.cpp:1398
uint16_t regMap[MAX_NUM_REG]
Register map *‍/.
Definition: tle5012b_reg.hpp:152
bool isFuseCRC(void)
Get the status of the fuse CRC check.
Definition: tle5012b_reg.cpp:529
uint16_t getFrameSyncCounter(void)
Get the frame synchronisation counter value Internal frame sub counter within one frame.
Definition: tle5012b_reg.cpp:823
interfaceType_t
List of possible interface types witch are preset by fuses and can be changed into each other.
Definition: tle5012b_reg.hpp:65
uint8_t regAccess
Bitfield register access *‍/.
Definition: tle5012b_reg.hpp:102
bool isXYCheck(void)
Get the status of the X,Y out of limit check.
Definition: tle5012b_reg.cpp:622
void disableStartupBist(void)
Disable startup bist.
Definition: tle5012b_reg.cpp:1616
void disableGMRCheck(void)
disable the GMR magnitude check
Definition: tle5012b_reg.cpp:642
void setIFABres(uint8_t res)
Set multipurpose register, PWM frequency, IIF resolution, SPC frame configuration.
Definition: tle5012b_reg.cpp:1515
void enableSpikeFilter(void)
Enable the analog spike filter to filter voltage spikes in IFC, SCK, CS.
Definition: tle5012b_reg.cpp:1230
void setOffsetY(int16_t offy)
Set offset correction y value.
Definition: tle5012b_reg.cpp:1356
void enableGMRCheck(void)
Enable the GMR magnitude check.
Definition: tle5012b_reg.cpp:633
void disableADCCheck(void)
disable the ADC test vector check
Definition: tle5012b_reg.cpp:673
void enableFuseCRC(void)
Enable the fuse CRC check.
Definition: tle5012b_reg.cpp:509
bool isFilterParallel(void)
Get the status of the Filter parallel diagnostics function.
Definition: tle5012b_reg.cpp:989
void enablePrediction(void)
Enable the angle prediction based on current speed.
Definition: tle5012b_reg.cpp:1157
void enableADCTestVector(void)
Enable the ADC test vector diagnostics function.
Definition: tle5012b_reg.cpp:1031
void setInterfaceMode(interfaceType_t ifmd)
Set the interface Mode on IFA,IFB,IFC.
Definition: tle5012b_reg.cpp:1494
~Reg()
Destroy the Reg::Reg object.
Definition: tle5012b_reg.cpp:175
void setActivationReset(void)
Set the Activation Reset object Performs a hardware reset.
Definition: tle5012b_reg.cpp:438
void setInternalClock(void)
Set the clock source to internal oscillator.
Definition: tle5012b_reg.cpp:938
uint8_t getHSMplp(void)
Get multipurpose register.
Definition: tle5012b_reg.cpp:1546
void enableDSPUoverflow(void)
Enable the DSPU overflow check.
Definition: tle5012b_reg.cpp:571
void setFrameCounter(uint16_t fcnt)
Set the frame counter value.
Definition: tle5012b_reg.cpp:812
bool isAngleDirection(void)
Get the angle direction.
Definition: tle5012b_reg.cpp:1146
void enableSSCPushPull(void)
Enable push pull on SSC interface.
Definition: tle5012b_reg.cpp:1270
void setOffsetTemperatureY(int8_t tcoy)
Set offset temperature coefficient for y component.
Definition: tle5012b_reg.cpp:1582
uint8_t getIFABres(void)
Get multipurpose register.
Definition: tle5012b_reg.cpp:1525
uint16_t regAddress
Addressfield register address *‍/.
Definition: tle5012b_reg.hpp:116
void disableADCTestVector(void)
disable the ADC test vector diagnostics function
Definition: tle5012b_reg.cpp:1040
bool isAngleValueNew(void)
Do we have a new calculated angle value since last readout.
Definition: tle5012b_reg.cpp:720
@ mode1
mode1 update every angle update cycle (FIR_MD setting)
Definition: tle5012b_reg.hpp:48
@ mode2
mode2 update every 1.5 revolutions
Definition: tle5012b_reg.hpp:49
@ noAutoCal
noAutoCal = no auto-calibration
Definition: tle5012b_reg.hpp:47
@ mode3
mode3 update every 11.25°
Definition: tle5012b_reg.hpp:50
@ TLE5012B_E5020
TLE5012B_E5020.
Definition: tle5012b_reg.hpp:79
@ TLE5012B_E3005
TLE5012B_E3005.
Definition: tle5012b_reg.hpp:77
@ TLE5012B_E1000
TLE5012B_E1000 Sensor2Go variant.
Definition: tle5012b_reg.hpp:76
@ TLE5012B_E9000
TLE5012B_E9000 Sensor2Go variant.
Definition: tle5012b_reg.hpp:80
@ TLE5012B_E5000
TLE5012B_E5000 Sensor2Go variant.
Definition: tle5012b_reg.hpp:78
@ 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
@ factor4
magnetic angle from -45° to +45°, mapped values from -16384 to 16384
Definition: tle5012b_reg.hpp:56
@ factor5
magnetic angle from -180° to +180°, mapped values from -8192 to 8192
Definition: tle5012b_reg.hpp:57
@ factor1
magnetic angle from -180° to +180°, mapped values from -16384 to 16384
Definition: tle5012b_reg.hpp:55
@ REG_ACCESS_W
Write access register *‍/.
Definition: tle5012b_reg.hpp:89
@ REG_ACCESS_RWU
Read & write & update register *‍/.
Definition: tle5012b_reg.hpp:93
@ REG_ACCESS_RU
Read & update register *‍/.
Definition: tle5012b_reg.hpp:92
@ REG_ACCESS_RES
Reserved access register *‍/.
Definition: tle5012b_reg.hpp:94
@ REG_ACCESS_U
Update register *‍/.
Definition: tle5012b_reg.hpp:91
@ REG_ACCESS_R
Read access register *‍/.
Definition: tle5012b_reg.hpp:88
@ REG_ACCESS_RW
Read & write access register *‍/.
Definition: tle5012b_reg.hpp:90
@ IIF
IIF Incremental Interface (IIF)
Definition: tle5012b_reg.hpp:66
@ SSC
SSC Synchronous Serial Communication (SSC)
Definition: tle5012b_reg.hpp:70
@ SPC
SPC Short-PWM-Code (SPC)
Definition: tle5012b_reg.hpp:69
@ PWM
PWM Pulse-Width-Modulation (PWM)
Definition: tle5012b_reg.hpp:67
@ HSM
HSM Hall Switch Mode (HSM)
Definition: tle5012b_reg.hpp:68
#define MAX_NUM_REG
defines the value for temporary data to read all readable registers
Definition: tle5012b_util.hpp:51