SAMD21 DMA Spi slave

I am currently working on a project which requires the use of an SAMD21 board as a SPI slave. Due to timing constraints, DMA is required.

I tried using the ASF library from Atmel studio, but had some issues. I noticed that a four transactions with a beat size of one byte worked as expected. But one transaction with a beat size of four bytes only transferred the first byte. This is unfortunate, because the hardware I'm working with requires 1 transaction of four bytes.

This behavior was observed in the built in demo that connects the SAMD21 to itself with a sercom 1 master and a sercom 0 slave. After fiddling with the setup, source code, and oscilloscopes without success, I have decided to try the Arduino Zero.

Does anyone know of a decent SPI slave library with DMA support that is compatible with the Arduino IDE? I found some DMA libraries online, but they had no SPI specific code.

Second, does anyone with SAMD21 knowledge know what may have caused the beat size issue?