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.

AM5718: DSP核使用MCASP EDMA无法连续接收数据

Part Number: AM5718

TI的工程师,您好!

我通过AM5718的DSP核操作MCASP EDMA传输的时候,将输出引脚与输入引脚进行短接,可以实现连续地输出波形,在传输过程中也能够对发送的数据进行修改并能在波形上体现出来,但rxBuf只能接收到第一次传输的数据,之后就无法接收到数据了,也就是说当我把rxBuf清空之后里面的数据将会一直为0不再更新,而在此过程中是一直有输出波形的,并且接收寄存器MCASP_RXBUF的值不为0。

我的猜测:

1、接收寄存器MCASP_RXBUF是能够接收到数据的,但是无法再次通过EDMA传输至rxBuf(但是EDMA RX回调函数一直能够进入,说明是一直在进行EDMA接收传输的,那么原因可能就是传输的源地址或者目标地址不对了)。

2、txBuf能够通过EDMA将数据传输至发送寄存器MCASP_TXBUF并发送出去。

参考例程:\processor_sdk_rtos_am57xx_06_03_02_08\pdk_am57xx_1_0_18\packages\ti\board\diag\mcasp_audiodc\   ,仅对输出输入引脚做了修改。

测试程序如下:

/cfs-file/__key/communityserver-discussions-components-files/120/mcasp_5F00_audiodc_5F00_test.c

/cfs-file/__key/communityserver-discussions-components-files/120/mcasp_5F00_audiodc_5F00_test.h

参考了以下e2e帖子:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/633621/tms320c6748-mcasp-recording-save-in-sdcard?tisearch=e2e-sitesearch&keymatch=McASP%25252520rxDefaultPar#

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/600713/starterware-am3352-mcasp-configuration?tisearch=e2e-sitesearch&keymatch=BufferRxDMAActivate#

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1048059/omap-l138-edma3-linking-reloading-to-same-param-set-repeatedly?tisearch=e2e-sitesearch&keymatch=McASP%2525252525252520rxDefaultPar#

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/502379/c6748-mcasp-dma-multi-channel?tisearch=e2e-sitesearch&keymatch=McASP%25252525252520rxDefaultPar#

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/675063/ccs-tms320c6748-altering-sampled-data-using-mcasp-starterware-example?tisearch=e2e-sitesearch&keymatch=McASP%20rxDefaultPar#

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/669487/ccs-tms320c6748-mcasp-starterware-additional-buffer-requirement-for-further-processing

问题:我在实现MCASP  EDMA连续接收数据并传输至rxBuf还缺少了些什么配置或者有哪些配置有错误?

期待您的解答,谢谢!

  • 我使用\processor_sdk_rtos_am57xx_06_03_02_08\pdk_am57xx_1_0_18\packages\ti\csl\example\mcasp\mcasp_transmit\mcaspTransmit.c进行修改,然而结果还是一样,能触发EDMA接收回调函数,接收寄存器的值也会随着发送的值而变化,但是接收缓冲区rxBuf的值却在第一次接收到之后再也没有改变过。

    部分测试代码如下:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /*
    * Copyright (C) 2013-2017 Texas Instruments Incorporated - http://www.ti.com/
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the
    * distribution.
    *
    * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    测试结果如下,可以看出在第一次接收到数据后手动将rxBuf清空,rxBuf不会再被MCASP EDMA更新数据:

  • 我已经帮你转给其他工程师,请等待回复。

  • 好的,谢谢!

  • 问题已解决,将缓冲区换成L2SRAM就可连续接收,虽然AM5718 DSP的结构框图中EDMA连接L2SRAM,但我也看到了EDMA是不限制源地址和目标地址的,虽然解决了问题,但没明白为什么需要这样配置。

    修改如下:

    #pragma DATA_SECTION (txBuf0,".l2sram")
    #pragma DATA_ALIGN (txBuf0,128)

    #pragma DATA_SECTION (txBuf1,".l2sram")
    #pragma DATA_ALIGN (txBuf1,128)

    #pragma DATA_SECTION (txBuf2,".l2sram")
    #pragma DATA_ALIGN (txBuf2,128)

    #pragma DATA_SECTION (rxBuf0,".l2sram")
    #pragma DATA_ALIGN (rxBuf0,128)

    #pragma DATA_SECTION (rxBuf1,".l2sram")
    #pragma DATA_ALIGN (rxBuf1,128)

    #pragma DATA_SECTION (rxBuf2,".l2sram")
    #pragma DATA_ALIGN (rxBuf2,128)

x 出现错误。请重试或与管理员联系。