SAME70 XDMAC on PIO

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi 

 

I'm working on a project using SAME70 microcontroller.

 

I'd like to send a stream of data on PIO Port D as fast as possible using DMA controller.

 

Someone know if is possible with this CPU to use ad DMA channel destination address a PIO register ? ( in my specific case PIOD->ODSR )

 

Thank you

This topic has a solution.
Last Edited: Wed. Oct 28, 2020 - 04:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

why shouldn't that work? Simply configure a memory to memory DMA channel. The source is wherever the data is located that you want to send and the destination is the PIOD->ODSR. The transfer speed should be up to the maximum of the internal AHB bus - that is to my knowledge up to 150MHz. Any other DMA transfer may delay it. 

There is an application note that is explaining quite well how to use XDMAC.

 

Best Regards

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I thought the same, but on my preliminary test seem that this is not true. I reconfigured a working mem to mem working example changing destination address and destination increment mode, but at least from debugger seems that out register doesn't change at all.

I'll retry with the scope connected to the port to see what really happens.

 

There is another post that affirm that this is not possible on this controller:

 

https://www.avrfreaks.net/forum/...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Markus Krug wrote:
There is an application note that is explaining quite well how to use XDMAC

This:  AN_42761 - AT17417: Usage of XDMAC on SAM S/SAM E/SAM V  ?

 

via: https://www.microchip.com/wwwproducts/en/ATSAME70Q21 - 'Documents' tab

 

Markus Krug wrote:
configure a memory to memory DMA channel

Mutty75 wrote:
I thought the same, but on my preliminary test seem that this is not true

 

That app note distinguishes memory-to-memory from memory-to-peripheral - so did you also try setting it up as memory-to-peripheral ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I received today the reply from Microchip's FAE that follows my area and confirm me that this option is not available on SAME70. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh well, at least that answers the question.

 

Please mark the solution - see Tip #5 in my signature, below, for instructions:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...