AnsweredAssumed Answered

STM32F429i-disc1 ili9341 SPI5 DMA-blazing fast but transmission errors

Question asked by horbach.markus on Aug 24, 2016
Latest reply on Sep 15, 2016 by horbach.markus
Hello everybody,

I am using the STM32F429i-disc1 board to create a SPI based driver for the ili9341. To achive the best performance with SPI, I am using DMA with SPI5. I connected PC2(configured as GPIO input) and PF6 (configured as SPI5 hardware CS) with a wire for hardware CS for the onboard ili9341 display. With CubeMX 4.16, I configured the Hardware and created an SW4STM32 project (see the attached Project files). So far, so good. With polling SPI data transfer, everything works fine, but a little bit slow. When using SPI DMA transfers, the pixel data (3 different images in an array stored in flash) gets somehow distorted. The first needed fix was to decrease the 8bit pointer to the images to avoid completely false colours before i start the DMA transfer. But the picture quality is still not perfect. When I transfer the image without DMA, the image quality is noticeable better and the decrease of the pointer is not needed. In the demo, you can see the difference. At first, a image is transfered with DMA, but you can spot some distortions in the background and on the skin. then, the same picture is send without DMA, noticeable slower, but with improved image quality(the same like on the PC screen). Can you explain me why the data gets corrupted and I have to decrease the pointer for one byte ? Lowering the SPI speed by choosing a higher prescaler has no effect except the loss of screen refresh speed.

Best regards,