AnsweredAssumed Answered

Problem with SPI/DMA transmission

Question asked by gezikov.roman on Nov 24, 2015

  I am using STM32F3DISCOVERY board. I connected SPI1 and SPI3 together and configured SPI1 as master and SPI3 as slave. I use code generated by CubeMX. I try to run this:

        startStatus3 = HAL_SPI_TransmitReceive_DMA(&hspi3, spi3TxBuffer, spi3RxBuffer, SPI3BUFSIZE);

        startStatus1 = HAL_SPI_TransmitReceive_DMA(&hspi1, spi1TxBuffer, spi1RxBuffer, SPI1BUFSIZE);

Buffers are of equal size, 5KB.

What I see is that sometimes I miss Tx interrupts on spi3. Normally, I see two Tx interrupts (half buffer transmitted and transmission complete). However, sometimes none of them comes. At the same time Rx interrupts always work as expected.

I've spent already quite a bit of time trying to figure out what's going on and so far hasn't got any result. 

Did somebody had similar issue? Can somebody come up with any idea why Tx interrupts can be missing on SPI/DMA slave operation while RX interrupt gets called normally?

Thanks for any suggestion,