Can't use multiple DMAC channels on SAMD10

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

I need to use multiple dmac channels at once on the SAMD10 but i can't find any way to assign different dmac descriptors to different dmac channels. When i select a different channel with the CHID register then the only register that changes is the CHCTRLA register and nothing else. I can't find any way to have a different BASEADDR for every dmac channel. I tried to change the BASEADDR register while one dmac channel was running, i disabled DMAENABLE in the CTRL register, wrote a different descriptor address into BASEADDR and turned on the dmac again from the CTRL register but then the dmac channel that was running before stopped working because BASEADDR changed. Am i doing something completely wrong and stupid here? I can't find problems even close to this on the internet. I hope i can get this fixed.

This topic has a solution.
Last Edited: Thu. Feb 14, 2019 - 01:50 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should not change the BASEADDR, did you miss this?

 

As BASEADDR points only to the first transfer descriptor of channel 0, refer to Figure 19-3, all first transfer descriptors must be stored in a contiguous memory section, where the transfer descriptors must be ordered according to their channel number

All SRAM registers also have this 

The BTCTRL register offset is relative to (BASEADDR or WRBADDR) + Channel Number * 0x10  

Maybe you can find some code to look at (e.g., for SAMD21 if there is nothing for SAMD10), I think there is a Atmel Start USART example (using two channels).
/Lars