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: problems with TIMER2

Part Number: TDC7200
Other Parts Discussed in Thread: TDC1000

Hello,

I am using the TDC7200 in combination with the TDC1000 in measurement mode 2 to do a flow measurement. I am getting a start and a stop signal, but TIME2 register stays 0. The overflow registers say, that there was no overflow. So why stays the timer zero or is it possible that the component is broken? 

Best regards

Anna-Lena

  • Hello Anna-Lena,

    The TDC72000 must be configured for multiple stops if multiple stops are expected(default is 1 stop).  This is configured in configuration register 2.  TIME1 will store the measurement results from stop 1.  TIME2 will store the measurement results of the second stop, etc.  

  • Hello Eddie, 

    thank you for your answer! I only want to use one pulse. But i thought in measurement mode 2, I need Timer 1 and 2 to get mit TOF 1 time. 

      (Datasheet page 16)

  • Never mind the problem with timer 2 is solved.

    But anyway I have encountered a new problem. After the measurement is complete and I read the results in the registers, everything looks good except the Clock Counter 1. It has the value 0. Any idea what the problem might be? 

  • Part Number: TDC7200

    Hello,

    I am using TDC7200 in combination with TDC1000 to do a flow measurement. After the measurement is complete, I receive a stop signal at the TDC7200. When i read the registers after the INT Pin is low (which means that the measurement is complete), I have values for Timer1, Timer2, Calibration 1 and 2, but the Clock Counter is zero. I am also checking the INT-STATUS register for overflow and it says that no overflow is detected. The clock is working, so how is it possible that the clock counter is zero? DO you have an idea what the issue might be? 

    Best regards 

    Anna-Lena

  • Anna-Lena,

    If you check the other clock counters(clockcount2, clockount3, etc), are they also 0?  

  • yes there are also 0

  • I am looking into this and trying to reproduce on my side.  What clock frequency are you using? If you are using too slow of a clock, it is possible there are no full cycles counted.  

  • I am using 8 MHz clock frequency

  • Thanks!

    The clock frequency will also determine the minimum time you can measure.  For example, at 8MHz, the time period is 125ns.  This means for a start and stop with 125ns time, clockcount1 will read as 1.  If the time period measured is 250ns, clockcount1 will read 250ns.  

    If you are trying to measure a time period shorter than 125ns, clockcount will read 0 as a full clock cycle was not completed.  If you can use a 16MHz clock, this would allow for 62.5ns.  

    Does this make sense for your use case?  Are you trying to measure a time less than 125ns?

  • The time I want to measure is approximately about 16µs. So i would imagine that the clock counter would be something about 128.

  • Thanks Anna-Lena.  Yes,  I agree, with 16uS, this should be a valid measurement with results in the registers. 

    Are you using the EVM or your own hardware?  I tested with the EVM and was able to see counts of 1, 2, 3, 10, but I never took it to a much larger value.  I can try to reproduce this today by changing the time to ~16uS.  I will share the configuration and results I see.   

  • No I am using my own hardware. I am using an STM32 microcontroller and the ultrasonic transducers I also build myself. At the moment the setup is on a pin board. I wanted to try it before I made my own board. 

    This is my configuration:

    TDC7200_write (CONFIG1, 0x82); 
    TDC7200_write (CONFIG2, 0x61); 
    TDC7200_write (INT_STATUS, 0x00); 
    TDC7200_write (INT_MASK, 0x07); 
    TDC7200_write (COARSE_CNTR_OVF_H, 0xFF); 
    TDC7200_write (COARSE_CNTR_OVF_L, 0xFF); 
    TDC7200_write (CLOCK_CNTR_OVF_H, 0xFF); 
    TDC7200_write (CLOCK_CNTR_OVF_L, 0xFF); 
    TDC7200_write (CLOCK_CNTR_STOP_MASK_H, 0x00); 
    TDC7200_write (CLOCK_CNTR_STOP_MASK_L, 0x00); 

    TDC1000_write(CONFIG_0, 0x29); 
    TDC1000_write(CONFIG_1, 0x63); 
    TDC1000_write(CONFIG_2, 0x01); 
    TDC1000_write(CONFIG_3,0x12); 
    TDC1000_write(CONFIG_4,0x1F); 
    TDC1000_write(TOF_1, 0xA0);

    TDC1000_write(TOF_0,0x00); 
    TDC1000_write(ERROR_FLAGS,0x00);
    TDC1000_write(TIMEOUT,0x19);
    TDC1000_write(CLOCK_RATE, 0x00);

  • Thanks.  I have duplicated your configuration with the EVM.  I am able to see clockcount1=128 with 16uS timing as shown below.  It is strange that you are able to read the results registers correctly, but clockcount is not properly populated as this is not the behavior I see on the EVM.  I will consult with my colleagues and let you know any other thoughts we have.   

  • My values for TIMER1 and 2 are much higher, maybe this has also something to do with the clock counter. 

    TIMER1: 1728421, TIMER2: 1771646, CALIB1: 798, CALIB2: 8006

    But the clock is at 8 MHz, I have checked that

  • Anna-Lena,

    Are you able to read back the registers to ensure you are in mode 2?  I switched to mode 1 to see if I would receive something similar to your time1 and time2 values, but it doesn't really match up.  See below for mode 1 capture.  

    Also, do you have scope captures of the start and stop signals?  

  • Hello Eddie, 

    yes I can read back the registers and the measurement mode 2 is configured. Today I will try to test the TDC7200 without the TDC1000 and try to simulate a start and stop signal to see, whether the clock counter is working.