STM32F412 SPI DMA data bit-shifted
Hi.
First of all, the essence of my problem is already described here - https://community.st.com/s/question/0D50X00009XkiXu/spi-dma-data-corruption?t=1567119350874
In my case bug happens randomly and not very often. It could be one corrupted transaction among hundreds-thousands.
For example, how it is should work:
First byte always is 0xAA.
Here is an example of corruption:

You can see that CLK signal has already started, but data on MOSI is delayed by 5 bits (not constant, can be 4, 3...).
My code: https://pastebin.com/X3CfdH4q
And settings: https://pastebin.com/GKWTC1QH