cancel
Showing results for 
Search instead for 
Did you mean: 

Getting ILI9341 Display to work via SPI

Nor Sch
Associate III
Posted on February 20, 2017 at 10:47

Hi, I  have troubles with getting a ILI9341-Display to work with my STM32L4. It's a 'TFT Proto Board' from MikroElectronika. I need to test SPI but the Initialization is not working, tried different Examples, mostly based on the Init-Example from MI0283QT-9A-DataSheet (Name of the LCD-Modul).

As far as I understand, the Read-Information-Commands 0x04, 0x09, 0x0A, 0xDA, 0xDB, 0xDC should work even without Initialization directly after a Hardware- / Software-Reset. But the TFT is not responding to them.

There are Differences in the Pin-Layout of Documentations and the Labels on the PCB. I used the PCB-Labels for Connections. On the PCB-Backside is only the IM-Mode 010X given as SPI-Variant. Relating to the ILI9341-DataSheet this should be 3-Wire 9-Bit-SPI and the X should be 1. Ok, but this does not work. Don't really know if the Display also supports the other IM-Modes as defined from the ILI9341-Spec. Maybe they are not routed 1:1 ... I also tried the 8-Bit-Modes, but also without Result. Only the Backlight is on. If reading in 3-Wire-Mode the Controller gives the control over \CS and so on to the TFT but the TFT is floating around 1 Volt. For 4-Bit-Modes I see the same on the MISO-Line.

Has anyone an Idea what could be the Problem or maybe someone else has worked with this Display? I also wrote to the Manufacturer but not really expect an useful Answer ...

1 ACCEPTED SOLUTION

Accepted Solutions
Nor Sch
Associate III
Posted on February 20, 2017 at 16:50

After 2 Days of searching I reconnected everything. This Time I used the DataSheets from the LCD-Modul MI0283QT-9A and the ILI9341, and now it works!   After that I looked for the Error from first tries and found it in wrong Pin-Descriptions in the MikroElectronika-DataSheet. It's simply wrong for SPI ...

@Amel: The Disco uses parallel Interface as 90% of the Rest of the World too. But I need here the SPI and the Prob was the Wirering

View solution in original post

4 REPLIES 4
AvaTar
Lead
Posted on February 20, 2017 at 11:57

I don't know this boards specifically.

However, the bus mode (SPI / 8-bit 8080 / 8-bit 6800 / etc.) is usually set by pull-up/pull-down resistors on GPIOs of the driver chip (ILI9341). A configuration, i.e. bus mode, is often set on the board by the given design.

I would check the schematics provided by MikroElektronika - they usually do provide them.

Amel NASRI
ST Employee
Posted on February 20, 2017 at 16:41

Hi

Sch.Nor

‌,

The ILI9341 display is already embedded inSTM32F429I-DISCO (

http://www.st.com/content/ccc/resource/technical/document/user_manual/6b/25/05/23/a9/45/4d/6a/DM000939pdf/files/DM000939pdf/jcr:content/translations/en.DM000939pdf

).

You can take as reference its drivers (available in the STM32CubeF4 package) to know what you need to make as updates so that it may be used with STM32L4.

I suggest you also to have a look to

https://community.st.com/0D50X00009XkW5nSAF

.

They may bring you some help to setup your graphical application.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Nor Sch
Associate III
Posted on February 20, 2017 at 16:50

After 2 Days of searching I reconnected everything. This Time I used the DataSheets from the LCD-Modul MI0283QT-9A and the ILI9341, and now it works!   After that I looked for the Error from first tries and found it in wrong Pin-Descriptions in the MikroElectronika-DataSheet. It's simply wrong for SPI ...

@Amel: The Disco uses parallel Interface as 90% of the Rest of the World too. But I need here the SPI and the Prob was the Wirering

Nor Sch
Associate III
Posted on February 20, 2017 at 16:58

If anybody else get some Trouble with this TFT and SPI here some Hints:

1. the IM-Mode-Lines could be used as defined by ILI9341 and not only in Mode 0101 as written on the PCB. Means: 4-Wire 8-Bit is possible and should be used

2. look for the Pins RD, WR, RS into the above named DataSheets and ignore the one from MikroElectronika

3. Use a Hardware-Reset for Initialization! The SW-Reset which is used in the Init-Example from MI0283QT-9A-Datasheet was not working for me.

4. an additional Hint: a lot of Guys use these Displays with SPI at 20, 40 or even at 48 MHz with there RasbPis but this is 'a little bit' outside of Specification. At least the Read will not work with these Clock-Settings.