TLE493D-P2B6

This is an overview of the TLE493D-P2B6 and the OSS-ECAL offering for the TLE493D-P2B6. The TLE493D-P2B6 is a High Accuracy Low Power 3D Hall Sensor (Full range -160 to 160 mT, Short range -100 to 100 mT) for industrial use manufactured by Infineon.
MCU interface : I2C

CAUTION:Please be sure to refer to the latest version of the Datasheet prior to actual design.

TLE493D-P2B6

Overview

This three dimensional Hall effect sensor can be configured by the microcontroller. The measurement data is
provided in digital format to the microcontroller. The microcontroller is the master and the sensor is the slave. It
also provides test functions and the capability to Wake-Up a sleeping system.

Feature

  • 3D (X, Y, Z) magnetic flux density sensing of ±160 mT
  • Programmable flux resolution down to 65 µT (typ.)
  • X-Y angular measurement mode
  • Diagnostic measurements to check digital parts, analog parts and Hall probe of the sensor
  • Wake Up function and Power down mode with 7 nA (typ.) power consumption
  • 12-bit data resolution for each measurement direction plus 10-bit temperature sensor
  • Variable update frequencies and power modes (configurable during operation)
  • Temperature range Tj = -40°C…125°C, supply voltage range = 2.8 V…3.5 V
  • Triggering by external µC possible via I2C protocol
  • Interrupt signal to indicate a valid measurement to the microcontroller

Potential Application

The TLE493D-P2B6 is designed for a wide range of magnetic sensing, including the following:

  • Gear stick position
  • Control elements in the top column module and multi function steering wheel
  • Multi function knobs
  • Pedal/valve position sensing

Benefits

  • Component reduction due to 3D magnetic measurement principle
  • Wide application range addressable due to high flexibility
  • Platform adaptability due to device configurability
  • Supporting functional safety by means of integrated diagnostics
  • Very low system power consumption due to Wake-Up mode resulting in extended battery runtime
  • Disturbance of smaller stray fields are neglectable compared to the high magnetic flux measurement range

OSS-ECAL specification

API Function

OSS-ECAL API functions are basically assumed to be function calls from a periodic Thread (TASK).

Set value at the time of provision

Label NameDescriptionSet value at the time of provision
TLE493D_P2B6_TYPESelect Product Type from the following values.
eTLE493D_P2B6_A0: Product Type A0
eTLE493D_P2B6_A1: Product Type A1
eTLE493D_P2B6_A2: Product Type A2
eTLE493D_P2B6_A3: Product Type A3
eTLE493D_P2B6_A0
I2C_PROTOCOL_INISelect I²C 1-byte or 2-byte read protocol from the following values.
i1BYTE: 1byte
i2BYTE: 2byte
i1BYTE
WAKEUP_FEATURERegister WU bit6 Select WU from the following values.
iENABLE: Enable
iDISABLE: Disable
iDISABLE
WAKEUP_XL_INISet value of Register XL.
X-Direction : Wake Up lower threshold [mT]
0.0F
WAKEUP_XH_INISet value of Register XH.
X-Direction : Wake Up lower threshold [mT]
0.0F
WAKEUP_YL_INISet value of Register YL.
X-Direction : Wake Up lower threshold [mT]
0.0F
WAKEUP_YH_INISet value of Register YH.
Y-Direction : Wake Up upper threshold [mT]
0.0F
WAKEUP_ZL_INISet value of Register ZL.
Z-Direction : Wake Up lower threshold [mT]
0.0F
WAKEUP_ZH_INISet value of Register ZH.
Z-Direction : Wake Up upper threshold [mT]
0.0F
SENSITIVITYSelect Full-range or Short-range from the following values.
iRANGE_FULL: Full-range
iRANGE_SHORT: Short-range
iRANGE_FULL
Config_INISet value of Register Config.bit7 DT = 0
bit6 AM = 0
bit5:4 TRIG = 00
bit3 X2 = 0
bit2:1 TL_mag = 00
bit0 CP = 1
READ_OUTSelect from the following values to read magnetic data in 12-bit or 8-bit.
i12BITS: 12bit
i8BITS: 8bit
i12BITS
POWER_MODESelect Power Mode from the following values.
eLOW_POWER_MODE: Low power mode
eMASTER_CONTROL_MODE: Master control mode
eFAST_MODE: Fast mode
eMASTER_CONTROL_MODE
UPDATE_RATE_INIRegister MOD2 Selects the frequency setting of the PRD from the following values.
eRATE_700_HZ: 770 Hz
eRATE_97_HZ: 97 Hz
eRATE_24_HZ: 24 Hz
eRATE_12_HZ: 12 Hz
eRATE_6_HZ: 6 Hz
eRATE_3_HZ: 3 Hz
eRATE_0_4_HZ: 0.4 Hz
eRATE_0_05_HZ: 0.05 Hz
eRATE_12_HZ
etSTS oTLE493D_P2B6_RESET( void )

