Part Number: TDC7200
I am using TDC7200 with STM32F4. I am able to read and write into the TDC7200 registers (CONFIG1 and CONFIG2) over SPI without any problem. The issue is that after I write a 0x01 or 0x03 into CONFIG1 register, I don't get any TRIGGER signal. I am able to read back the same CONFIG1 register and see that the register value has changed to whatever I have configured. The values of other registers are kept default and only CONFIG1 register is modified. I have checked the CLOCK - its 8MHz. SPI CLOCK - SCLK is 8MHz as well. There is a LOW to HIGH on ENABLE Pin at the beginning as well.
For my purpose, I am not using TDC1000. Both TRIGGER and INTB of TDC7200 are connected to MCU (STM32F4) as interrupts. Upon receiving TRIGGER interrupt, I am sending START followed by STOP signals to the TDC7200 to get INTB interrupt and then proceed for calculations of TOF.
What could be the problem ? Why am I not able to get TRIGGER interrupt from TDC7200 ? Is there something that I have missed ? Can someone help ?
Thanks in advance.
Found the issue. It was the hardware. There was a resistor not populated (DNP), which was supposed to be populated. Once populated, the issue got resolved.
Now I am able to read the CALIBRATION registers 1 and 2, TIME registers, CLOCK_COUNT registers as well. Based on this I am calculating TOF as per the datasheet.
But now I am facing another kind of issue. I get a TRIGGER, after 1ms I am sending a START pulse, and after (another) 1ms, I am sending a STOP pulse. I am writing 0x03 (Mode-2) into CONFIG1 register. I have tried writing 0x41 into CONFIG2 register and I have tried by keeping CONFIG2 register default as well. All other registers are kept default. After I get the interrupt for STOP, I read CALIBRATION 1 and 2 registers, TIME1 and 2 registers and CLOCK_COUNT1 register.
CALIBRATION 1 and 2 registers show 2137 and 21350 respectively. The values of these two registers are almost same every time. And since these registers are non zero, there is no overflow in clock or coarse counters. (I even checked the INT_STATUS register - it gives 0x19, which means Measurement Completed, Measurement has started and Interrupt detected).
TIME1, TIME2 and CLOCK_COUNT1 registers keep varying every time. Some times TIME1 > TIME2, some times TIME1 < TIME2. When TIME1 < TIME2, the TOF value is negative.
I have maintained the delay between START and STOP constant - 1ms.
What could be the reason for varying and negative TOF ? Can someone please help ? Stuck at this for a while now.
Thanks in advance,
In reply to Ananth C G:
In reply to Bogdan Patlun:
In my case it was a hardware issue. There was a resistor that had to be populated which was not. I checked the schematics and found this. Then populated this resistor. This was the fix for me.
If this is not the issue in your case, it might be the problem with CLOCK to the TDC7200 or failure in SPI Write or ENABLE pin might not be set initially before writing to TDC7200 registers. Verify all these.
1. Make sure there is a LOW to HIGH transition in the ENABLE pin before doing anything. Probe the ENABLE pin of TDC7200 and see if this pin is continuously HIGH.
2. Probe the CLOCK pin of TDC7200 and check for continuous clock once the TDC is enabled.
3. Read back the registers and check if they match with what you had written.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.