Multiple DMA SC589 Development board

Hey there,

Im developing software to do a block convolution. Im receiving data from the SPORT based on your ADC DAC Audio Playback example code.

Now im trying to read data in between from de SDRAM via DMA. This action gives distortion to the output cause i think it interrupts the SPORT DMA proces.

Im not quite getting how to organize the DMA, is it possible to run these DMA concurrent? Cause eventually i also want to implement the FFTA accelerator and this is also driven by the DMA right?

Gr 

Parents
  • 0
    •  Analog Employees 
    on Nov 13, 2020 6:10 AM 3 months ago

    Hi,

    Could you please answer our questions below. This will help us to assist you better.

    1. You have mentioned that you are trying to read data in between from SDRAM via DMA. Please confirm whether you are using MDMA or please explain the process.

    2. Please confirm which DMAs you are trying to use concurrently.

    3. Please explain the process of your application in detail.

    4. If possible, please share us your modified Audio Playback example in order to simulate your issue here.

    Regards,
    Nishanthi.V

  • adc_dac_playback_Core1.rar

    Hello thanks for your reply. I attached the code. 

    To communicate with the SDRAM i am using the MDMA pipelines. I tried MDMA 0 to 3 to check if there is a difference. but all of them give a distorted signal.

    And the SPORT uses DMA10 and DMA11. When the buffer is filles i read data read from the IR from SDRAM with MDMA and execute a convolution with the 64 blocks. and if im correctly the SPORT ping pong buffer is being filled on the background?

    i hope this will suffice for you to help me.

    Gr Brian

  • 0
    •  Analog Employees 
    on Dec 1, 2020 11:39 AM 2 months ago in reply to BOehlers

    Hi Boehlers,

    Apologies for the delay caused.

    While testing your code, code hangs at line no:245 WAIT_FOR_DMADONE(9);that means we have faced address alignment error in MDMA0 channel 8 and MDMA2 channel 39 status register.
    i.e  DMA_STAT.ERRC=2

    MSIZE is configured as 32 bytes which is not matching with xmod paramater (4) as below
    MDMA_CONFIG(8, uiSourceDMACFG, pSrc, 4, buffer_size*2,
                9, uiDestDMACFG, pDst, 4, buffer_size*2);

    And also DMA_ADDRSTART register(Src/Dst) is not aligned according to the DMA_CFG.MSIZE field.

    Can you please confirm that whether you face this issue or not?

    If you face this issue, please find below suggestions.
    1.Do the alignment for buffer address.
    #pragma align 32
    complex_float dm cfAudioProcFreq[AUDIOINBUF];
    2.Change Xmod to 32.
    MDMA_CONFIG(8, uiSourceDMACFG, pSrc, 32, buffer_size*2,
                9, uiDestDMACFG, pDst, 32, buffer_size*2);
    MDMA_CONFIG(39, uiSourceDMACFG, pSrc, 32, buffer_size*2,
                40, uiDestDMACFG, pDst, 32, buffer_size*2);         
                
    Regards,
    Nishanthi.V

  • Yeah my apologies, i tried a different config for the DMA MSIZE and forgot to put it back to 4. 

    This was not the original issue I had. The issue is that when i played the audio the DMA function distorted the output audio. Because i think it interrupts Ping Pong buffer bucause this is also transfered through DMA . 

  • 0
    •  Analog Employees 
    on Dec 2, 2020 1:39 PM 2 months ago in reply to BOehlers

    Hi,

    Thanks for the confirming and letting us know about the exact issue.

    Can you please share the updated code to us which you are currently using in order to simulate the distorted issue in ADSP-SC589 EZKIT.
           
    Regards,
    Nishanthi.V

  • 0
    •  Analog Employees 
    on Dec 10, 2020 1:41 PM 2 months ago in reply to BOehlers

    Hi,

    Apologies for the delay caused.

    We have simulated your issue in ADSP-SC589 EZkit.

    To narrow the down the issue, we have done below tests.


    1.Having suspect in cache for SDRAM access we also do flush call before/after MDMA data process and tried with disabling cache, but observe the issue.

    2.Comment out convolution logic,IR_Init() functions. This scenario test contains only talkthru snippet which provides result of the audio without any distortion. This test confirms that buffer size and audio splitup snippet were provided correctly.

    Above test is done by enabling macro #define default_code in adc_dac_playback.c file.

    3.Instead of storing data in SDRAM by using MDMA2, We have created local buffers. So where ever need to store/retrieve the data, we have copied data to/from temporary created buffers instead of using MDMA2.

    But still we observe the distorted audio. For this test, we have to comment #define default_code in adc_dac_playback.c file.

    So we don't suspect the distortion caused by MDMA which would not interrupt SPORT DMA process.

    Can you please confirm the convolution process in your side that you have implemented and let us know if you need any further assistance.


    Regards,
    Nishanthi.V

    adc_dac_playback_Core1.zip

Reply
  • 0
    •  Analog Employees 
    on Dec 10, 2020 1:41 PM 2 months ago in reply to BOehlers

    Hi,

    Apologies for the delay caused.

    We have simulated your issue in ADSP-SC589 EZkit.

    To narrow the down the issue, we have done below tests.


    1.Having suspect in cache for SDRAM access we also do flush call before/after MDMA data process and tried with disabling cache, but observe the issue.

    2.Comment out convolution logic,IR_Init() functions. This scenario test contains only talkthru snippet which provides result of the audio without any distortion. This test confirms that buffer size and audio splitup snippet were provided correctly.

    Above test is done by enabling macro #define default_code in adc_dac_playback.c file.

    3.Instead of storing data in SDRAM by using MDMA2, We have created local buffers. So where ever need to store/retrieve the data, we have copied data to/from temporary created buffers instead of using MDMA2.

    But still we observe the distorted audio. For this test, we have to comment #define default_code in adc_dac_playback.c file.

    So we don't suspect the distortion caused by MDMA which would not interrupt SPORT DMA process.

    Can you please confirm the convolution process in your side that you have implemented and let us know if you need any further assistance.


    Regards,
    Nishanthi.V

    adc_dac_playback_Core1.zip

Children
No Data