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.

TMS320F280049C: ADC and DMA configuration

Part Number: TMS320F280049C

Hi

I have built a code project from DAC Enable Output Example in bitfield example list.

I have integrated the driverlib.

The aim is to generate a sine wave by DAC using DMA and acquire this signal using ADC and DMA

I have so merged into this CCS project the two examples buffdac_sine_dma and adc_soc_continuous_dma_cpu01 of the 2807x family

Could you create a CCS project to help me to configure the adc sequence ?

Regards

Yann

  • Hi Yann,

    A few questions.

    1. Does the current project build? If not, what are the errors?
    2. I received your code from Francois. Have you tested the ADC and DAC code separately to make sure they work before trying to merge them?

    I saw in the code that you have the samplingFreq_hz variable set to 4MSPS. Your update rate of the DAC should be <= 500KSPS.
  • Hi Frank

    1. Yes my current project builds and runs but without going into dmach1_isr and adcA2ISR functions.

    2. The DAC is running well. The sine wave is output even for a sampling frequency above 500kHz.
    For the exercise you could set it to 100kHz and with 40 samples it should produce a sine wave at 2.5kHz.
    Concerning the ADC I have already run two other code examples for the F280049 pga_ex1_dac_adc_ext_loopback and adc_ex1_soc_epwm or adc_ex2_soc_epwm. I was able to obtain an acquired sine wave.

    Now I have to configure the ADC and DMA to get the conversion result and perform computations by CLA

    Regards
    Yann
  • Yann,

    Looking into this. You should hear back from me tomorrow.
  • Hi Frank
    Did you succeed in building the CCS project ?
    Regards
    Yann
  • Hi Yann,

    Sorry about the late reply. Currently tied up with something else and don't have the bandwidth at the moment to run your code. However, have you already checked the usual suspects? You mentioned it's not going into "dmach1_isr" -> have you checked that DMA is indeed transferring results and also that DMACH1's interrupt is getting set? For "adcA2ISR", have you checked to make sure the ADC's interrupt flag is getting set etc. Also check the interrupt overflow flags.

    I suspect you might be having a DMA bandwidth issue. The DMA can't go higher than CPU/3. Have you done an analysis of the timings of ADCA<->DMA, ADCB<->DMA, DAC<->DMA to make sure they can all be sufficiently serviced?

    Please check these and let me know what you find, thanks.
  • Hi Yann,

    Were you able to resolve this?
  • Hi Frank

    I think I am near my goal to build an eample with DAC and ADC in a loopback using DMA to transfer a sine wave table to DAC and to get back the conversion result of the ADC.

    The sine wave produced is a 100 kHz.

    The acquisition gives a sine wave.

    If you are interested in running this example, I give you a copy of the CCS project

    Regards

    Yann

  • Yann,

    It's good to hear you are making a lot of progress. In the mean time, I'll be marking this thread as resolved. If you ran into any issues, be sure to let us know, we'll be glad to help.