I have data that come to my SAME70 via SPI. I receive them with the XDMAC 6 bytes by 6 bytes, and then in the End of Block interrupt, update the destination address and re-configure the XDMAC. This works, but I have to configure SPI sender to have a quite big blank time between 2 SPI data, if I don't want to loose data. This is because of the time to reconfigure the XDMAC at the end of the 6 bytes.
What I'd like to do to improve that is to have some sort of circular buffer to receive data. This mean, configure XDMAC to get 256 bytes, and when it is at the end, automatically restart without having to manually reconfigure it. Then in my main loop, I'll look at the XDMAC_CDA register to know if there are data to treat.
So 2 questions:
- Is it the best way to go?
- the XDMAC part of the datasheet isn't ver detailed, and I have difficulties to understand how to do that. I guess it has something to do with linked list, but I'm not sure how to do that using ASF.