The oTLE493D_P2B6_RESET function is an API function to reset the TLE493D-P2B6.

– Step1 Send 0xFF
– Step2 Send 0xFF again
– Step3 Send 0x00
– Step4 Send 0x00 again
– Step5 Wait 30μs required after device reset to ensure stable startup
– Step6 Correct CP bit

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
etSTS oTLE493D_P2B6_INIT( void )

The oTLE493D_P2B6_INIT function is an API function to set the TLE493D-P2B6 after reset.

– Step1 Configuration bus
– Step2 Disable Interrupt before other settings
– Step3 Sensor Configuration
– Step4 Disable Test Mode
– Step5 Enable/Disable Wake-Up
– Step6 Set Wake-Up Threshold
– Step7 Set Power Mode
– Step8 Set Update Rate
– Step9 Enable/Disable Collision Avoidance or Clock Stretching
– Step10 Enable/Disable Interrupt

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_PARAMETERIn any of the following cases.
1. If the value of I2C_PROTOCOL_INI is other than the following values.
i1BYTE, i2BYTES

2. If the value of TLE493D_P2B6_TYPE is other than the following values.
eTLE493D_P2B6_A0, eTLE493D_P2B6_A1,
eTLE493D_P2B6_A2, eTLE493D_P2B6_A3

3. If the value of Wake-up Threshold is:
WAKEUP_XL_INI > WAKEUP_XH_INI
WAKEUP_YL_INI > WAKEUP_YH_INI
WAKEUP_ZL_INI > WAKEUP_ZH_INI

4.If the value set for Wake-up Threshold is other than the following range.
iMIN_TLE493D_P2B6_XL_f ≦ WAKEUP_XL_INI ≦ iMAX_TLE493D_P2B6_XL_f
iMIN_TLE493D_P2B6_YL_f ≦ WAKEUP_YL_INI ≦ iMAX_TLE493D_P2B6_YL_f
iMIN_TLE493D_P2B6_ZL_f ≦ WAKEUP_ZL_INI ≦ iMAX_TLE493D_P2B6_ZL_f
iMIN_TLE493D_P2B6_XH_f ≦ WAKEUP_XHL_INI ≦ iMAX_TLE493D_P2B6_XH_f
iMIN_TLE493D_P2B6_YH_f ≦ WAKEUP_YH_INI ≦ iMAX_TLE493D_P2B6_YH_f
iMIN_TLE493D_P2B6_ZH_f ≦ WAKEUP_ZH_INI ≦ iMAX_TLE493D_P2B6_ZH_f

5. If the value of POWER_MODE is other than the following values.
eLOW_POWER_MODE, eFAST_MODE, eMASTER_CONTROL_MODE

