What is DMA and what does it do?



Why DMA ?

If we look at the computer system diagram we can see that when transferring data from a device such as a hard disk the CPU is heavily involved.




Each word of data has to be transferred from the disk, through the CPU and individually placed into memory. This places a heavy burden on the CPU and stops it from performing any useful tasks.

To address this problem we use a system of Direct Memory Access (DMA).


What is DMA and what does it do?


 
  
 DMA stands for Direct Memory Access. It allows peripherals to access the memory without having to go through the processor.

    Normally for you to receive something like receive UART burst information, you need the processor to interrupt every time data is received or the receive FIFO is half full and then save that data in the memory for later use. It's a burst receive so you can receive allot of data and keep doing this over an over again before you have all the data and then use it. 
    Well the DMA helps with just that. The DMA allows the UART to trigger the DMA to empty the receive FIFO when it's half full and save the data in the memory. This without the processor not having to do anything besides configuring in the beginning the DMA and UART to work like that. Then in the end you have all the data ready to use, all that while the processor was busy doing something more interesting that simply being a bus driver for the data bus for alot of cycles.

    Well this is what the DMA is for. Transferring data from the memory to peripheral but i can also:
  • Transfer data from memory region to memory region.
  • Transfer data from memory to peripheral
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值