AnsweredAssumed Answered

ILI9341 not working

Question asked by Philipp Höfler on Nov 12, 2017
Latest reply on Nov 12, 2017 by Philipp Höfler

Hi guys,

 

I am completely new to the STM32 stuff (I've done some projects with Arduinos) and I ran into some problems.

 

I am developing with an STM32L152RE board on Windows 10.

I did successfully the basic tutorials.

 

Now, I want to use a display. One problem with my Arduino projects was, that the painting the display is quite slow. So I would like to improve that with the STM32 family.

 

For that purpose I've a 2.4" SPI display with ILI9341 controller. In addition I've an Arduino Uno compatible shield. I connected the display with the shield and the shield with the STM32. As far as I understood the description the STM32 has a UNO R3 compatible pinout, right?

Here you can find more details about the hardware:

http://www.buydisplay.com/default/arduino-2-4-inch-tft-lcd-touch-shield-li9341-library-for-mega-due-uno 

 

Then, I've created a new project in the WebIDE. I added latest mbed library. In addition I've added the SPI_TFT_ILI9341 library (SPI_TFT_ILI9341 - a mercurial repository | Mbed). First I encountered some problems, due to the "stm32l1xx_dma.h" dependency. I read that the dependency is deprecated, so I commented all the #if that would be used for including the hardware specific file (SPI_TFT_ILI9341_NUCLEO.cpp).

 

Here is my code:

#include "mbed.h"
#include "SPI_TFT_ILI9341.h"
#include "Arial28x28.h"

 

SPI_TFT_ILI9341 TFT(D11, D12, D13, D10, D9, D8, "TFT"); // (mosi, miso, sck, cs, reset, dc)

int main()
{
TFT.set_orientation(3); // выбираем ориентацию дисплея
TFT.background(Blue); // выбираем цвет фона (можно словами)
TFT.foreground(0xFFFF); // выбираем цвет шрифта (или в формате rgb565)
TFT.cls(); // заливаем экран цветом фона
TFT.set_font((unsigned char*) Arial28x28); // выбираем наш шрифт
TFT.locate(30, 100); // координаты начала текста (горизонталь, вертикаль)
TFT.printf("Hello habrahabr.ru"); // выводим на экран
}

I am following the instructions found here:

STM32 Nucleo. We connect TFT LCD based on the ILI9341 chip / Geek magazine 

 

The display background light is working, but the display itself does not do anything.
I would have expected, that the background will be painted blue and some text will appear in white.

 

Can anybody please point me in the right direction?

I am quite new to the hardware stuff ... :-)

 

Thanks

Outcomes