240x320 TFT display working fine now solid white permanently

dokrent

Member
i had the display working fine and started modifying the circuit and display to use the SD card. Plug everything back in and got only a white screen. Checked wiring, it is fine. Tried again, same issue, rewired again, same issue. Removed SD wires and returned wires to previous display only condition, still the white screen. I put in a new display after rewiring again, still the white screen. Did I blow the teens ? Using the ILI9341 library. Loaded graphicstest, still white screen. Advice welcome.

Thank you.
 
Are you using 10k pull ups on the CS lines? Initializing the SD card before the display to be sure it is in SPI mode? Show us your wiring and code as it helps us to help you.
 
Yep, when I run into this it's due to RST not being powered up correctly (some displays are finicky and require some extra steps). The RST needs to be high just slightly after the display is powered up

1. is your RST pin on the display connected to 3v3 or an MCU pin? if not you can try connecting RST to a digital pin and changing your object creation call to
ILI9341_t3 Display = ILI9341_t3(TFT_CS, TFT_DC, TFT_RST);
)
2. if RST is connected to 3v3 try adding a 1K resistor in series and a 10uf Cap to ground (connected between RST and ground). This will slow the charge to RST, hence letting the display power up first. These are the values I use, but you may need to change them

Hope this helps.
 
Which Teensy are you using?
Which code were you using and how was the display wired?
I'm currently playing around with a 240x320 ILI9341-based display. First, I got it working on an Arduino Duemilanove and then on a Teensy++2. I'm currently trying to get it running on a T3.5. While doing this, I've noticed that if you use the UTFT library on Teensy3.x you have to choose between using ports B+D or Ports C+D. If you use C+D you cannot access the SD card.

BTW. The display that I have requires both 5V and 3V3 but the display digital pins output 5V, which is why I'm trying to get it going on the 5V-tolerant Teensy 3.5.

Pete
 
Thanks for the replies. I hadn’t added any code for the SD when things went south. The current code and wiring was working fine with the display for sometime when this occurred. I have the RST pin wired to the 3V3 line. The display is powered from the teensy 3V3 line i do not have the SD card wires attached. I didn’t use the pull up resistors as the display worked fine up until this failure. I noted that the pull ups were part of the modification to use the SD card. Since I have swapped out the display I fear it is a teensy 4 hardware issue. I will try the pull ups and the slow RST line suggestion.
 
Ooops. I appear to be using an older version of the display which was set up as a shield for Arduino UNO and used parallel data transfer rather than SPI.

Pete
 
RST Line

a buck says its the RST line :)

The code you suggested was already in the program. I have RST tied to 3V3, but I will try the RC you suggested. However, I am still not clear why this work fine for hours and hours and then when I wired in the SD (no code to support) it went bad. Nor do I understand how the same code, no SD wires, and a new display are doing the same thing, given it was all working before. Time will tell. Thanks for the advice.
 
Sorry it is sometimes hard to help without seeing much of anything. Like the code or the wiring or... Which Teensy? Which version of Arduino...

Yes you mentioned graphictest and you mentioned ILI9341, but for example is this the one PJRC sells or one that Adafruit sells or ??? Why that might matter, is for example Adafruit builds in things like Pull-up resistors and the like so for example you can leave the RST unconnected and it will likely work. Where as PJRC one is more basic version and you need to do something with the RST line.

Likewise you mentioned adding SD connection? Again which one? how is it connected... Do you have Pull UP resistors on the CS pins? again Adafruit board may have these built in.

If you don't have it. Then maybe CS pin is floating or LOW and it is also trying to process the SPI data, which could cause it to mess up.

So if they don't have CS pins with PU resistors you can most of the time fix the issue.

By before calling the begin or init functions for the display or SD... You first add some lines like:
Code:
pinMode(SD_CS, OUTPUT);
digitalWrite(SD_CS, HIGH); // make sure it does not do SPI called on...
Again which ILI9341 library are you using? Adafruit_ILI9341, or ILI9341_t3, or ILI9341_t3n or ???

Why this matters are things like: ILI9341_t3 library will only work if both the DC pin and CS pin is on a hardware CS pin (on T3.x boards) On T4 that is relaxed as the CS pins work differently.

So sorry for this shotgun like answer but maybe one of the pellets will hit the right target.
 
