SAMV71 Eval - Multiple XDMAC channels - data loss

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

I have two XDMAC channels running on the eval board. One channel is transferring data (about 100 bytes) from an external SPI device to memory at an 8Khz interval.

The other XDMAC channel is sending strings of data to a serial port (UART3) on a 200hz interval.

 

When I run either channel individually they work fine - however, when both channels are running I lose some bytes of serial data from my output frame (randomly).

 

Any ideas why this could happen? - I figured the DMA channels were completely independent - could this be some kind of contention for the AHB?

 

thanks

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

You'll need to provide us with some more context:-

 

  • Which software framework are you using (ASF / Start / HomeBrew)?
  • Are you losing UART or SPI data?
  • How are you "losing" bytes? Are the XDMAC transfers too short, or are you seeing the correct length but incorrect data?

 

Steve

Maverick Embedded Technologies Ltd. Home of Maven and wAVR.

Maven: WiFi ARM Cortex-M Debugger/Programmer

wAVR: WiFi AVR ISP/PDI/uPDI Programmer

https://www.maverick-embedded.co...

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

I'm using the Atmel Studio7 environment ASF.

 

The UART transmit data (on DMA channel 4) consists of 64 byte packets that are sent out to the UART3 serial port at a frequency of 200hz.

The output serial data is then captured on a connected laptop teraterm session. 

Sometimes the captured data packets contain less than the expected 64 bytes  - random bytes within the packet are not received.

 

The XDMAC seems to be working ok and I'm not getting any overflows or error interrupts and the block completion interrupts occur as expected.

 

The other DMA channel (used for receiving data from an external device connected to SPI0) is always ok with no issues.

 

However, if I disable the SPI DMA channel and only use the UART DMA channel there is no serial output data loss - so it seems to be some kind of contention when using more than one XDMAC channel.