This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMAG5273: Error when reading data

Part Number: TMAG5273


Hi,

after a random number (usually around a few hundred thousand) of measurements, the sensor starts sending the value 64 and the DIAG_STATUS bit in the CONV_STATUS register is set to 1. I have replaced the sensor and the error still occurs.

Hardware setup:

Supply voltage: 3.3 V

I2C frequency: about 300 kHz

INT pins not connected (not used due to lack of free MCU pins)

No devices other than the two TMAG5273 sensors share the I2C line

TMAG5273 Configuration:

DEVICE_CONFIG_1 (0x2A):

I2C_RD               2h = 1-byte I2C read command for 8 bit sensor MSB data and conversion status

CONV_AVG        2h = 4x average, 3.1-kSPS (3-axes) or 8.0-kSPS (1 axis)

MAG_TEMPCO  1h = 0.12%/ deg C (NdBFe)

CRC_EN             0h = CRC disabled

SENSOR_CONFIG_1 (0x40):

MAG_CH_EN 4h = Z channel enabled

SLEEPTIME    0h = 1ms

SENSOR_CONFIG_2 (0x03):

X_Y_RANGE 1h = ±80mT (TMAG5273A1) or ±266mT (TMAG5273A2)

Z_RANGE     1h = ±80mT (TMAG5273A1) or ±266mT (TMAG5273A2)

All others fields in default state

INT_CONFIG_1 (0x01):

MASK_INTB 1h = INT pin is disabled (for wake-up and trigger functions)

All others fields in default state

All others registers in default state

Method of reading data:

1. Wake up, and trigger conversion on first sensor (DEVICE_CONFIG_2 = 0x00 (standby mode)):

then, the same for the second sensor:

2. Read data on both sensors:

3. Put both sensors to sleep (DEVICE_CONFIG_2 = 0x01 (sleep mode)):

Summary:

When reading data on one of the sensors (sometimes also on two), the value of the CONV_STATUS register is 0x03, i.e.:
RESULT_STATUS 1h = Conversion data complete
DIAG_STATUS       1h = Diag fail detected

Diag fail detected is described as

Detect any internal diagnostics fail which include VCC UV, internal
memory CRC error, INT pin error and internal clock error. Ignore this
bit status if VCC < 2.3V

I would like to ask for help as I don't know how to solve this problem.

  • Hello Jakub, 

    Thanks for posting to the sensors forum and for all the detailed information!

    Have you tried reading the DEVICE_STATUS register whenever the DIAG_STATUS indicates that there is an error or fault?

    Reading this register will help identify which one of the items listed above in the diag fail is causing triggering the fail flag. Some items you may be able to try to see would be shorting the INT pin to ground to see if this error is still observed and checking if the VCC provided to the device ever drops causing a under voltage (UV) fault.

    Let me know if you are able to obtain more information on this fault or try any of the suggested items!

    Best,

    Isaac 

  • Hello Isaac,

    forgive me for such a long delay in replying, there were problems in reproducing the error.

    A check of the DEVICE_STATUS register gave the following results:

    It turns out that there are indeed voltage dips during circuit operation.

    Bit 1 is high so:

    "Indicates if VCC undervoltage was detected. Bit is clear when host
    writes back '1'. Ignore this bit status if VCC < 2.3V.
    0h = No VCC UV detected
    1h = VCC UV detected"

    In another case, an INT pin error occurred. It is likely that when the INT pin is connected to GND, this error will stop occurring, but this is still to be done.

    "Indicates if INT pin error is detected. Bit is clear when host writes
    back '1'.
    0h = No INT error detected
    1h = INT error detected"

    Sensors resumed operation after the power was turned off and on again. Is there any other way to make the sensors work once there are errors in the DEVICE_STATUS register?

  • Hi Jakub,

    The team is out today on holiday.  We should be able to get back to you later this week.

    Regards,

    Mekre

  • Hi Jakub,

    As you'll be connecting the INT pin to GND, one thing to keep in mind is that you will also need to set the MASK_INTB bit to 1h:

    To help clear the errors you'll need to write '1' to the bit where the error gets flagged.

    Best,

    ~Alicia

  • Problem solved, thank you.