查看: 3639|回复: 0

[MQX] IMX6 DMA 操作EIM 无反应

[复制链接]

该用户从未签到

5

主题

7

帖子

0

新手上路

Rank: 1

积分
40
最后登录
2020-3-24
发表于 2020-3-17 13:50:31 | 显示全部楼层 |阅读模式
eim_base_addr = ioremap_nocache(0x08000000, SDMA_BUF_SIZE);
*(eim_base_addr )=0xAA55。直接写EIM总线能正常正常些EIM总线,但DAM去操作却毫无反应
//关键实现代码如下: SDMA_BUF_SIZE 1024*32
dma_m2m_config.direction = DMA_MEM_TO_MEM;
dma_m2m_config.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
dmaengine_slave_config(dma_m2m_chan, &dma_m2m_config);

sg_init_table(sg, 1);  
sg_set_buf(&sg[0], eim_base_addr, SDMA_BUF_SIZE);  
ret = dma_map_sg(NULL, sg, DEF_SG_QTY, dma_m2m_config.direction);
dma_m2m_desc = dma_m2m_chan->device->device_prep_slave_sg(dma_m2m_chan, sg, 1, dma_m2m_config.direction, 1);
sg_init_table(sg2, 1);
sg_set_buf(&sg2[0], rbuf, SDMA_BUF_SIZE);
ret = dma_map_sg(NULL, sg2, DEF_SG_QTY, dma_m2m_config.direction);
dma_m2m_desc = dma_m2m_chan->device->device_prep_slave_sg(dma_m2m_chan,sg2, 1, dma_m2m_config.direction, 0);

dma_m2m_desc->callback = dma_m2m_callback;
dmaengine_submit(dma_m2m_desc); dma_async_issue_pending(dma_m2m_chan);
执行DMA后却毫无反应?????求正解???
我知道答案 目前已有0人回答
回复

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条

Archiver|手机版|小黑屋|恩智浦技术社区

GMT+8, 2025-9-10 00:04 , Processed in 0.075688 second(s), 21 queries , MemCache On.

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表