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.

TMAG5173-Q1: I2C General Call Write Usage and Conversion Status Register

Part Number: TMAG5173-Q1
Other Parts Discussed in Thread: TCAL9539-Q1, TCAL9539

Tool/software:

Hello,

We are using multiple TMAG5173-Q1 and a single TCAL9539-Q1 IC on the same I2C bus in our project. If we start the measurement simultaneously on all sensors using the General Call Write, would this cause any operational issues with the TCAL9539, which is also connected to this bus?

Additionally, does the General Call I2C Write command trigger the conversion first, or does it write to the register first?

Regarding the Conversion Status Register, does the RESULT_STATUS pin go to 1 after each measurement and then pull itself back to 0 after being read?

Best regards,
Egemen

  • Hi Egemen,

    Thank you for posting to the Sensors forum!

    We are using multiple TMAG5173-Q1 and a single TCAL9539-Q1 IC on the same I2C bus in our project. If we start the measurement simultaneously on all sensors using the General Call Write, would this cause any operational issues with the TCAL9539, which is also connected to this bus?

    If the TCAL9539 device has the same address or can be addressed by the generic I2C address of 0x00, then it could be the case that writing to the TMAG5173 could also write to the TCAL9539. For more specific information on how the TCAL device might be affected, I would recommend asking for clarification on the Interface forum as they would have more knowledge on the TCAL9539 part than me.

    Additionally, does the General Call I2C Write command trigger the conversion first, or does it write to the register first?

    The device will write to the register first.

    Regarding the Conversion Status Register, does the RESULT_STATUS pin go to 1 after each measurement and then pull itself back to 0 after being read?

    When a conversion is triggered, the RESULT_STATUS bit will be 0. When the conversion is completed, it will remain 1 until another conversion is triggered.

    Best,

    ~Alicia

  • Hello,

    Thank you for the reply,

    For the first question I redirected my question to the Interface Forum.

    About second question:

    v_TMAG5173_setMagChannels(ps_tmag, TMAG5173_MAG_CH_XYZPAFE);
    v_TMAG5173_triggerConv(ps_tmag);

    Can we merge these two functions into a single function that performs both testing and starts the conversion?

    About third question:

    How can we ensure that a measurement has taken place after a Global Write?

    How can we determine whether any sensor has been triggered for any reason?

    We want to be sure that the measurement is completed in every cycle.

    How can we confirm that the device registers have been updated?

    Since the acknowledgment will be OR-ed, we cannot rely on it for verification.

    Best regards,

    Egemen

  • Hi Egemen,

    Regarding your second question, you should be able to combine the command to enable the magnetic channels and the command to trigger a conversion.

    Regarding your third question, you can configure the device to send an interrupt via the INT pin whenever a conversion is completed. This way you can have the INT pins from the TMAG5173 tied to their own GPIO on the MCU and know which device has completed a conversion.

    Best,

    ~Alicia

  • Hello Alicia,

    In our design INT pins are not connected to the any GPIOs. INT pins tied to the GND. Could we ensure that a measurement has taken place with reading any register?

    Best regards,

    Egemen 

  • Hi Egemen,

    Reading the Result_Status bit in the CONV_STATUS is another good way to verify if a conversion has completed. You would just need to make sure to read these registers before triggering another conversion to make sure one was completed.

    Best,

    ~Alicia

  • Hi Alicia

    The device will write to the register first.

    In datasheet "Section 7.5.1.3.1 Standard I2C Write" there is sentence:
    "Writing '1' at this trigger bit will start a new conversion after the register address decoding is completed."

    Because of this sentence I understand that the device will trigger conversation first, than write the command. But I tried AFE test with combined command and test passed. 

    Can you please clarify that for me?

    Best regards,

    Mesut

  • Hi Mesut,

    The register address decoding is completed at the end of the I2C transaction.

    Best,

    ~Alicia

  • Hi Alicia

    Thank you for your answer. 

    My doubt is not clear yet. Can you confirm that does register update take effect immediately before start of new conversions?

    I want to make sure that when I set the magnetic channel with start conversion command I will get the correct results on the next read after the conversion is completed.

    Best regards,

    Mesut

  • does register update take effect immediately before start of new conversions?

    Yes.

    The above snippet of I2C communication logs show the device starting with no channels enabled (Register 0x02 = 0x00). After this, I read the result registers which all reads back zero (which is expected as no channel is enabled). From here, I enabled all channels and triggered a conversion. After that, I read CONV_STATUS to ensure that a conversion is completed followed by the result registers. Because conversions start after the register update takes place, I am able to read back data. If this were not the case and conversions happened before the register gets updated, I would have only read back zeros as no channels were enabled. An example of a conversion taking place with no channels enabled is shown below:

    As seen in the image above, because no channel was enabled the results read back only 0s even after a conversion was completed.

    Best,

    ~Alicia