6. If the value of UPDATE_RATE_INI is other than the following values.
eRATE_700_HZ, eRATE_97_HZ, eRATE_24_HZ, eRATE_12_HZ,
eRATE_6_HZ, eRATE_3_HZ, eRATE_0_4_HZ, eRATE_0_05_HZ
eSTS_ERR_DIAGIn any of the following cases.
1. Fuse Parity Error
2. Register Diag CF = 0
3. Register Diag T = 1
etSTS oTLE493D_P2B6_WRITE_WAKEUP( uint8 wu_sts )

The oTLE493D_P2B6_WRITE_WAKEUP function is an API function to enable/disable the Wake-up function.

– Step1 Read all registers and retrieve the WU, Config, and Diag register values
– Step2 Confirm test mode is disabled and CF = 1
– Step3 Write Register 0x0D( WU ) : Setting wake-up bit
– Step4 Write Register 0x0D( WU ) : Setting wake-up
– Step5 Write Register 0x10(Config): Update CP bit

Note: If the Wake-up function is enabled, the Test Mode function must be disabled.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_DIAGIn any of the following cases.
1. Register Diag CF = 0
2. Register Diag T = 1
Parameter INuint8 wu_stsEnable/disable the Wake-up functionSelect from the following values
iENABLE, iDISABLE
etSTS oTLE493D_P2B6_WRITE_WAKEUP_THRES( float32 thres_xl, float32 thres_yl, float32 thres_zl, float32 thres_xh, float32 thres_yh, float32 thres_zh )

The oTLE493D_P2B6_WRITE_WAKEUP_THRES function is an API function that sets the threshold hold for the Wake-up function.

– Step1 Check Threshold
– Step2 Set Wake-Up Lower Threshold
– Step3 Set Wake-Up Upper Threshold

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_PARAMETERIn any of the following cases
1. If the value of Wake-up Threshold is:
thres_xl > thres_xh
thres_yl > thres_yh
thres_zl > thres_zh

2.When the set value of Wake-up Threshold is other than the following range.
iMIN_TLE493D_P2B6_XL_f ≦ thres_xl ≦ iMAX_TLE493D_P2B6_XL_f
iMIN_TLE493D_P2B6_YL_f ≦ thres_yl ≦ iMAX_TLE493D_P2B6_YL_f
iMIN_TLE493D_P2B6_ZL_f ≦ thres_zl ≦ iMAX_TLE493D_P2B6_ZL_f
iMIN_TLE493D_P2B6_XH_f ≦ thres_xh ≦ iMAX_TLE493D_P2B6_XH_f
iMIN_TLE493D_P2B6_YH_f ≦ thres_yh ≦ iMAX_TLE493D_P2B6_YH_f
iMIN_TLE493D_P2B6_ZH_f ≦ thres_zh ≦ iMAX_TLE493D_P2B6_ZH_f

full range
iMIN_TLE493D_P2B6_XL_f -160.0mT
iMAX_TLE493D_P2B6_XL_f 160.0mT
iMIN_TLE493D_P2B6_YL_f -160.0mT
iMAX_TLE493D_P2B6_YL_f 160.0mT
iMIN_TLE493D_P2B6_ZL_f -160.0mT
iMAX_TLE493D_P2B6_ZL_f 160.0mT

short range
iMIN_TLE493D_P2B6_XL_f -100.0mT
iMAX_TLE493D_P2B6_XL_f 100.0mT
iMIN_TLE493D_P2B6_YL_f -100.0mT
iMAX_TLE493D_P2B6_YL_f 100.0mT
iMIN_TLE493D_P2B6_ZL_f -100.0mT
iMAX_TLE493D_P2B6_ZL_f 100.0mT
Parameter INfloat32 thres_xlWake-Up Lower X Thresholdfull range 7.7LSB/mT (Typ.)
short range 15.4LSB/mT (Typ.)
float32 thres_ylWake-Up Lower Y Thresholdfull range 7.7LSB/mT (Typ.)
short range 15.4LSB/mT (Typ.)
float32 thres_zlWake-Up Lower Z Thresholdfull range 7.7LSB/mT (Typ.)
short range 15.4LSB/mT (Typ.)
float32 thres_xhWake-Up Upper X Thresholdfull range 7.7LSB/mT (Typ.)
short range 15.4LSB/mT (Typ.)
float32 thres_yhWake-Up Upper Y Thresholdfull range 7.7LSB/mT (Typ.)
short range 15.4LSB/mT (Typ.)
float32 thres_zhWake-Up Upper Z Thresholdfull range 7.7LSB/mT (Typ.)
short range 15.4LSB/mT (Typ.)
etSTS oTLE493D_P2B6_WRITE_POWER_MODE( etTLE493D_P2B6_POWER power )

