Hi,
I am using TDC7200 with my MCU. I have enabled the ENABLE pin at the beginning of my configuration. SPI Read and Write are working fine. I am writing a 0x03 (Measurement Mode-2) into CONFIG1 register. Other register values are not modified. I get a TRIGGER signal, after 1ms I send a START pulse. After 2ms I send a STOP pulse. I get the INTB interrupt after 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).
CLOCK_COUNT1 register also shows same value - between 3620 and 3630.
TIME1 and TIME2 registers keep varying every time. Some times TIME1 > TIME2, some times TIME1 < TIME2. When TIME1 < TIME2, the TOF value is negative.
The log is as follows:
************************************************************
TRIGGER Signal Received
INTERRUPT Signal Received
CALIBRATION1_Data_Received = 2136
CALIBRATION2_Data_Received = 21338
TIME1 = 1752
TIME2 = 1585
CLOCK_COUNT1 = 3631
calCount = 2133.555556
norm_LSB = 0.00000000005858764712
TOF = 0.00000000978413706906
************************************************************
************************************************************
TRIGGER Signal Received
INTERRUPT Signal Received
CALIBRATION1_Data_Received = 2137
CALIBRATION2_Data_Received = 21348
TIME1 = 865
TIME2 = 1186
CLOCK_COUNT1 = 3630
calCount = 2134.555556
norm_LSB = 0.00000000005856019989
TOF = -0.00000001879782416324
************************************************************
************************************************************
TRIGGER Signal Received
INTERRUPT Signal Received
CALIBRATION1_Data_Received = 2137
CALIBRATION2_Data_Received = 21346
TIME1 = 1732
TIME2 = 1216
CLOCK_COUNT1 = 3628
calCount = 2134.333333
norm_LSB = 0.00000000005856629705
TOF = 0.00000003022020927690
************************************************************
************************************************************
TRIGGER Signal Received
INTERRUPT Signal Received
CALIBRATION1_Data_Received = 2135
CALIBRATION2_Data_Received = 21333
TIME1 = 794
TIME2 = 328
CLOCK_COUNT1 = 3626
calCount = 2133.111111
norm_LSB = 0.00000000005859985415
TOF = 0.00000002730753203459
************************************************************
************************************************************
TRIGGER Signal Received
INTERRUPT Signal Received
CALIBRATION1_Data_Received = 2136
CALIBRATION2_Data_Received = 21337
TIME1 = 1312
TIME2 = 934
CLOCK_COUNT1 = 3628
calCount = 2133.444444
norm_LSB = 0.00000000005859069840
TOF = 0.00000002214728399563
************************************************************
************************************************************
TRIGGER Signal Received
INTERRUPT Signal Received
CALIBRATION1_Data_Received = 2135
CALIBRATION2_Data_Received = 21334
TIME1 = 1255
TIME2 = 1356
CLOCK_COUNT1 = 3629
calCount = 2133.222222
norm_LSB = 0.00000000005859680192
TOF = -0.00000000591827699359
************************************************************
************************************************************
TRIGGER Signal Received
INTERRUPT Signal Received
CALIBRATION1_Data_Received = 2135
CALIBRATION2_Data_Received = 21335
TIME1 = 889
TIME2 = 1853
CLOCK_COUNT1 = 3627
calCount = 2133.333333
norm_LSB = 0.00000000005859375000
TOF = -0.00000005648437500000
************************************************************
************************************************************
TRIGGER Signal Received
INTERRUPT Signal Received
CALIBRATION1_Data_Received = 2136
CALIBRATION2_Data_Received = 21338
TIME1 = 2075
TIME2 = 1046
CLOCK_COUNT1 = 3630
calCount = 2133.555556
norm_LSB = 0.00000000005858764712
TOF = 0.00000006028668888657
************************************************************
I have maintained the delay between START and STOP constant - 2ms.
What could be the reason for varying and negative TOF ? Can someone please help ? Stuck at this for a while now.
Thanks in advance,
Ananth