I have been using the DMA for full duplex SPI transfers between a pair of MSP430FR5969 LaunchPad kits master/slave operating at 16MHz (MCLK & SMCLK). Eventually I will be using an I need full duplex SPI communications between a non-MSP master and an MSP430FR5969 slave. The MSP430s work fine up to somewhere between a bit-rate of 2.67MHz and 3.2MHz and then things start to break down. I noticed that the master was sending extra bytes as I sped up the clock. I couldn't find anything definitive on maximum SPI speed, but I assume that it should work up to 8MHz (some other controllers that I have used with DMA have no issue at half the system clock rate). I have verified the extra bytes with a protocol analyzer.
At any rate I now have just the master connected to the protocol analyzer. I am using a buffer of 4 bytes for my test. With the clocks at 16MHz and using a divisor of 8, 7 & 6 the MSP430 sends 4 bytes. With a bit-rate divisor of 5, 4 & 3 the MSP430 send 5 bytes and when the divisor is 2 it sends 7 bytes. The master is in 3-wire mode, I do hold the DMA in reset when I change the bit-rate divisor.
The thing that is really hard for me to understand is why the MSP430 sends more bytes than it should.
I can understand a speed limit (still not sure what it should be), I need an 8MHz full duplex link, from what I can tell the DMA takes 2 clocks to store the data (there are 8 per byte) and there is a transmit/receive buffer.
I have tried a couple of ways of starting the transfer (initial write to SPI Tx and toggling the Tx IFG) both work correctly as long as you make the size adjustment when writing to Tx register.
I can change the bit-rate between messages on the fly and and my full duplex setup continues to work fine at divisors of 6-8. Runs forever, I also implemented a checksum on one implementation just to make sure not else strange was going on.
I have about the smallest set of code/project that I could share. If anyone has a suggestion, I would be happy to try it. Hopefully it is just something simple.
Regards