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.

realtime data transfer with ADS1605 and TMS320C6416 / readblock Funktion (DCP) to slow for data transfer

Other Parts Discussed in Thread: 5-6KINTERFACE, ADS1605, TMS320C6416

Hello at all,

My name is Christoph Winterholler and I am doing my diploma project with an ADC and a DSP.

I use the following hardware: ADS1605EVM (5MSPS/16Bit) with 5-6KInterface Board and TMS320C6416DSK (1GHz CPU).

I want to measure a voltage with a frequency form 50Hz to 1MHz and calculate the RMS value.
To get the fundamental wave (50Hz) I have to measure 100.000 measure values (20ms/200ns(5MSPS)=100.000) at a time.

I have setup a program with the data converter plug-in, and I am capable to read blocks of data from the ADC with the dc_readblock() function like in the example program.

But my problem is that readblock needs around 50ms per block transfer regardless of whether I transfer 64 values or 2048 per block.

My question, do you have a suggestion for me, how I get my data fast and have time to calculate the RMS value and some other things?
Is there a possibility to do this with the data converter tool, or have I to go another route?
In SLAA257(12Bit/4MSPS) they use the ping-pong buffer, maybe this is a solution?
Do you have any example program for fast data transfer with the ADS1605?

If you help me in any way, it would be appreciated.


Best regards

