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: Overall Procedure and Starting Measurement after Sleep Mode

Part Number: TMAG5273


Hi Team,

Good day! I am posting this in behalf of the customer. Kindl please help. 

We have now selected the TMAG5273 for a new product of ours because the specifications and features are interesting.

We would like to operate the TMAG5273 in low-power mode with the following sequence.

  1. TMAG5273 waits in sleep mode
  2. Host MCU wakes TMAG5273 through I2C and starts measurement
  3. Host MCU periodically checks conversion result register and reads measurement if ready
  4. Set TMAG5273 to sleep
  5. Host MCU waits X amount of time (defined by us) when to restart from Step 1

Now, I think that from the datasheet we've found most of the functionality however we need some final help/instructions from your end.

  1. After setting the operating mode to sleep, how do we wake up the TMAG5273 using I2C again? and how do we trigger a new measurement?
  2. Should we take care of magnetic offsets in the reading? For example with other magneto resistive magnetometers we would SET/RESET the field to cancel out any offsets.

I look forward to hearing from you.

  • Hi Jonathan, 

    Thank you for posting to the Sensing Forum!

    When in sleep mode, any I2C communication will cause the device to wake up. To do this, send a dummy read/write command over the I2C lines to wake up the device, followed by a read of one of the result registers.

    If you need to enable offset correction for a pair of magnetic axes, registers MAG_OFFSET_CONFIG_1 and MAG_OFFSET_CONFIG_2 allow you to store the offset values to be corrected in 2's complement form. To choose the magnetic axes to implement the offset correction on, you will need to choose one of the following options, shown below, in register SENSOR_CONFIG_2 --> ANGLE_EN. Further details can be found in section 7.5.2.4 of the datasheet.

    Best,

    ~Alicia

  • Hi Alicia,

    Thank you for the support. Here is the customer's further clarification. 

    1. Regarding waking up the TMAG5273 - noted, we can read the DEVICE_ID Register for example to confirm that the sensor is awake.
    2. Should we ground the INT pin (Pin 5) if Interrupts are not going to be used?
    3. As explained in this post (e2e.ti.com/.../tmag5273-issue-putting-sensor-in-sleep-mode-to-much-current-consumption), MASK_INTB needs to be set to 1 in order for the part to sleep. Should we set MASK_INTB to 1 always before sleep or once before startup?
    4. How do we get a new magnetic reading after wake-up from sleep? When OPERATING_MODE is sleep mode I do not think that the result registers are updated automatically but a new reading needs to be triggered?
    5. Can the TMAG5273 readings be affected by the residual flux of the magnetic core in the transducer?

    Best regards,

    Jonathan

  • Hi Jonathan,

    If your customer is not going to be using the INT pin, then I would recommend grounding the INT pin. When it comes to setting MASK_INTB to 1, your customer should just need to set it once before startup as the device does retain key user configuration settings. Depending on how high the residual flux of the magnetic core in the transducer is, it may be possible that the readings taken by the TMAG5273 are affected by it.

    Regarding your customer's question on how to get a reading after waking the device up from sleep, similar to how they are planning to read the DEVICE_ID Register to wake-up the device, assuming that your customer is using the standard 3-byte I2C read, your customer would need to do a read of one (or more) of the desired result registers (i.e., X_MSB_RESULT, X_LSB_RESULT, Y_MSB_RESULT, etc.).

    Best,

    ~Alicia

  • Hi Alicia,

    Thank you for your response. Please find the latest questions below.

    1. In order to take a reading, we should enable the correct channels using MAG_CH_EN, correct?
    2. Does the sensor automatically take a magnetic reading after wake up from sleep? How do we start a magnetic measurement if we are using sleep mode and not the other Operating methods.
    3. "Depending on how high the residual flux of the magnetic core in the transducer is, it may be possible that the readings taken by the TMAG5273 are affected by it." What can we do to prevent this? Is it possible to Set/Reset the internal magnetization? If not, how can our readings be reliable?

    Best regards,

    Jonathan

  • Hi Jonathan,

    In order to take a reading of a data channel, you will need to enable the channel in MAG_CH_EN.

    After waking up from sleep mode, the device goes into Stand-by mode. Because a magnetic conversion is not taken automatically after waking up, your customer will need to trigger a new conversion using an I2C command. See section 7.4.2 Sleep Mode for more details. 

    While there is not a way to reset the internal magnetization, the TMAG5273 does offer offset correction for a pair of magnetic axes. For example, if an uncorrected waveform for a particular axis has a value that is +2 mT too high, the offset correction value of -2 mT can be entered in the corresponding offset correction register to correct this. See Section 7.5.2.4 Magnetic Sensor Offset Correction for more details.

    Best,

    ~Alicia

  • Hi Alicia,,

    Thank you for the support. We have futher question. 

    1. In order to take a reading of a data channel, you will need to enable the channel in MAG_CH_EN.
    >Should this be enabled only once on startup? Or on each wakeup?

    2. Section 7.4.2 does not specify which I2C command should be used to trigger a new magnetic conversion. Kindly specify this. The process of starting a magnetic conversion and checking when it has finished to read the magnetic result registers.

    3. Previously you stated "Depending on how high the residual flux of the magnetic core in the transducer is, it may be possible that the readings taken by the TMAG5273 are affected by it." How can this issue be prevented? Will the magnetic core reset to its original state once the high residual flux is taken away? Our concern is that this is going to make the TMAG5273 readings unreliable in certain environmental conditions.

    Best regards,

    Jonathan

  • Hi Jonathan,

    The MAG_CH_EN should only need to be enabled once during startup.

    To trigger a new magnetic conversion you can use either a standard I2C write or a standard 3-byte I2C read. For both I2C commands, the MSB of the second byte contains the conversion trigger bit, and writing a '1' at this trigger bit will start a new conversion after the register address decoding is completed. 

    Below shows an example of the general call I2C write command supported by the TMAG5273:

    This next image shows an example of the standard I2C three byte read command supported by the TMAG5273:

    Section 7.5.1.3 I2C Read/Write has more information on the I2C functions supported by the TMAG5273.

    Additionally, you can check to see when the conversion data buffer is ready to be read by checking RESULT_STATUS found in the CONV_STATUS Register:

    Once the RESULT_STATUS reads back a '1' signaling that the data is ready to be read, you can perform an I2C read of the result registers.

     Regarding your third question, to clarify my previous statement, the TMAG5273 is designed to read the magnetic field around it, so it is not necessarily that the device will give an incorrect magnetic reading, it is just that if the transducer is giving off a strong enough field, then the device will read those fields as well.

    I would recommend doing some tests both with the transducer and without to see if there is a noticeable difference in the readings as it may be the case that the transducer is far enough away or gives off such a low magnetic field that it is not noticeable by the TMAG5273. If there is a noticeable difference and you would like to mitigate this, you may be able to use magnetic shielding to divert the magnetic flux from the transducer away from the TMAG5273.

    Best,

    ~Alicia

  • Hi Alicia,

    Regarding the trigger of a new magnetic conversion, please see my question below.
    Generally we would not need to write registers on wake-up. Should we for example attempt to read the DEVICE_ID and trigger a new magnetic conversion at the same time? For example 0x0D is the register offset for the DEVICE_ID register. If we read register 0x8D (0b10001101) instead, we would be able to trigger a new magnetic conversion and read the DEVICE_ID at the same time?

    Best regads,

    Jonathan

  • Hi Jonathan,

    Reading register 0x8D should be enough to trigger a new magnetic conversion; however, if this is the command that you are using to wake-up the device, it may be necessary to read 0x8D again, as generally, the first I2C command is used to wake-up the device and so no acknowledge is sent to the primary so the device may not trigger a new conversion with that first I2C communication.

    Best,

    ~Alicia