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.

TDC7201: No data at TDCx_Calibration1 (1Bh) and TDCx_Calibration2 (1Ch)

Part Number: TDC7201

Hi, 

On a custom design, after enabling the external clock (12MHz), providing a singular low to high pulse on ENABLE, writing both 0x41 and 0xC1 to TDCx_CONFIG1 and 0x40 to TDCx_CONFIG2 it results in values in TDCx_TIME1 and TDCx_INT_STATUS to become 0x19 from originally being 0x00. I've also set TDCx_INT_MASK to 0x07 and 0x00 to enable and disable interrupts. In doing all this however, before and after initialization and sending our measured signal the TDCx_CALIBRATION1 and TDCx_CALIBRATION2 values are always 0x000000. I never see any data saved in these locations. The only things I could find in the datasheet that would reinitialized these registers to 0x000000 or not do a calibration sequence is the following: 

1. The ENABLE pin going low. "The ENABLE pin is used as a reset to all digital circuits in the TDC7201." 

2. Starting a new measurement. "Start New Measurement. Writing a 1 will clear all bits in the Interrupt Status Register and Start the measurement (by generating a TRIGG signal) and will reset the content of all Measurement Results registers (TDCx_TIME1 to TDCx_TIME6, TDCx_CLOCK_COUNT1 to TDCx_CLOCK_COUNT5, TDCx_CALIBRATION1, TDCx_CALIBRATION2) to 0."

3. If an interrupt happens: "Only if a measurement is interrupted (for example, due to counter overflow or missing STOP signal), calibration is not performed." 

I've looked into all of these situations, ENABLE is always high (and I see values at other registers), I cannot start a measurement without setting bit 0 of TDCx_CONFIG1 to 1, and the fact that TDCx_INT_STATUS registers come back after the measurement as showing 0x19 (0b00011001 i.e. Measurement has completed, Measurement has started, No overflow detected (CLOCK_CNTR_OVF_INT), No overflow detected (COARSE_CNTR_OVF_INT) , and Interrupt detected - New Measurement has been completed (NEW_MEAS_INT). 

Is there any other reason that I haven't been able to find which would disable or reset the TDCx_CALIBRATION (1 and 2) registers? Such as locked memory, or other other reasons? 

Thanks for the help, 

Logan

  • Hi Logan,
    We got your request. Allow us some time to check this and get back to you.

    Best Regards,
    Bala Ravi
  • Hi Bala Ravi, 

    I look forward to your response. Please see attached schematic of the TDC7201 for reference if it helps you at all. 

    Thanks, 

    Logan

  • Hi Bala Ravi,

    See the following printed readout from my code for sequencing and register initialization.


    Set OSC_ENABLE as Digital Output
    Set OSC_ENABLE to high to enable TDC Clock
    Set TDC_ENABLE as Digital Output
    Ensure TDC_ENABLE is low until ready to enable TDC chip
    Set CS lines as high outputs
    Ensured CS lines are not enabled
    Set TDC_ENABLE to high to enable TDC Chip
    SPI Bus Opened
    Data at TDC1_CALIBRATION1 location 0x1B is 000000
    Data at TDC2_CALIBRATION1 location 0x1B is 000000
    Data at TDC1_CALIBRATION2 location 0x1C is 000000
    Data at TDC2_CALIBRATION2 location 0x1C is 000000
    Writing to TDC1_CONFIG2 location 0x01 41C0
    Writing to TDC2_CONFIG2 location 0x01 41C0
    Writing to TDC1_INT_MASK location 0x03 4307
    Writing to TDC2_INT_MASK location 0x03 4307
    Data at TDC1_CONFIG1 location 0x00 is 00
    Data at TDC2_CONFIG1 location 0x00 is 00
    Data at TDC1_CONFIG2 location 0x01 is C0
    Data at TDC2_CONFIG2 location 0x01 is C0
    Data at TDC1_INT_STATUS location 0x02 is 00
    Data at TDC2_INT_STATUS location 0x02 is 00
    Data at TDC1_INT_MASK location 0x03 is 07
    Data at TDC1_INT_MASK location 0x03 is 07
    Writing to TDC1_CONFIG1 location 0x00 40C1
    Writing to TDC2_CONFIG1 location 0x00 40C1
    START signal sent
    Data at TDC1_TIME1 location 0x10 is 000584
    Data at TDC1_CLOCK_COUNT1 location 0x11 is 000000
    Data at TDC1_Calibration1 location 0x1B is 000000
    Data at TDC1_Calibration2 location 0x1C is 000000
    Data at TDC2_TIME1 location 0x10 is 0005E7
    Data at TDC2_CLOCK_COUNT1 location 0x11 is 000000
    Data at TDC2_Calibration1 location 0x1B is 000000
    Data at TDC2_Calibration2 location 0x1C is 000000
    Data at TDC1_INT_STATUS location 0x02 is 19
    Data at TDC2_INT_STATUS location 0x02 is 19
    Data at TDC1_CONFIG1 location 0x00 is C0
    Data at TDC2_CONFIG1 location 0x00 is C0
    Data at TDC1_COARSE_CNTR_OVF_H location 0x04 is FF
    Data at TDC1_COARSE_CNTR_OVF_L location 0x05 is FF
    Data at TDC2_COARSE_CNTR_OVF_H location 0x04 is FF
    Data at TDC2_COARSE_CNTR_OVF_L location 0x05 is FF

    Thanks,
    Logan
  • To Whoever It May Concern,

    I was able to solve this last night. My registers didn't change at all in finding the solution, however my sequencing and timing did. I can't say for sure, but what seemed to be the problem was when the pulse signal was sent. I had based the signal being sent off of timing (by waiting long enough for the TRIGG signal to arrive) vs actually checking to see whether the TRIGG was sent. It seems like waiting too long before sending the pulse or not reacting to the TRIGG signal fast enough caused the CAL registers to not write or overwrite to 0x000000.

    TDCx_CONFIG1 0x00 = 0xC1 (I had also tried 0x41)
    TDCx_CONFIG2 0x01 = 0xC0 (I had also tried 0x40)
    TDCx_INT_STATUS 0x02 = starts as 0x00 after signal went to 0x19
    TDCx_INT_MASK 0x03 = 0x07
    ***The rest of the registers were kept as default***
    TDCx_TIME1 0x10 = received values everytime
    TDCx_CLOCK_COUNT1 0x11 = did not received values (as expected because I was in measurement mode 1)
    TDCx_CALIBRATION1 0x1B = 0x000000 (before changing code), received values after changing code
    TDCx_CALIBRATION2 0x1C = 0x000000 (before changing code), received values after changing code

    After lots of different trials, testing and the modification of my code to ensure that the TRIGG signal had been received, I immediately go into sending my pulse. This solved the problem.

    Hopefully my write up helps someone else.

    Thanks,
    Logan