DMA, memory to memory, memory to peripheral. (Kinetis and i.MX RT1020)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DMA, memory to memory, memory to peripheral. (Kinetis and i.MX RT1020)

976 Views
luishs
Senior Contributor I

Hi.

I have some doubts about the handling of the DMA, I need to configure the DMA to send and receive data from/to the GPIO ports, using microcontrollers Kinetis and RT1020. The SDK examples are only for peripherals such as SPI, UART, I2C, I2S and for memory to memory, but there are none to receive/send data from/to GPIO ports.

In addition to preparing the transfer, I see that three configurations can be used, memory-memory, peripheral-memory and memory-peripheral.

EDMA_PrepareTransfer(&transferConfig, srcAddr, sizeof(srcAddr[0]), destAddr, sizeof(destAddr[0]),
                         sizeof(srcAddr[0]), sizeof(srcAddr), kEDMA_MemoryToMemory);

typedef enum _edma_transfer_type
{
    kEDMA_MemoryToMemory = 0x0U, / *! <Transfer from memory to memory * /
    kEDMA_PeripheralToMemory, / *! <Transfer from peripheral to memory * /
    kEDMA_MemoryToPeripheral, / *! <Transfer from memory to peripheral * /
} edma_transfer_type_t;

The question is whether I could use the DMA SDK examples for memory-to-memory transfers, replacing the source or destination address, with the GPIO port address, so that I can send or receive data, using DMA, from/to GPIO ports. . Although I still don't know how useful the parameter is that in the preparation it indicates the type of transfer.

2 Replies

860 Views
mjbcswitzerland
Specialist V

Hi

If you use port addresses as source or destination pointers you can transfer to/from ports as any other peripheral.
If you search the forum you will find a number of posts where this is done, including Kinetis port change triggered transfers.

Regards

Mark

Complete Kinetis solutions for professional needs, training and support: http://www.utasker.com/kinetis.html
i.MX RT project compatibility: http://www.utasker.com/iMX.html

uTasker: supporting >1'000 registered Kinetis users get products faster and cheaper to market

Request Free emergency remote desk-top consulting at http://www.utasker.com/services.html

Open Source version at https://github.com/uTasker/uTasker-Kinetis

https://community.nxp.com/thread/512558
https://community.nxp.com/thread/352862
https://community.nxp.com/thread/498809

860 Views
luishs
Senior Contributor I

Thanks Mark

0 Kudos