Using DACC with DMA (SAM4)

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

Is it possible to use the SAM4 DMA(PDC) to read data from Flash and squirt it out through the DACC?
Failing that, I assume that it's possible to pull the data from RAM and send it to the DAC, are there any relevant examples, ASF or otherwise?

John

Quebracho seems to be the hardest wood.

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

Hi John, just checked as6.2 and there are dac examples for the sam4 under "New Example Project...."

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

Thanks for that. I dare not install 6.2 for now, I have too much work tied up in this project already.
I know there are DACC examples, I was hoping for some guidance on DMAing to DACC.

Maybe I'll put 6.2 on the laptop, if there;s the disk space.

Quebracho seems to be the hardest wood.

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

I have switched to AS6.2 for my projects and all is working very well. Used my jtag3 for the first time today and the issues i had with AS6.1 are gone. working very well

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

AS6.1 also has the examples. I assume you are still using as4 ?

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

rev wrote:
AS6.1 also has the examples. I assume you are still using as4 ?

No, I am using 6.1.
Yes, I can see examples for DMA and examples for DACC. I am having trouble working out how to use them together.

Quebracho seems to be the hardest wood.

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

OK, I found an example that someone had posted in the AT91SAM forums.
It seems that DMA from RAM to DACC works fine, but it won't work from Flash. I'm not really surprised.
On reflection, I've decided not to go the DMA route anyway, as it is not flexible with regard to controlling the amplitude(unless one was to copy chunks to RAM and scale at the same time). Since, as far as I can tell, there is double buffering, i.e. if a timer is used as the DACC trigger, then I should be able to load the next value as soon as the current conversion is complete, it should work fine to use an interrupt and manually load the next sample. The double buffering hould remove any danger of jitter, I think.

Quebracho seems to be the hardest wood.