2022-02-25 10:53 PM
Hello Everyone, I am trying to transmit data using DMA with SPI1 but each time I end up with a FIFO Error.. I 'm using Direct mode, MINC = 1, PINC = 0, DMA2, STREAM3, CHANNEL 3 For SPI_TX. I'm trying to send "Hello, World!!" But each time the FEIF3 is set. Each Time the FEIF3 Flag in the DMA2->LISR is set and the data gets corrupted & Garbage data is sent.
#STM32F4 #DMA #SPI #FIFO #FIFO_ERROR
Solved! Go to Solution.
2022-02-26 07:44 AM
2022-02-26 05:04 AM
Why is your ENABLE pin toggling? Looks like the data is otherwise fine. You should treat the CS pin as a GPIO and toggle it manually before/after the transfer. I don't think the FIFO ERROR flag is relevant if you're using direct mode, but not sure why it's getting set either. Perhaps show the code.
2022-02-26 07:40 AM
I am using Software Slave Management. Even I don't know why the CS Pin is toggling like that. I Pull it LOW before the Transmission & Pull it HIGH Again in the DMA2_Stream3_IRQHandler() after checking the the TCIF3 Flag in the DMA2 -> LISR Register. As you said I have checked and the Data seems to be correct but due to the CS Pin being toggled randomly the Logic Analyzer Displays wrong data values. What could be the reason for the GPIO CS Toggle?
2022-02-26 07:44 AM
2022-02-26 07:56 AM
Hey Man! Thanks It was probably because of me using 20cm Jumper Wires, Now I've switched to 10cm Jumpers and it works as expected.