CCS/TMS320F28335: Logging data to PC using Delfino 28335 - reliable time stamps

Part Number: TMS320F28335

Tool/software: Code Composer Studio

Hello, we are currently designing a temperature controller based on Peltier TECs. Current stage involves setting a PID, and I need to log temperature data required to design the PID values. I have a couple of TMP100 already providing good measurements.

Now I need a way to log these measurements over extended periods of time (about 1 hour). Each measurement takes 2 bytes (10 bits precision from TMP100) from each TMP100 and is triggered by timer0 every 50ms. Because of the time constants in our system, I estimate I need 20 samples/sec. Since each TMP100 can do up 12 s/s (10bits resolution), I believe there will be no speed problems from TMP100's if I alternate them.

1) I have dumped data into PC using breakpoints in CCS debug mode, and writing to a file. But I am bit suspicious about the time frame, since x axis is just "sample" and I can't have a real time stamp. I'd like to be sure about the interval from one sample to another. Is there anyway to be more careful with the data time stamps? 

2) Is there a better way to log data directly into files? Maybe it should be done using DDS (about which I have read only http://processors.wiki.ti.com/index.php/Debug_Server_Scripting#Logging, but have no experience at all!). Any reference model/project/code involving data logging?

  • Guru 110705 points
    Hi,

    1) Given the fact breakpoints interrupt your target to transfer data in/out of the host PC, there is always a risk of missing samples while this operation is taking place. In this case, the only way I see you will have absolutely reliable timestamps is by making a time correlation of each sample on the hardware device itself. In other words, at each sample you could also store a timestamp and eventually transferring everything to the host PC.

    2) For your particular device both with the GUI and with DSS the breakpoint method is the most reliable way to transfer data to the host PC. While DSS can also output printf messages from the target device, this method not only increases the memory usage on the device but also sets an internal breakpoint to allow the host I/O operation to happen.

    I will try to think of other methods and report here in case I find something different.

    Hope this helps,
    Rafael

    When posting, click on the link Use Rich Formatting to attach images, files or use nice formatting.

    If my reply answers your question please click on the green button "Verify Answer".

    Search the wiki or go to useful pages for SDOWP, Compilers, CCSv3, CCSv4, CCSv5, CCSv6
  • In reply to desouza:

    Rafael,

    Thank you for your time and reply. Helpful indeed!

    1) I think you are right, probably setting up a FIFO and transmitting back to PC on breakpoints is the best way. I am just not sure there will be enough time. I am travelling right now and ASAP I will get back to it.

    2) Can you suggest other DSP kits that make real time communication with PC easier/more reliable?

    (À propósito, bom ver um brasileiro na TI! Abraço!)
  • Guru 110705 points

    In reply to Thiago Moraes:

    Thiago,

    2) The method to transfer data without interruption is usually via Trace - however, none of the C2000 devices have this feature (in fact, not many devices have this implemented).

    However, I re-read your post and saw the data rate is very small - 20SPS@10bits. The JTAG should be fine in transferring this, unless you have an array of TMP100s that will add to the raw data to be transferred.

    On the other hand, if data acquisition to a host is important in your project (and not only for debugging purposes), I would include in the design a communications port/protocol using a dedicated port on the device instead of JTAG - this way you would not require a CCS install on the host PC. Obviously that this approach is only feasible if you have the resources available (a serial port and enough RAM/FLASH/CPU).

    Um abraço,

    Rafael

    (brasileiros aqui no e2e são raros mas de vez em quando dão as caras... :) )


    When posting, click on the link Use Rich Formatting to attach images, files or use nice formatting.

    If my reply answers your question please click on the green button "Verify Answer".

    Search the wiki or go to useful pages for SDOWP, Compilers, CCSv3, CCSv4, CCSv5, CCSv6