cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4-Discovery Driving ILI9341 via SPI with STemWin

voyvoda .
Senior

Hello,

    I would like to drive "SPI ILI9341 LCD 320x240" on my STM32F4-Discovery board with STemWin.

    I have searched the forum but I found nothing.

    Could anyone help me to find out How can I implement this example.

    There is an example for STM32F429 but it does not work with SPI.

Best Regards

2 REPLIES 2

Start with reading the ILI9341 datasheet. The SPI interface is implemented in the example code for registers control, but the data are supplied to the LTDC controller, so you'd need to change the initialization code (omit writing to LCD_INTERFACE register as it's by default set to SPI through the pin straps; and you might want to change LCD_PIXEL_FORMAT register according to your needs), and you'd need to write the interface which supplies the data to the SPI instead of to LTDC (I don't use emWin so I can't give more info for this, read whatever manual is there for emWin/STemWin).

It's pity ST did not provide an example, as that would give users an idea of what are the drawbacks of using SPI for data. Depending on your application, you might find it to be unusably slow.

JW

You may want to have a look at https://stm32f4-discovery.net/2014/04/library-08-ili9341-lcd-on-stm32f429-discovery-board/

The author, Tilen Majerle is ST FAE.

JW