The oTLE493D_P2B6_WRITE_POWER_MODE function is an API function that sets the Power Mode.

– Step1 Validate input and determine MODE bitsValidate input and determine MODE bits
– Step2 Read 0x11(MOD1), 0x13(MOD2) Register Value and Check Fuse Parity
– STep3 Write Register 0x11( MOD1 ) : Setting Power mode

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_PARAMETERIf other than the following values.
eLOW_POWER_MODE,
eFAST_MODE,
eMASTER_CONTROL_MODE
eSTS_ERR_DIAGFuse Parity Error
Parameter INetTLE493D_P2B6_POWER powerRegister MOD1 MODE set valueSelect from the following values.
eLOW_POWER_MODE,
eFAST_MODE,
eMASTER_CONTROL_MODE
etSTS oTLE493D_P2B6_WRITE_RATE( etTLE493D_P2B6_RATE rate )

The oTLE493D_P2B6_WRITE_RATE function is an API function that sets the sensing cycle.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_PARAMETERIf other than the following values.
eRATE_700_HZ,
eRATE_97_HZ,
eRATE_24_HZ,
eRATE_12_HZ,
eRATE_6_HZ,
eRATE_3_HZ,
eRATE_0_4_HZ,
eRATE_0_05_HZ
eSTS_ERR_DIAGFuse Parity Error
Parameter INetTLE493D_P2B6_RATE rateRegister MOD2 PRD set valueSelect from the following values.
eRATE_700_HZ,
eRATE_97_HZ,
eRATE_24_HZ,
eRATE_12_HZ,
eRATE_6_HZ,
eRATE_3_HZ,
eRATE_0_4_HZ,
eRATE_0_05_HZ
etSTS oTLE493D_P2B6_WRITE_INT( uint8 en_dis )

The oTLE493D_P2B6_WRITE_INT function is an API function to enable/disable the /INT function.

– Step1 Read 0x11(MOD1), 0x13(MOD2) Register Value and Check Fuse Parity
– Step2 Write Register 0x11( MOD1 ) : Interrupt enable/disable

Return valueetSTSOSS-ECALステータスコード
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_DIAGFuse Parity Error
Parameter INuint8 en_disRegister MOD1 INT set valueSelect from the following values.
iENABLE, iDISABLE
etSTS oTLE493D_P2B6_WRITE_CA( uint8 ca )

The oTLE493D_P2B6_WRITE_CA function is an API function to enable/disable the collision avoidance function.

– Step1 Read 0x11(MOD1), 0x13(MOD2) Register Value and Check Fuse Parity
– Step2 Write Register 0x11( MOD1 ) : Setting Collision avoidance

Note: Clock stretching is supported only in Master-controlled and Low-Power modes.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_DIAGFuse Parity Error
Parameter INuint8 caRegister MOD1 CA set valueSelect from the following values.
iENABLE, iDISABLE
etSTS oTLE493D_P2B6_WRITE_TEST_MODE( etTLE493D_P2B6_TEST mode )

The oTLE493D_P2B6_WRITE_TEST_MODE function is an API function that sets the Test Mode function.

