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.

TDC7200: WRITE Function

Part Number: TDC7200
Other Parts Discussed in Thread: TDC1000

Tool/software:

HI !

I am facing issues while writing values to the registers.

I am able to read the default values of the registers on power on but unable to write any values.

I tried writing a 0x00 and a 0x45 value to the CONFIG1 register which was done successfully but i am unable to write any other value to the CONFIG1 register.

I am using a STM32 microcontroller.

How can i proceed further?

Thanks !

  • Hi Ritvik,

    Thank you for posting to the Sensors forum!

    Just to verify on my end, after writing to the registers, is it the case that you are unable to read back what you just wrote to it? Are you able to share a screenshot of the SPI write communication via a logic analyzer so that I can try to see if something may be wrong with the SPI communication?

    Best,

    ~Alicia

  • Hi Alicia,

    The problem I am facing currently is my results are very inconsistent. For eg. Yesterday I was able to read all the default values of all registers but now I am unable to do so . Also I tired writing a few values to my register CONFIG! which I could do without any issue but as soon as I use a loop i am unable to read or write .

    So I have a few doubts -

    1) Are there any conditions like i can only write specific values to a specific register?

    2)Do the registers reset only on POWER OFF and POWER OFF or i can reset the values using my code?

    3)Do I have to perform a single write or a single read command within one chip select transition or i can perform multiple functions within one chip select transition?

    Thanks

    Ritvik

  • Hi Ritvik,

    Apologies, I wasn't able to get to this today, but I should have some time tomorrow to look at this.

    Best,

    ~Alicia

  • Hi Alicia,

    No problem. Kindly get back to me ASAP!

    Thanks!

  • Hi Ritvik,

    I know you mentioned that previously you were unable to read from the device, are you able to do so now? You mentioned having issues when using a loop to read/write, are you able to share a waveform of what this looks like via a logic analyzer?

    1) Are there any conditions like i can only write specific values to a specific register?

    Generally speaking, you should be able to configure the R/W registers with whatever makes sense for your application. The only bits you should not write to are the ones marked as reserved in the datasheet.

    2)Do the registers reset only on POWER OFF and POWER OFF or i can reset the values using my code?

    When the device is powered down or the ENABLE pin is pulled to GND, the register settings will be lost as the internal LDO is turned off. The device will then initialize the registers with the default settings when the powered on and the ENABLE pin is tied to VDD.

    3)Do I have to perform a single write or a single read command within one chip select transition or i can perform multiple functions within one chip select transition?

    You should be able to perform multiple reads or writes within a single chip select signal. Just make sure that a write transaction consists of a single write command byte, followed by single data byte, and a read transaction consists of a single read command byte followed by 8 or 24 SCLK cycles.

    Best,

    ~Alicia

  • HI Alicia,

    I am able to read and write the registers now.

    I have another query initially i want to send a trigger signal from the TDC7200 to my TDC1000 and check if a START pulse is generated, what are the settings which i will have to do in order to do so.

    Also should i pull the enable pin low after my main code is executed.

    Thanks,

    RItvik.

  • Hi Alicia,

    Kindly revert back ASAP!! I am running late with my project.

    Thanks

    Ritvik

  • Hi Ritvik,

    Apologies for the delayed response.

    To use a TDC7200 to trigger a START pulse on a TDC1000, you need to set the measurement sequence on the TDC7200 via SPI and ensure the two chips are correctly connected (i.e., the start pin of the TDC1000 is connected to the TDC7200). The TDC7200's TRIG output pin will send a pulse to the TDC1000's TRIGGER input pin, which prompts the TDC1000 to initiate an ultrasonic pulse and generate its own START pulse.

    For more information on this please see the following document https://www.ti.com/lit/ug/tidu965a/tidu965a.pdf.

    Best,

    ~Alicia