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).
readMultipleRegisters.cpp File Reference
Include dependency graph for readMultipleRegisters.cpp:

readMultipleRegisters

Demostrates how to read multiple registers

Author
Infineon Technologies AG
Version
3.1.0

This example demonstrates how to read multiple raw registers at once. In this case you have to recalculate values like angle, angle speed etc. be your self.

the read command offset of 0x8000 will be set by the readMoreRegisters command so we need only the register offset from where we start and the second digit is how many consecutive registers to read which is be done by adding the length and the command values. A max of 15 value can read at once, one additional value is reserved for the safety bit.

SPDX-License-Identifier: MIT

Tle5012Wiced Tle5012Sensor = Tle5012Wiced()
 
errorTypes checkError = NO_ERROR
 
uint16_t command = 0x0050
 read register beginning with REG_FSYNC More...
 
uint8_t leng = 5
 and the next four registers REG_MOD_1, REG_SIL, REG_MOD2 and REG_MOD3 More...
 
bool s = true
 
void setup ()
 
void loop ()
 
void application_start ()
 

Function Documentation

◆ setup()

void setup ( )
Here is the call graph for this function:

◆ loop()

void loop ( )
Here is the call graph for this function:

◆ application_start()

void application_start ( )
Here is the call graph for this function:

Variable Documentation

◆ Tle5012Sensor

Tle5012Wiced Tle5012Sensor = Tle5012Wiced()

◆ checkError

errorTypes checkError = NO_ERROR

◆ command

uint16_t command = 0x0050

read register beginning with REG_FSYNC

◆ leng

uint8_t leng = 5

and the next four registers REG_MOD_1, REG_SIL, REG_MOD2 and REG_MOD3

◆ s

bool s = true