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 Name | Description | Set value at the time of provision |
---|---|---|
TLE493D_P2B6_TYPE | Select 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_INI | Select I²C 1-byte or 2-byte read protocol from the following values. i1BYTE: 1byte i2BYTE: 2byte | i1BYTE |
WAKEUP_FEATURE | Register WU bit6 Select WU from the following values. iENABLE: Enable iDISABLE: Disable | iDISABLE |
WAKEUP_XL_INI | Set value of Register XL. X-Direction : Wake Up lower threshold [mT] | 0.0F |
WAKEUP_XH_INI | Set value of Register XH. X-Direction : Wake Up lower threshold [mT] | 0.0F |
WAKEUP_YL_INI | Set value of Register YL. X-Direction : Wake Up lower threshold [mT] | 0.0F |
WAKEUP_YH_INI | Set value of Register YH. Y-Direction : Wake Up upper threshold [mT] | 0.0F |
WAKEUP_ZL_INI | Set value of Register ZL. Z-Direction : Wake Up lower threshold [mT] | 0.0F |
WAKEUP_ZH_INI | Set value of Register ZH. Z-Direction : Wake Up upper threshold [mT] | 0.0F |
SENSITIVITY | Select Full-range or Short-range from the following values. iRANGE_FULL: Full-range iRANGE_SHORT: Short-range | iRANGE_FULL |
Config_INI | Set 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_OUT | Select from the following values to read magnetic data in 12-bit or 8-bit. i12BITS: 12bit i8BITS: 8bit | i12BITS |
POWER_MODE | Select 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_INI | Register 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | In 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_DIAG | In 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_DIAG | In any of the following cases. 1. Register Diag CF = 0 2. Register Diag T = 1 | ||
Parameter IN | uint8 wu_sts | Enable/disable the Wake-up function | Select 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | In 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 IN | float32 thres_xl | Wake-Up Lower X Threshold | full range 7.7LSB/mT (Typ.) short range 15.4LSB/mT (Typ.) |
float32 thres_yl | Wake-Up Lower Y Threshold | full range 7.7LSB/mT (Typ.) short range 15.4LSB/mT (Typ.) | |
float32 thres_zl | Wake-Up Lower Z Threshold | full range 7.7LSB/mT (Typ.) short range 15.4LSB/mT (Typ.) | |
float32 thres_xh | Wake-Up Upper X Threshold | full range 7.7LSB/mT (Typ.) short range 15.4LSB/mT (Typ.) | |
float32 thres_yh | Wake-Up Upper Y Threshold | full range 7.7LSB/mT (Typ.) short range 15.4LSB/mT (Typ.) | |
float32 thres_zh | Wake-Up Upper Z Threshold | full 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If other than the following values. eLOW_POWER_MODE, eFAST_MODE, eMASTER_CONTROL_MODE | ||
eSTS_ERR_DIAG | Fuse Parity Error | ||
Parameter IN | etTLE493D_P2B6_POWER power | Register MOD1 MODE set value | Select 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If 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_DIAG | Fuse Parity Error | ||
Parameter IN | etTLE493D_P2B6_RATE rate | Register MOD2 PRD set value | Select 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 value | etSTS | OSS-ECALステータスコード | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_DIAG | Fuse Parity Error | ||
Parameter IN | uint8 en_dis | Register MOD1 INT set value | Select 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_DIAG | Fuse Parity Error | ||
Parameter IN | uint8 ca | Register MOD1 CA set value | Select 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If other than the following values. eTEST_MODE_NO, eTEST_MODE_VAHLL, eTEST_MODE_SPIN, eTEST_MODE_SAT | ||
eSTS_ERR_DIAG | Fuse Parity Error | ||
Parameter IN | etTLE493D_P2B6_TEST mode | Regsiter TMode TST set value | Select 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If other than the following values. eTRIG_NO_TRIGGER, eTRIG_AFTER_WRITE, eTRIG_BEFORE_MSB, eTRIG_AFTER_05H | ||
Parameter IN | etTLE493D_P2B6_TRIGGER trig_type | Register Config TRIG set value | Select 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
Parameter OUT | stTLE493D_P2B6_RAW_O* rlt | Read 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_MAX | full-range: Exceeding 160.0 mT short-range: Exceeding 100.0 mT | ||
eSTS_ERR_MIN | full-range: Less than -160.0mT short-range:Less than -100.0mT | ||
Parameter OUT | stTLE493D_P2B6_O* rlt | Register 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
Parameter OUT | stTLE493D_P2B6_O* rlt | Register 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_MAX | In 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_MIN | In 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 OUT | stTLE493D_P2B6_O* rlt | Register 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 value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_DIAG | Fuse Parity Error | ||
Parameter IN | uint8 ca | Read 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 value | etSTS | OOSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_DIAG | Fuse Parity Error | ||
Parameter OUT | uint8* reg | reg[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.

State | vgTLE493D_P2B6_COMMAND | state transition condition | Process Overview | API Function |
---|---|---|---|---|
Initialize | iTLE493D_P2B6_INITIALIZE | 1. First time | TLE493D-P2B6 Initialize State | oTLE493D_P2B6_RESET oTLE493D_P2B6_WRITE_TRIGGER |
Measure | iTLE493D_P2B6_MEASURE | 1. Initialize completed 2. vgTLE493D_P2B6_COMMAND= iTLE493D_P2B6_MEASURE | 3D Hall Magnetic Measurement | oTLE493D_P2B6_READ_DIAG oTLE493D_P2B6_READ_MAG_TEMP |
Self-test | iTLE493D_P2B6_SELF_TEST | vgTLE493D_P2B6_COMMAND= iTLE493D_P2B6_SELF_TEST | Self-test | oTLE493D_P2B6_WRITE_TEST_MODE oTLE493D_P2B6_WRITE_TRIGGER oTLE493D_P2B6_READ_MAG_TEMP_RAW |
Error | iTLE493D_P2B6_ERROR | vgTLE493D_P2B6_COMMAND= iTLE493D_P2B6_ERROR | Error process | -* |
Low Power | iTLE493D_P2B6_LOW_POWER | vgTLE493D_P2B6_COMMAND= iTLE493D_P2B6_LOW_POWER | Low Power | oTLE493D_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.
Manufacturer | SDK/IDE Tool | HAL Name | Ver | HALNAME | Support |
---|---|---|---|---|---|
Arduino | Arduino IDE | Arduino | 1.8.6 | ARDUINO | X |
Debian | – | GNU/Linux | 10.3 | Linux | X |
Infineon | ModusToolbox | mtb-hal-cat1 | 2.4.3 | ModusToolbox | X |
NXP | MCUXpresso SDK | SDK_2.x_EVKB-IMXRT1050 | 2.16 | iMXRT1051B1052B | X |
Renesas | Synergy Software Package | HAL | 2.6.0 | SSP | X |
STMicroelectronics | STM32Cube | STM32CubeF4 | V1.28.1 | STM32F4 | X |
Development environment
The MCU and development environment during OSS-ECAL development are as follows.
HAL Name | Manufacturer | Board | MCU | IDE |
---|---|---|---|---|
ARDUINO | Arduino | 1.Mega 2560 Rev3 2.Arduino Pro Mini 3.3V | ATmega2560 ATmega328P | Arduino IDE 2.3.3 |
Linux | BeagleBoard | BeagleBone Black | TI AM335x | – |
ModusToolbox | Infineon | CY8CPROTO-063-BLE PSoC 6 BLE Prototyping Kit | CYBLE-416045-02 | ModusToolbox |
iMXRT1051B1052B | NXP | IMXRT1050-EVKB | i.MX RT1050 | MCUXpresso IDE |
SSP | Renesas | S7G2 SK | R7FS7G27H3A01CFC | e² studio for Renesas Synergy |
STM32F4 | STMicroelectronics | STM32 Nucleo-64 boards | STM32F401RETx | STM32CubeIDE |
File Structure
Folder* | File | Summary |
---|---|---|
TLE493D_P2B6_HALNAME_VERSION/sample | sample.c (.cpp) | Sample application program |
sample.h | Sample application header | |
TLE493D_P2B6_HALNAME_VERSION | oTLE493D_P2B6.c (.cpp) | OSS-ECAL program for TLE493D-P2B6 |
oTLE493D_P2B6.h | OSS-ECAL header for TLE493D-P2B6 | |
oTLE493D_P2B6_user.h | User configuration header for TLE493D-P2B6 | |
oss_ecal.h | OSS-ECAL common header | |
TLE493D_P2B6_ARDUINO.ino | Sample application programs for Arduino | |
user_setting.c (.cpp) | User configured constants and tables | |
user_setting.h | User configuration Header | |
oHAL_i2c_stm32f4.c | HAL Program for STM32Cube FW_F4 | |
oHAL_i2c_stm32f4.h | HAL Header for STM32Cube FW_F4 | |
readme.md | Readme | |
OSS-ECAL Terms of Use.txt | OSS-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