Skip to main content
voyvoda .
Senior
May 29, 2020
Question

STM32F4-Discovery Driving ILI9341 via SPI with STemWin

  • May 29, 2020
  • 2 replies
  • 2006 views

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

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
May 29, 2020

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

waclawek.jan
Super User
May 29, 2020

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