– Step1 Input validation and determine Regsiter TMode TST bit
– Step2 Update Regsiter TMode TST bits

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_PARAMETERIf other than the following values.
eTEST_MODE_NO,
eTEST_MODE_VAHLL,
eTEST_MODE_SPIN,
eTEST_MODE_SAT
eSTS_ERR_DIAGFuse Parity Error
Parameter INetTLE493D_P2B6_TEST modeRegsiter TMode TST set valueSelect from the following values.
eTEST_MODE_NO,
eTEST_MODE_VAHLL,
eTEST_MODE_SPIN,
eTEST_MODE_SAT
etSTS oTLE493D_P2B6_WRITE_TRIGGER( etTLE493D_P2B6_TRIGGER trig_type )

The oTLE493D_P2B6_WRITE_TRIGGER function is an API function that sets the Trigger function.

– Step1 Validate input and determine Register Config TRIG bits
– Step2 Update Register Config TRIG bits
– Step3 Write Register 0x10( Config ) : Setting Trigger

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_PARAMETERIf other than the following values.
eTRIG_NO_TRIGGER,
eTRIG_AFTER_WRITE,
eTRIG_BEFORE_MSB,
eTRIG_AFTER_05H
Parameter INetTLE493D_P2B6_TRIGGER trig_typeRegister Config TRIG set valueSelect from the following values.
eTRIG_NO_TRIGGER,
eTRIG_AFTER_WRITE,
eTRIG_BEFORE_MSB,
eTRIG_AFTER_05H
etSTS oTLE493D_P2B6_READ_MAG_RAW( stTLE493D_P2B6_RAW_O* rlt )

The oTLE493D_P2B6_READ_MAG_RAW function is an API function to read the magnetic field RAW (raw data) values for the X, Y, and Z axes.

Note: This function can be used to speed up magnetic measurements when temperature is not required.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
Parameter OUTstTLE493D_P2B6_RAW_O* rltRead value of Register Bx, By and Bz
sint16 rlt.raw_bx [mT/LSB]
sint16 rlt.raw_by [mT/LSB]
sint16 rlt.raw_bz [mT/LSB]
etSTS oTLE493D_P2B6_READ_MAG( stTLE493D_P2B6_O* rlt )

The oTLE493D_P2B6_READ_MAG function is an API function to read X, Y, and Z axis magnetic data.

Note: This function can be used to speed up magnetic measurements when temperature is not required.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_MAXfull-range: Exceeding 160.0 mT
short-range: Exceeding 100.0 mT
eSTS_ERR_MINfull-range: Less than -160.0mT
short-range:Less than -100.0mT
Parameter OUTstTLE493D_P2B6_O* rltRegister Bx, By and Bz magnetic data
float32 rlt.bx [mT]
float32 rlt.by [mT]
float32 rlt.bz [mT]
etSTS oTLE493D_P2B6_READ_MAG_TEMP_RAW( stTLE493D_P2B6_RAW_O* rlt )

The oTLE493D_P2B6_READ_MAG_TEMP_RAW function is an API function to read the raw (raw data) values of X-, Y-, and Z-axis magnetic field and temperature.

Note: To use this function, temperature measurement must be enabled.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
Parameter OUTstTLE493D_P2B6_O* rltRegister Bx, By, Bz and Temp read values
sint16 rlt.raw_bx [mT/LSB]
sint16 rlt.raw_by [mT/LSB]
sint16 rlt.raw_bz [mT/LSB]
sint16 rlt.raw_temp [°C]
etSTS oTLE493D_P2B6_READ_MAG_TEMP( stTLE493D_P2B6_O* rlt )

The oTLE493D_P2B6_READ_MAG_TEMP function is an API function to read X, Y, and Z axis magnetic and temperature data.

Note: To use this function, temperature measurement must be enabled.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_MAXIn any of the following cases.
1. Bx > iMAX_TLE493D_P2B6_BX_f
2. By > iMAX_TLE493D_P2B6_BY_f
3. Bz > iMAX_TLE493D_P2B6_BZ_f
4. temp > 125.0 °C