Christoph Winterholler

  • Hi Christoph,

    Thanks for your post.

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI Home Page documents and in the TI Wiki Pages.  Be sure to search all of these for helpful information and to browse for the questions others have asked on similar topics on E2E.

    I don't think, you have possibility to get data transfer faster with data converter tool. Using ping-pong buffer is not a good idea since you have a typical delay in this methodology. Unfortunately, we don't have any example programs for fast data tranfer with ADS1605.

    A good starting point for you would be the hardware designers users guide in which you will get all the resources to find solution to your problem.

    You can also refer the below E2E to get some idea to understand on interfacing ADC's with DSP as below:

    Thanks & regards,

    Sivaraj K

    Please click the Verify Answer button on this post if it answers your question.
  • Christoph,

    Are you using the C6416 project (C6414, I think) that comes with the ADS1605EVM? I would expect it to work well with a C6416 DSK.

    EDMA is the best way to transfer the data, but you do not need a ping-pong method for your case, since you only want to capture a single buffer and then go process its contents. This is simpler than the ping-pong example that you mentioned in SLAA257, but I am not sure what is used with the C6416 DSK example, since that comes from the data converter team. They might have some advice for you on the Data Converter Forum.


  • Christoph,

    Where did your reply go? I saw an email but the post is not here.

    What is in the dc_rblock function? Does it use the EDMA? Does it use the timer to set the incoming datarate?

    Do you have your EMIF parameters configured faster than the default?

    Are you able to get the 131070 samples in the 26ms that you expect?

    Can you set the size of the blocks to 50000 instead of 65535?

    We have no visibility to this function.


  • Hi Randy,

    Sorry I erased the last post because there was something wrong.

    Thanks a lot for your fast reply!

    I am using the data converter plug in to configure the ADS1605 and the DSP, and then I am reading the samples with the readblock function. (readblock description see below)

    So in the last two days I did some measurements and found out some interesting things:

    If the board setup is on default (1GHz CPU and 125MHz EMIF speed) than the data transfer for two blocks takes 300ms sometimes 200ms.

    In the t1605_ob.c document I read the following:


    *    - The timings of the external memory interface are

     *      optimized for the TMS320C6416 DSK running at the EMIF

     *      at 100 MHz.If a different H/W platform or a different

     *      EMIF speed is used, the values in the ADS1605_RD_SETUP,

     *      ADS1605_RD_STROBE and ADS1605_RD_HOLD makros below have to

     *      be changed to match the H/W.



    Because of this I setup my board with 600Mhz CPU speed and 100MHz EMIF.

    With these settings I am capable to measure the data in the ride time.
    Two blocks (65535*200N*2=26ms)
    Two blocks (50000*200N*2=20ms)


    But sometimes the program hangs up or the program needs 200ms for the transfer.

    So I think that may be in the DSP/Bios configuration file is something wrong.

    What I setup here was the HWIINT8 for the dispatcher (EDMA controller interrupt: DCPDISP_dispatchEdmaIsr()) and the board CPU speed to 600MHz.  


    Many thanks for your kind support!

    Best regards




    /* ADS1605_readblock()                                          */


     *     - Initializes the transfer of a block of data from the

     *       ADS1605. Once the transfer is started, the function

     *       returns to the application level.

     *     - It uses one EDMA channel for the data transfer.

     *     - The EDMA channel for the collection of the data samples

     *       is synchronized to the DRDY signal.

     *     - Once the transfer is complete, the ADS1605_rblock_finished

     *       routine will be called, which then signals the end of the

     *       transfer to the application level by the means of a

     *       callback function.


     * Parameters:

     *     - void *pD:CData converter object

     *     - void *pData: Pointer to the data block

     *     - unsigned long ulCount: Number of samples to be read

     *     - void *readCallback: Pointer to callback function


     * Return value:

     *     - None


     * Globals modified:

     *     - Inside the data converter object:

     *         - iObjectIndex

     *         - xferInProgress

     *     - Inside the xferBuffer object:

     *         - sbufPtr

     *         - uibufSize

     *         - uiStatus

     *         - ptrCallback


     * Resources used:

     *     - One EDMA channel (opened by ADS1605_configure())


     * Remarks:

     *     - Only one buffer can be active at one time while a

     *       second buffer can be submitted.

     *     - No single word transfer is allowed. The ADS1605_readsample()

     *       routine should be used instead.

     *     - The number of samples to be transfered cannot exceed

     *       0xffff.



  • Chritsoph,

    Since your problem is not completely solved, I would recommend removing the Verified Answer flags. Personally, when I am looking for posts to read and help with, I ignore those that have been answered. Others may do the same. Once you have a solution or no longer are asking for help, that is a good time to make a post as an Answer so future readers will know which post to look at for the best help.

    Christoph Winterholler said:
    But my problem is that readblock needs around 50ms per block transfer regardless of whether I transfer 64 values or 2048 per block.

    It sounds like this issue has been resolved. Is that correct? In your latest post, you are getting the full set of 50000*2 samples in 20ms, if I understand it correctly.

    Christoph Winterholler said:

    With these settings I am capable to measure the data in the ride time.
    Two blocks (65535*200N*2=26ms)
    Two blocks (50000*200N*2=20ms)

    But sometimes the program hangs up or the program needs 200ms for the transfer.

    Since it works fast enough sometimes, your EMIF and EDMA are probably setup correctly. That is a good data point, and it shows you have done good work to get to that point.

    The first place I would look for the hang or stall is to use an oscilliscope or logic analyzer to look at the EMIF and DRDY signals to see what is the nature of the stall. Look at the width and timing of the read operations, the delay from DRDY to each read, the number of reads between stalls, whether there are many small stalls or one big stall, and so on.


  • Hi Randy,

    I think my problem with the data transfer is solved.
    I found out that the problem is that I used the graph to show the waveform.
    If you do this, than the speed slow down to 200ms instead of 20ms.
    Of course this is consequentially, because the CPU needs time for this process.


    • My next steps are, to calculate the sum of the two buffers and save them in a variable dc.
    • Calculate the RMS value of the two buffers
    • At the end save the values and start from the beginning and read data’s.

    Is there a library that I can use to get the results fast?


    Another thing, is there an easy way to show a variable in CCS during the DSP is running?
    RTDX would be a solution, but therefore I need Matlab, labview or an Excel program?

    Many thanks for your help!

    Best regards


  • Christoph,

    For a new question, it would be best to start a new thread. Questions about using CCS should go to the Code Composer Forum.

    All of the libraries are listed on the TMS320C6416 Product Folder page. You can look through those to find if any would work well for you. Just writing the app in C and using the optimizer and optimization techniques (see the TI Wiki Pages for C6000 Optimization) will do well for you.