STM32F401 SPI slave in DMA mode transmits erroneous data on the beginning
Hello,
we have now a bit peculiar problem. In our device, there is a main board and daughter boards connected by SPI bus. All MCUs are STM32F401. The main board works as SPI master, the daughter boards work as SPI slave, with DMA in both cases. The SPI is used in half-duplex-like mode, so when the masters transmits, the slave is silent and vice versa.
Transmitting from the master works fine. The slave receives also without errors, but when it start transmitting back to the master, it sends three erroneous bytes on the beginning. After this, the correct data are transmitted OK except the last three bytes which are left out. The first two bytes are always 0xFF, the third changes but with no discernible pattern. Moving buffers in memory does not help.
Note that we don't use HAL, all programming is directly to bare metal.
