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.

TDC1000-C2000EVM

Other Parts Discussed in Thread: TDC1000, TDC1000-C2000EVM

As part of my evaluation of the TDC1000, I would like setup the TDC1000-C2000EVM kit from a Python script which will send//receive command/response over the kit's USB interface instead of using the GUI app that is provided. Where can I find documentation for these command/responses for the kit's serial port?

  • Steve,

    There is a command/response protocol between the PC GUI and EVM C2000. Following are the important features of this:

    -          Command/Response Protocol: GUI is the master sending the command and C2000 sends slave response.

    -          Packet buffer (32byte in size) is exchanged between GUI and C2000

    -          Command packet from GUI is ASCII while packet response from C2000 is always in binary.  

    -          File “host_interface.h” file lists all the packet commands available:

    In command packet buffer GUI fills bytes 0-7: bytes0/1 constitute the command, rest any data associated with the command, bytes 8-31 is 0

    In response packet buffer C2000 fills in bytes 8-31. Bytes 0-7 is usually left unchanged. Always a response is sent to let GUI know C2000 received the command. So the response packet is some times identical to command packet.

    -          For example

    30 32 30 38  30 30 30 30  30 30 30 30  30 30 30 30  30 30 30 30  30 30 30 30  30 30 30 30  30 30 30 30

    is a command (0x02) from GUI to do a TDC1000 spi byte write to register address (0x08) the value (0x0). Since this is a write command, the C2000 simply echos back the packet buffer w/o any change.

    -          There are two types of TOF commands:

               a) TOF_One_Shot where a single TOF measurement is made in response to the command

               b) TOF_Graph, where the C2000 continuously makes  TOF measurements (every TRIGGER_UPDATE_FREQ period) and sends a response packet

    - C2000 High Resolution Timer makes the TOF measurement. A TOF measurement is sent as an unsigned 32-bit quantity in C2000 Q16 format. GUI does the conversion to real time. Formula to convert it to ns: ((u32 / 65536) x 1000) / 120), where 120MHz is the HR Time freq and it is a 16-bit timer.  u32 is the value derived from the packet buffer bytes pbuf[8]...pbuf[11], where pbuf[8] is the msb.

    - High Resolution Timer overflow count is also sent as 16-bit unsigned value as part of the TOF response. oc16 is the overflow count value derived from the packet buffer bytes pbuf[12], pbuf[13, where pbuf[12] is the msb. If there is an overflow, you add  (oc16 x 546.133333) us to the result.

    - Please refer to C2000 data sheet and user guide and examples for more information on the high resolution timer.

    - TDC1000 based temperature measurement is a special case. In this 5 measurements are made (corresponding to 5 stop pulses), and the response packet has 5 32bit unsigned values in Q16 format beginning at pbuf[8]. No overflow count is sent in this case.

    Note: TDC1000-C2000EVM Firmware source code is part of the GUI Software install folder. You can find the source code zip in the following GUI install folder of your PC

    C:\Program Files (x86)\Texas Instruments\TDC1000_C2000\Firmware

    Thanks,

    Vishy

    host_interface.h

  • Vishy,

    Thank you for this excellent overview on the TDC1000-C2000EVM's serial command/response protocol, and also the information on where to find all necessary details in the source code files.

    Steve Welch