Hi everyone!

 

Thought I'd introduce PSoC 6's Direct Memory Access (DMA) feature. The PSoC 6 device has two DMA hardware blocks and each DMA block has to 16 DMA channels. Each DMA channel can be configured to transfer data from memory to memory, peripheral to memory, memory to peripheral or peripheral to peripheral, with no CPU involvement.

 

Each DMA channel’s transfer is configured by a DMA descriptor. The DMA channel only holds a pointer to the descriptor structure in memory (RAM or Flash). Thus the number of descriptors you can associated with a channel, is limited by the SRAM/FLASH memory available to hold them.

 

The DMA descriptor has a next descriptor field that lets the user chain descriptors. Thus each channel could associate with a descriptor in memory but that descriptor could be the first one in a chain of many descriptors which are also in memory. This is will let the user set up a series of distinct and dissimilar transfer operations.

 

Each descriptor is built to be configured to work in any of these modes

  • A single data transfer from a source address to a destination address.
  • 1D transfer: A loop of data transfers from source address to destination addresses. You can optionally have the source or the destination or both addresses incrementing with each transfer. The increment value itself can also be configured.
  • 2 D transfer: A nested loop of data transfers. Here the descriptor can be set up to do a loop of 1D transfer.

The input triggers are independently configured to trigger single data transfers or entire 1D loop transfer or an entire 2D loop transfer.

 

There is a very elaborate trigger routing matrix present in the PSoC 6 that allows for the different peripherals in the PSoC 6 device to generate trigger signal for the DMA channels. In addition the DMA channels themselves have trigger outputs that can be used to trigger other DMA channels.

 

Feel free to leave comments or ask questions!