full range
iMAX_TLE493D_P2B6_BX_f 160.0mT
iMAX_TLE493D_P2B6_BY_f 160.0mT
iMAX_TLE493D_P2B6_BZ_f 160.0mT

short range
iMAX_TLE493D_P2B6_BX_f 100.0mT
iMAX_TLE493D_P2B6_BY_f 100.0mT
iMAX_TLE493D_P2B6_BZ_f 100.0mT
eSTS_ERR_MINIn any of the following cases.
1. Bx < iMIN_TLE493D_P2B6_BX_f
2. By < iMIN_TLE493D_P2B6_BY_f
3. Bz < iMIN_TLE493D_P2B6_BZ_f
4. temp < -40.0 °C

full range
iMIN_TLE493D_P2B6_BX_f -160.0mT
iMIN_TLE493D_P2B6_BY_f -160.0mT
iMIN_TLE493D_P2B6_BZ_f -160.0mT

short range
iMIN_TLE493D_P2B6_BX_f -100.0mT
iMIN_TLE493D_P2B6_BY_f -100.0mT
iMIN_TLE493D_P2B6_BZ_f -100.0mT
Parameter OUTstTLE493D_P2B6_O* rltRegister Bx, By and Bz magnetic data. Register Temp temperature value
float32 rlt.bx [mT]
float32 rlt.by [mT]
float32 rlt.bz [mT]
float32 rlt.temp [°C]
etSTS oTLE493D_P2B6_READ_DIAG( uint8* diag )

The oTLE493D_P2B6_READ_DIAG function is an API function to read diagnostic information from Register Diag.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_DIAGFuse Parity Error
Parameter INuint8 caRead value of Register Diag
etSTS oTLE493D_P2B6_READ_REG( uint8* reg )

The oTLE493D_P2B6_READ_REG function is an API function to read all Register values.

Return valueetSTSOOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
eSTS_ERR_DIAGFuse Parity Error
Parameter OUTuint8* regreg[0] = Register Bx
reg[1] = Register By
reg[2] = Register Bz
reg[3] = Register Temp
reg[4] = Register Bx2
reg[5] = Register Temp2
reg[6] = Register Diag
reg[7] = Register XL
reg[8] = Register XH
reg[9] = Register YL
reg[10] = Register YH
reg[11] = Register ZL
reg[12] = Register ZH
reg[13] = Register WU
reg[14] = Register TMode
reg[15] = Register TPhase
reg[16] = Register Config
reg[17] = Register MOD1
reg[18] = Register Reserved
reg[19] = Register MOD2
reg[20] = Register Reserved
reg[21] = Register Reserved
reg[22] = Register Ver

Sample application

OSS-ECAL contains sample applications in the sample folder. Here is an overview of the application. Please use it as a reference material when incorporating OSS-ECAL into your product programs.

StatevgTLE493D_P2B6_COMMANDstate transition conditionProcess OverviewAPI Function
InitializeiTLE493D_P2B6_INITIALIZE1. First timeTLE493D-P2B6 Initialize StateoTLE493D_P2B6_RESET
oTLE493D_P2B6_WRITE_TRIGGER
MeasureiTLE493D_P2B6_MEASURE1. Initialize completed
2. vgTLE493D_P2B6_COMMAND=
 iTLE493D_P2B6_MEASURE
3D Hall Magnetic MeasurementoTLE493D_P2B6_READ_DIAG
oTLE493D_P2B6_READ_MAG_TEMP
Self-testiTLE493D_P2B6_SELF_TESTvgTLE493D_P2B6_COMMAND=
iTLE493D_P2B6_SELF_TEST
Self-testoTLE493D_P2B6_WRITE_TEST_MODE
oTLE493D_P2B6_WRITE_TRIGGER
oTLE493D_P2B6_READ_MAG_TEMP_RAW
ErroriTLE493D_P2B6_ERRORvgTLE493D_P2B6_COMMAND=
iTLE493D_P2B6_ERROR
Error process-*
Low PoweriTLE493D_P2B6_LOW_POWERvgTLE493D_P2B6_COMMAND=
iTLE493D_P2B6_LOW_POWER
Low PoweroTLE493D_P2B6_WRITE_POWER_MODE

