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.



What is DMA and what does it do?_ide






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?






What is DMA and what does it do?_Access_02

 

  


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




    Normally


    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