Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

TMS320F28377D: I am trying to sample less than 100ns.

Part Number: TMS320F28377D
Other Parts Discussed in Thread: ADC12DL040

Hello

It takes 248ns (4MHz) execution time.
We want less than 100ns (10MHz sampling).
All interrupts are disabled.
The external crystal is 20 MHz.
Is there any way to make it run faster?

under.
Is it possible to speed up using a function?
InitSysPll(XTAL_OSC,IMULT_20,FMULT_0,PLLCLK_BY_2);

under.
If the timer interrupt is set to 0.1us, it takes more than 500ns.
// ConfigCpuTimer(&CpuTimer0, 200, 0.1); // 10MHz (100ns)

Thanks.

*********************************************

  

  • I regret I am unable to understand exactly what your issue is and what help you are expecting from us. Also, debugging your code is not something we can support on the e2e forum. That being said, I will make an attempt to answer some questions.

    Is it possible to speed up using a function?
    InitSysPll(XTAL_OSC,IMULT_20,FMULT_0,PLLCLK_BY_2);

    The rated maximum operating frequency of this device is 200 MHz. It cannot be operated beyond that speed. 

    The execution time depends on many factors such as clock speed, whether code is running from Flash or RAM and everything else going on in the application. Without a thorough knowledge of the application software, our ability to help with issues like this is very limited.

  • sorry.
    My question was not specific.

    I am trying to sample 10MHz (0.1us) using the EMI interface of an external ADC (ADC12DL040).

    first try.
    If I set the timer to 0.1us and collect data at 10MHz (0.1us), it takes 0.5us each. (Other interrputs are disabled)

    ConnfigCpuTimer(&CpuTimer0, 200, 0.1); // 10MHz (0.1us)

    second try.
    in the main function
    Even reading the external ADC, it takes about 0.248us each. (timer interrput is disabled)

    #define ADCa  0x00300000    // for External ADC(ADC12DL040)   
    void main(void)
    {

          for(i = 0; i < 1024; i++)
         {
                GPIO_WritePin(MCU_TP2, 1); // TP16(GPIO99) Test Point
                 adc_tmpa=(*(Uint16*)(ADCa) & 0xffff);
               GPIO_WritePin(MCU_TP2, 0); // TP16(GPIO99) Test Point
         }

    }

  • Kang,

                    I presume you have interfaced the ADC12DL040 chip via EMIF. The time it takes to read the data is dependent on everything else going on in the system, not just the interrupts. This is too application-centric question, so our ability to help is limited. 

    You may want to look into www.ti.com/lit/SPRAC96 for helpful tips.

  • I plan to tet the exernal ADC using the DMA sample program(emif_dc_dma.c)

    DMA related questions will be asked in another thread.

    thank you

  • Even if I use DMA, 0.1us does not seem to be guaranteed.

    So I am trying to convert it to assembly code.

    Could you please convert the below to assembly code?

    Thank you

    ****  External ADC sampling *******

    #define  ADCa   0x00100000   //emif1  addr

    Uint16  adc_tmpa[1024] = {0, };

    Uint i = 0;

    while(i < 1024)

       adc_tmpa[i++] = *(Uint16*)(ADCa);                        //ADC 1024ea : 256us (=1024ea * 250ns)
    // adc_tmpa[i++] = __addr32_read_uint16(ADCa);  //ADC 1024ea : 289us (=1024ea * 282ns) 
    }

  • Kang,

         I am afraid what you are asking is beyond the scope of e2e support. I regret I am unable to support your request.

  • The assembly code is displayed in the disassembly view menu. Solved. thank you