From: Pascal A. B. <pas...@wa...> - 2006-01-13 19:19:17
|
Doug Sutherland writes: > Interesting, thanks. The same app note states that using DMA mode > is highly recommended to avoid high CPU usage. So while PIO may > yield good transfer rates, DMA frees the processor from transfer. Just to clarify for everyone else: there are actually three variants, if I understand correctly. (1) Good old PIO (CPU-intensive). (2) Peripheral-driven DMA (requires DREQ and DACK). (3) CPU-driven DMA. CPU-driven DMA uses PIO-style bus transfers, so there is no need for DREQ and DACK. Transfers are performed by the DMAC, so there is no burden on the CPU. The app note says this offers the best transfer rate. I suspect the only drawback of (3) wrt (2) is packet latency: With (3), the CPU would probably begin transferring a packet only after it has been buffered entirely in the ISP. With (2), hopefully the ISP can transfer the data continuously as it is being received from the USB port, so that the packet is already in main memory when the interrupt is asserted. -- Pascal |