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.

TMS320C6678: 使用6678的pcie做ep,ubuntu做rc时验证pcieboot模式下DMA读写异常问题

Part Number: TMS320C6678

TI工程师:

      您好,我在使用6678pcie时遇到一下问题,麻烦提供下帮助,谢谢!我使用的是pcieboot_interrupt例程,相关代码都是基于 “mcsdk_2_01_02_06\tools\boot_loader\examples\pcie” 文件夹下的代码,pc端使用ubuntu18.04版本,经过调试目前pc端已经可以通过pcie接口将程序写入6678的L2ram里,且6678运行正常。

pciedemo.c中使用writeDSPMemory()接口将dsp代码写到dsp的LL2RAM中去,写入和运行一切正常,pc到6678的中断和6678给pc的中断也都能收到,但是在pc调用HAL_writeDMA()和HAL_readDMA()接口后分别往DSP的ddr里读写了4MB数据,经过对比有0x3fc000字节错误,多次运行错误字节数相同,且我发现pc写的是递增数,但dsp端memory中看到的0地址的数据是0x5A5A5A5A,后面大多是0,此时我连接仿真器在memory窗口操作ddr是可以写进去的。pc端最后打印的读写速率都是600MB/S左右。

1.void HAL_writeDMA(uint32_t srcAddr, uint32_t dstAddr, uint32_t size, uint32_t flag)  这个函数的flag参数1和0的区别是什么?,不太理解这里的意思

2.希望帮看下pcie使用dma方式传输大数据量读写异常的问题,谢谢!