Teensy 4.0 and the Red TFT display (HiLetgo ILI9341 2.8" SPI TFT LCD Display Touch Panel 240X320 with PCB 5V/3.3V STM32)

I used the ILI9341.t3 and graphictest that are under Teensy libraries and examples in the Arduino IDE. Like I said before these were working fine before the stuff hit the fan. I can still load and run graphictest and get the board info from the Serial Monitor even though the display is white. I have pull up resistors on DC, RST, and CS. I don't have the SD connected in anyway right now. I am focusing only on getting the display running correctly again. I will follow you advice when I attempt the SD function again, including replacing R1-R3 with 0-ohms which has been documented before in other areas of the forum.

Thanks for your help.
 
You are welcome. Also at times like this, it might help if you posted a picture of your current setup. Maybe someone will see something like:
you are off by one pin... Been there, or maybe MISO amd MOSI pins reversed (again been there).

Or maybe the IO pins are not fully soldered in or ...

Or maybe power issue? I don't remember if these have a built in Voltage regulator and if it needs +5v to go to the VIN pin? Again some of there documents are not overly clear from their instructions.
So are you trying to supply it from VIN or 3.3v? Note: The one on PJRC mentions wanting 3.6-5v...
 
I experienced a similar problem when I tried to use my 2.2 and 2.8 inch displays (from PJRC) with my new Teensy 4.0. I also got a white screen. Both displays would work as expected on my 3.2 and 3.5 Teensy. The solution was to connect the Reset pin to the Teensy and reset the display during the initialization process by defining what pin is connected to reset.
 
Well I have tried it all and both displays are still white screen. The SPI is working as I can read information from the board. I think it's time to throw in the towel. I am still not sure how it went from working to not working, but I guess I will never know.
 
I can confirm the same wild issue as dokrent.

So, I have a purpose built pcb with the teensy 4.0 footprint (little did I know the financial implications this would have...I've been through >£60 worth of teensy 4.0).

My setup:
MCU: Teensy 4.0
Bare display: ILI9341 50pin connector
Display settings: 4 wire spi
Running Voltage: 3v3 (see https://forum.pjrc.com/threads/64468-Teensy40-only-3-3V-power-supply)
Pins: standard SPI, RST 30, DC 5, CS 28
Optional pullups on: CS, RST

My PCB board size is about 100mm-80mm (all hand soldered with a hot air tool, soldering iron, heat bed not to blow my own trumpet, but I am very good at pcb assembly by hand + I find it therapeutic).

So after half a days soldering, I fire up the board and excellent, the ILI9341 is running at a clock speed of 100mhz (not scoped), lightning fast! Dropped the speed to a more reasonable 20mhz and left overnight for a board test (i always do this, as i have lipos connected etc and like to see if there are any heat issues etc after a 24h run). Found no issues the next morning, graphics test still running so powered off the device.

Powered back up after my return from work @20mhz and the graphics test worked fine. Enabled my SD circuitry (solder jumpers), reran the test and both the ILI9341 and SD were both running sweet.

No changes made, powered up on the third day, and nothing but a white screen on the ILI9341? So i say, must have blew the t4 some how. Hot air removed the t4, on goes the new one and again a few runs later and i get a white screen again? Checked all my pin assignments, voltages and they are all good.

I came to the conclusion that as I was forcing the T4 to be powered of of 3v3 as per (https://forum.pjrc.com/threads/64468-Teensy40-only-3-3V-power-supply) this was somehow messing with the SPI communication. I canned the T4 and designed and built a T4-SAMD51 clone.

Guess what, no issues at all with the SAMD51 board.(hopefully I wont get in trouble for copying the t4 footprint...)

I picked up the project again today and de-soldered my SAMD51 T4 clone pcb as I need speed! The T4 would have been perfect, so tried a few code changes, got the screen running in the setup function (static text etc), but as soon as it enters the loop(), you guessed it....white screen. Its as if the t4 is too fast on spi or something, but I have changed the clock speeds down to 5mhz and yield the same results...

I was convinced the running the T4 at 3v3 was the issue, but having read this post it sadly points towards a T4 hw issue or lib issue.

To confirm, I had the T4 intermittently working on both the adafruit ili9341 library and the optimised ili9341_t3. I've been through 3 T4s and I have 5 different ILI934 displays. (all give the same results, pull ups, no pullups, removed sd circuitry, ran the T4 at 5v I've tried it all!)

Looks like I'll be staying with the slower SAMD51 for now unless someone can shine light on the issue.

Any info/tips would be much appreciated!
 
Last edited:
Hard to say. Lots of us have used t4. I have not used bare display, but instead used ones sold by PJRC , eBay, Adafruit

Hard to say anything without additional info, like wiring, code…
 
I don't have any recent usage of ILI9341's. But with several of the displays I've used with uncanny eyes (128x128 OLED in particular), I have to reduce the SPI frequency down because the processor runs much faster than the display can handle.

In most of the display code I've seen there is a variable with the type SPISettings that the constructor has 3 arguments. The first is the SPI bus speed, the second indicates whether the SPI bus gets bits most significant bit first or least significant bit first, and the third indicates the SPI mode.

For running uncanny eyes, I've found that with the 128x128 OLED displays using the SSD1351 driver, I need to lower the SPI bus speed to 11 Mhz (i.e. the first argument to the SPISettings is 11000000U). With the 128x128 TFT displays using the ST7735 driver, I can push it up to 23 Mhz. With the 240x240 displays using the ST7789_t3 driver, I can use 48 Mhz.

Particularly with the OLED displays, I found that different manufacturers could be pushed to different speeds. When I first tested it in 2017, I found displays from Wavelan and NewHaven could run at 18 Mhz, but displays from Adafruit needed 12 Mhz. And the quality/length of the wiring and outside electrical interfaces can also play a part. When I got back to uncanny eyes with the OLED displays this year, using a breadboard connection, I had to reduce the SPI speed to 11 Mhz to prevent glitching.

When I first tried it, I did reduce the main processor bus speed (particularly with Teensy 3.5/3.6's I used in 2017, and of course the 4.0/4.1's I use now), but I ultimately found that by setting the SPI bus speed, I could run the main processor at full speed.

Also note, it was discovered that some of the cheap 240x240 displays (without a CS pin) need to use SPI_MODE2 instead of SPI_MODE0.
 
Hi,

This is a silly question but do you have a touchscreen on the ILI9341 and is it wired to the same SPI bus ? I say that because I got caught a few time forgetting the touchscreen was wired and not setting TOUCH_CS high which resulted resulted in random white screen at boot (depending on the state on the TOUCH_CS PIN at startup which may be floating at boot).

Probably not a solution either but you may also give a try with my ILI9341_T4 driver specially designed for T4 and which should output some debugging info when initialization fails. Maybe this can help narrowing down the issue ?



I can confirm the same wild issue as dokrent.

So, I have a purpose built pcb with the teensy 4.0 footprint (little did I know the financial implications this would have...I've been through >£60 worth of teensy 4.0).

My setup:
MCU: Teensy 4.0
Bare display: ILI9341 50pin connector
Display settings: 4 wire spi
Running Voltage: 3v3 (see https://forum.pjrc.com/threads/64468-Teensy40-only-3-3V-power-supply)
Pins: standard SPI, RST 30, DC 5, CS 28
Optional pullups on: CS, RST

My PCB board size is about 100mm-80mm (all hand soldered with a hot air tool, soldering iron, heat bed not to blow my own trumpet, but I am very good at pcb assembly by hand + I find it therapeutic).

So after half a days soldering, I fire up the board and excellent, the ILI9341 is running at a clock speed of 100mhz (not scoped), lightning fast! Dropped the speed to a more reasonable 20mhz and left overnight for a board test (i always do this, as i have lipos connected etc and like to see if there are any heat issues etc after a 24h run). Found no issues the next morning, graphics test still running so powered off the device.

Powered back up after my return from work @20mhz and the graphics test worked fine. Enabled my SD circuitry (solder jumpers), reran the test and both the ILI9341 and SD were both running sweet.

No changes made, powered up on the third day, and nothing but a white screen on the ILI9341? So i say, must have blew the t4 some how. Hot air removed the t4, on goes the new one and again a few runs later and i get a white screen again? Checked all my pin assignments, voltages and they are all good.

I came to the conclusion that as I was forcing the T4 to be powered of of 3v3 as per (https://forum.pjrc.com/threads/64468-Teensy40-only-3-3V-power-supply) this was somehow messing with the SPI communication. I canned the T4 and designed and built a T4-SAMD51 clone.

Guess what, no issues at all with the SAMD51 board.(hopefully I wont get in trouble for copying the t4 footprint...)

I picked up the project again today and de-soldered my SAMD51 T4 clone pcb as I need speed! The T4 would have been perfect, so tried a few code changes, got the screen running in the setup function (static text etc), but as soon as it enters the loop(), you guessed it....white screen. Its as if the t4 is too fast on spi or something, but I have changed the clock speeds down to 5mhz and yield the same results...

I was convinced the running the T4 at 3v3 was the issue, but having read this post it sadly points towards a T4 hw issue or lib issue.

To confirm, I had the T4 intermittently working on both the adafruit ili9341 library and the optimised ili9341_t3. I've been through 3 T4s and I have 5 different ILI934 displays. (all give the same results, pull ups, no pullups, removed sd circuitry, ran the T4 at 5v I've tried it all!)

Looks like I'll be staying with the slower SAMD51 for now unless someone can shine light on the issue.

Any info/tips would be much appreciated!
 
Hi,

This is a silly question but do you have a touchscreen on the ILI9341 and is it wired to the same SPI bus ? I say that because I got caught a few time forgetting the touchscreen was wired and not setting TOUCH_CS high which resulted resulted in random white screen at boot (depending on the state on the TOUCH_CS PIN at startup which may be floating at boot).

Probably not a solution either but you may also give a try with my ILI9341_T4 driver specially designed for T4 and which should output some debugging info when initialization fails. Maybe this can help narrowing down the issue ?

Hi All,

These are some excellent pointers and sure this will help others having issues with the T4 SPI speed and ILI9341 display. Yes, I have a touch screen on my project but its the I2C 6206.

I have since fixed the issue, but really depends on what manufacture of screen you are using i.e. does it provide easy enough access to the screens IO pins (luckily when designing my PCBs, I break out all unused pins as test points).

So the FIX: The ILI9341 in 4-wire SPI mode requires IM1-3 (pins 7,8,9) to be connected HIGH (3v3). The issue is with IM0, this should be tied to ground. When tied to ground the display starts up immediately on the T4. It still doesn't explain why it works with the SAMD with IM0 floating, but must be speed or noise related.. (lesson learnt for my next revision of PCB).

I now have the ILI9341 running off of the stock Adafruit library at 100mhz, its ridiculously fast! (haven't tested with the optimised-T library as the last time I checked there wasn't an easy enough way to find out text length, this is imperative for me to be able to port my code which is suited to the ada lib).

Here's a snap of my SAMD51 T4 shaped thingy magige... this was obviously produced out of pure frustration but seeing that I have no need for it due to the slower speeds, I shall let it live on by way of people viewing it, it did take a day or so to design and solder up after all!

front.jpg

Hope this helps someone.

E
 
Last edited:
Sounds like you're working with a bare ILI9341 display rather than one on a PCB. Any chance for a photo? Might help people who later find this thread more quickly understand when this issue with the IM0-IM3 pins is relevant.
 
Hi All,

These are some excellent pointers and sure this will help others having issues with the T4 SPI speed and ILI9341 display. Yes, I have a touch screen on my project but its the I2C 6206.

I have since fixed the issue, but really depends on what manufacture of screen you are using i.e. does it provide easy enough access to the screens IO pins (luckily when designing my PCBs, I break out all unused pins as test points).

So the FIX: The ILI9341 in 4-wire SPI mode requires IM1-3 (pins 7,8,9) to be connected HIGH (3v3). The issue is with IM0, this should be tied to ground. When tied to ground the display starts up immediately on the T4. It still doesn't explain why it works with the SAMD with IM0 floating, but must be speed or noise related.. (lesson learnt for my next revision of PCB).

I now have the ILI9341 running off of the stock Adafruit library at 100mhz, its ridiculously fast! (haven't tested with the optimised-T library as the last time I checked there wasn't an easy enough way to find out text length, this is imperative for me to be able to port my code which is suited to the ada lib).

Here's a snap of my SAMD51 T4 shaped thingy magige... this was obviously produced out of pure frustration but seeing that I have no need for it due to the slower speeds, I shall let it live on by way of people viewing it, it did take a day or so to design and solder up after all!

View attachment 29480

Hope this helps someone.

E

just wanted to chime in and say IT HELPED ME ! I've been fighting an SPI speed issue, couldn't get it working over 1 Mhz

grounded IM0 (instead of leaving it floating) and BAM it all started working perfectly.

thank you very much !
 
Back
Top