AnsweredAssumed Answered

DMA triggered by GPIO (KDS,PE)

Question asked by valeremar@gmail.com on Apr 11, 2016
Latest reply on Apr 12, 2016 by Mark Butcher

Hello,

 

I am using KDS with Processor Expert KSDK-1.3.0 and a FRDM-KL26z board for test.

I am trying to set up a DMA Transfer from memory to memory triggered by a GPIO (PTC9).

 

I can make a DMA transfer from memory to memory with success as explained in the API Reference manual. OK

I can setup as well with success an interrupt on a GPIO.OK

 

I cannot make a DMA transfer from memory to memory triggered by a GPIO. Symptoms are : "nothing happens" (stuck in the while loop).

 

Attached are my PE settings.

For the DMA memory to memory transfer , I have  implemented in main.c

  1. Initialize the DMA module: dma_init().
  2. Request a DMA channel: dma_request_channel().
  3. Configure the TCD: dma_config_transfer().
  4. Register callback function: dma_register_callback().
  5. Start the DMA channel: dma_start_channel().
  6. [OPTION] Stop the DMA channel: dma_stop_channel().
  7. Free the DMA channel: dma_free_channel().

 

For the DMA memory to memory transfer triggered by GPIO, I am really really confused!

 

Where does the GPIO DMA "Request" intervene?

Do I have to implement 1 to 4 and the GPIO starts at 5 -> does not seem to work though.

  1. Initialize the DMA module: dma_init().
  2. Request a DMA channel: dma_request_channel().
  3. Configure the TCD: dma_config_transfer().
  4. Register callback function: dma_register_callback().

while(1) {}

 

If the GPIO starts at 2 "request", where to implement 3 to 7? I could not read as well a line in the PE generated code for this configuration between DMA and GPIO. I am missing something right?

 

My question is similar to this post Trouble using DMA triggered by GPIO but the answers could not help much.

 

Thank you for any inputs !!!

Attachments

Outcomes