[I.MX8M Plus] using DMA to do memory copy from RAM to RAM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

[I.MX8M Plus] using DMA to do memory copy from RAM to RAM

跳至解决方案
1,875 次查看
linzhenggang1
Contributor II

Is it possible to do a RAM-to-RAM memory copy using DMA?

If yes, how should we do that in Linux?

P.S. We are using BSP L6.1.22

0 项奖励
回复
1 解答
1,753 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Yes, it's correct!, if you like to copy RAM to RAM can use the SDMA but The current drivers don't have the API to do it.

Regards

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,850 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Yes it is possible, but you need to clarify which memory to what memory are you using, you can use the provided driver in the BSP.

Regards

0 项奖励
回复
1,840 次查看
linzhenggang1
Contributor II

Thank you for your reply.

Sorry, I don't understand the meaning of "which RAM and what RAM" you said.
I just want to do a memory copy in a user-space application(not from or to a peripheral) by using DMA to reduce my CPU usage.

If it is possible, could you please show me which part of the BSP I should use to do that?

Thank you very much!

0 项奖励
回复
1,817 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

There is no code to show how to use dma, but one can show the section 3.7.3 of the linux reference manual:

https://www.nxp.com/docs/en/reference-manual/IMX_REFERENCE_MANUAL.pdf

 

Regards

 

0 项奖励
回复
1,759 次查看
linzhenggang1
Contributor II

Thank you for your reply.

In 3.7.1, it said that the SDMA API driver is for other drivers(kernel mode) but not for a user space application. Is my understanding correct?

---

3.7.1 Overview
The Smart Direct Memory Access (SDMA) API driver controls the SDMA hardware. It provides an API to other
drivers for transferring data between MCU memory space and the peripherals. It supports the following features:

0 项奖励
回复
1,754 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Yes, it's correct!, if you like to copy RAM to RAM can use the SDMA but The current drivers don't have the API to do it.

Regards

0 项奖励
回复