官方SDK中SDMA驱动中,memory_to_memory的例子,如何将源地址设置为固定(FROZEN),目标地址为递增,目前我修改的代码如下(fsl_sdma.c中的SDMA_LoadContext),
memset(context, 0, sizeof(sdma_context_data_t));
/* Set SDMA core's PC to the channel script address */
context->PC = config->scriptAddr;
context->MSA = 0x10;
context->MDA = 0x04;
修改完后,没有任何效果,请大家帮忙看看。
现在查到的资料为要用ldf和stf的汇编来修改,但是我觉得已经有C的API,应该不用再用汇编来设置了吧,很是迷茫
SDMA_InstallBDMemory ???
I see that you have create two same thread, the values will be overwritten by the SDMA script,https://community.nxp.com/t5/i-MX-Processors/IMX6uLL-NO-SYS-SDMA-Register-Settings/m-p/1737253#M2138... Christian give the update to you there.
您好,
SDMA_PrepareTransfer(&transferConfig, 0x50000040, (uint32_t)destAddr, 4,
4, 4, 1024, 0, kSDMA_PeripheralTypeMemory,
kSDMA_MemoryToMemory);
这种设置方式时,是可以读到3次数据的(FPGA的FIFO),但是我传输的值为1024,理应读到1024个。
我也按英文帖子中的建议,将PC寄存器的位置从642改到了683,但是仍然没有效果,并且程序会卡死
When
config ->scriptAddr=FSL_ FEATURE_ SDMA_ M2M_ When using ADDR (642)
(the official default value),
my program can only read three identical values at once (what I want to achieve is to transfer 1024 bytes at a time,FPGA FIFO)
(read three identical values each time, which is another issue),
but setting config ->scriptAddr=FSL_ FEATURE_ SDMA_ P2M_ Where is the problem with ADDR (683) where no value can be read in destaddr?