* Please address this in your product program.

HAL Support List

OSS-ECAL’s HAL support is as follows. (The list is being expanded sequentially.) Please note that even if the same HAL is used, different versions, MCUs, and development environments may not work together.

ManufacturerSDK/IDE ToolHAL NameVerHALNAMESupport
ArduinoArduino IDEArduino1.8.6ARDUINOX
DebianGNU/Linux10.3LinuxX
InfineonModusToolboxmtb-hal-cat12.4.3ModusToolboxX
NXPMCUXpresso SDKSDK_2.x_EVKB-IMXRT10502.16iMXRT1051B1052BX
RenesasSynergy Software PackageHAL2.6.0SSPX
STMicroelectronicsSTM32CubeSTM32CubeF4V1.28.1STM32F4X
Development environment

The MCU and development environment during OSS-ECAL development are as follows.

HAL NameManufacturerBoardMCUIDE
ARDUINOArduino1.Mega 2560 Rev3
2.Arduino Pro Mini 3.3V
ATmega2560
ATmega328P
Arduino IDE 2.3.3
LinuxBeagleBoardBeagleBone BlackTI AM335x
ModusToolboxInfineonCY8CPROTO-063-BLE PSoC 6 BLE Prototyping KitCYBLE-416045-02ModusToolbox
iMXRT1051B1052BNXPIMXRT1050-EVKBi.MX RT1050MCUXpresso IDE
SSPRenesasS7G2 SKR7FS7G27H3A01CFCe² studio for Renesas Synergy
STM32F4STMicroelectronicsSTM32 Nucleo-64 boardsSTM32F401RETxSTM32CubeIDE

File Structure

Folder*FileSummary
TLE493D_P2B6_HALNAME_VERSION/samplesample.c (.cpp)Sample application program
sample.hSample application header
TLE493D_P2B6_HALNAME_VERSIONoTLE493D_P2B6.c (.cpp)OSS-ECAL program for TLE493D-P2B6
oTLE493D_P2B6.hOSS-ECAL header for TLE493D-P2B6
oTLE493D_P2B6_user.hUser configuration header for TLE493D-P2B6
oss_ecal.hOSS-ECAL common header
TLE493D_P2B6_ARDUINO.inoSample application programs for Arduino
user_setting.c (.cpp)User configured constants and tables
user_setting.hUser configuration Header
oHAL_i2c_stm32f4.cHAL Program for STM32Cube FW_F4
oHAL_i2c_stm32f4.hHAL Header for STM32Cube FW_F4
readme.mdReadme
OSS-ECAL Terms of Use.txtOSS-ECAL Terms of Use

* For HALNAME, please refer to HAL Support.

OSS-ECAL Download Contact

Please login before contacting us for downloads.
To register as a new user, click here.

Built-in How to

How to incorporate OSS-ECAL into user programs

How to incorporate multiple OSS-ECALs in a user program (same MCU function)

How to incorporate multiple OSS-ECALs in a user program (different MCU function)

How to incorporate multiple identical electronic components into a user program

How to reduce the impact on user programs by replacing electronic components

CAUTION

The sample version of OSS-ECAL is not intended to be used with Threads (Tasks) or interrupts of different priority. Please do not use it as in the example below.

Example: If each sensor is assigned to the same ADC group and the OSS-ECAL API is executed in processes with different priorities, correct values may not be obtained.
ADC Gr0 Ch0 Temperature sensor AD22100A 100ms cycle Thread (low priority) to take in temperature
ADC Gr0 Ch1 Pressure sensor   MPX5999D Event interrupts (high priority) to take pressure

OSS-ECAL English
error: Content is protected !!