IMX6uLL NO_SYS 裸跑 SDMA 寄存器 设置

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX6uLL NO_SYS 裸跑 SDMA 寄存器 设置

1,015 Views
zhangtao
Contributor I

官方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,应该不用再用汇编来设置了吧,很是迷茫

 

 

 

 

Labels (4)
0 Kudos
4 Replies

954 Views
zhangtao
Contributor I

SDMA_InstallBDMemory  ???

0 Kudos

967 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

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.

0 Kudos

931 Views
zhangtao
Contributor I

您好,

SDMA_PrepareTransfer(&transferConfig, 0x50000040, (uint32_t)destAddr, 4,
4, 4, 1024, 0, kSDMA_PeripheralTypeMemory,
kSDMA_MemoryToMemory);

这种设置方式时,是可以读到3次数据的(FPGA的FIFO),但是我传输的值为1024,理应读到1024个。

我也按英文帖子中的建议,将PC寄存器的位置从642改到了683,但是仍然没有效果,并且程序会卡死

0 Kudos

946 Views
zhangtao
Contributor I

2.png1.pngWhen

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?

0 Kudos