UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jwiede
 
Posts: 14
Joined: Thu Sep 27, 2012 9:15 pm

UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by jwiede »

I've attempted to get the 3.5" (PID:3651) HX8357-based TFT Featherwing working with both a UM FeatherS3 (ESP32S3 N16R8) and an RP2040 Feather (PID:4884) using both CircuitPython and Arduino -- in ALL such attempts, the 3.5" TFT Featherwing has never showing anything other than a white screen. I have tried both HX8357 example code for Arduino (using pin#s for Feather3S and RP2040Feather -- cited below), I've also tried number adafruit_gfx + displayio + adafruit_hx8357 CircuitPython-based examples, yet never seen anything besides an all white screen from the Featherwing. Yes, enable is at "ON" position.

I'm using 2.0.3 ESP32 Arduino ESP32 on latest 2.x IDE, using circup-updated dependencies with 7.3.0-rc1 & -rc2 CircuitPython UF2 images and appropriate community and Adafruit libraries. For Arduino, grahphictest_feather, there was some ambiguity about the pin numbers so I tried the following configs (and similarly so for other examples):

(SCS, RCS, TCS / TFT_CS. TFT_DC)
(33. 38. 1, 3)
(33. 38. 9, 10)
(D5, D6, D9, D10)

and maybe 1-2 other combinations, but never saw any sign of graphic activity, just plain white screen no matter what.

Any further suggestions?

I've got a 3.5 TFT w/breakout, and was going to try and wire that up instead to see if it behaved differently, but figured I'd be better off first confirming the proper config needed.

Thanks!

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by mikeysklar »

Thanks for trying two different Feathers (RP2040 and UMS3). Plus both Arduino and CircuitPython environments.

Can post a photo of the headers you soldered onto the Feather boards?

Do you have another model of feather maybe M0, M4, nRF52 or earlier ESP32?

Which example code were you running? Had you made pin changes in the script examples?

User avatar
jwiede
 
Posts: 14
Joined: Thu Sep 27, 2012 9:15 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by jwiede »

Sorry for the delayed reply, busy week here. I'll post pictures of the feathers. In terms of other Feathers, aside from a couple other ESP32-family ones (ESP32 v2, Adafruit ESP32S3 noPSRAM, UM FeatherS2 -- the UMS2 behaved same as UMS3 btw) and I also have a Feather STM32F405. Would you like me to try the STM32F405 or others? Let me know and I'll grab pics of their soldered terminals as well, before testing.

If you know and pass along what the proper assignments are for TFT_DC, TFT_CS, and the other two CS lines, for any of the others you'd like me to test, that would same me a bunch of checking before testing with them.

Should I wait until after testing with the other Feathers before testing using the 3.5 TFT Breakout?

Also, can someone please verify what the proper pin values are for the UMFeatherS3 & Adafruit Feather RP2040 for the 3.5 TFT Featherwing? I tested with the values listed above, but there's some ambiguity in the docs (and some conflicting statements), so I'd like to know for certain what the correct assignments for each are for TFT_DC, TFT_CS, and the other two CS lines (different names across different tests, but they're essentially the SD and "Touch" CS lines).

Thanks in advance, and for help already suggested!

User avatar
jwiede
 
Posts: 14
Joined: Thu Sep 27, 2012 9:15 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by jwiede »

P.S. I should mention up-front I always continuity check to affirm no cross-connection of adjacent pins (where inappropriate, sometimes its expected), and as much as possible, that the pin has continuity with the trace (often not possible, but where feasible esp. for grounds, etc.).

User avatar
jwiede
 
Posts: 14
Joined: Thu Sep 27, 2012 9:15 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by jwiede »

Here are the pics. As they're fairly high-res to see details, and the upload limit is tiny, I'm providing as g-drive links. If that's a problem, please let me know and I'll find some other means...

Overview (UMesp32S3, UMesp32S2, RP2040): https://drive.google.com/file/d/1x5BVzs ... sp=sharing

UMesp32S3 1: https://drive.google.com/file/d/1w8uVdK ... sp=sharing
UMesp32S3 2: https://drive.google.com/file/d/1nKKpgA ... sp=sharing

UMesp32S2 1: https://drive.google.com/file/d/1l8KaoG ... sp=sharing
UMesp32S2 2: https://drive.google.com/file/d/18IIIqf ... sp=sharing

RP2040 1: https://drive.google.com/file/d/1e2EUrK ... sp=sharing
RP2040 2: https://drive.google.com/file/d/1gqV4V6 ... sp=sharing

Let me know when you're done looking so I can nuke em, please? Thanks again for any help you can provide!

User avatar
jwiede
 
Posts: 14
Joined: Thu Sep 27, 2012 9:15 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by jwiede »

I'm not great with a soldering iron by any means, but I've gotten decent at terminals (I think, anyway) -- leaded solder helps, so does a "hot" iron (Hakko 888 with fine pt tip at 750degF). Also helps that I tend to go back and "remelt" to let it sink into the holes a bit after the initial placement. Between that and the mandatory cross-checking, I'm reasonably certain that all the terminal connections I've done (all the Feather terminals) are solid.

User avatar
jwiede
 
Posts: 14
Joined: Thu Sep 27, 2012 9:15 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by jwiede »

One more interesting bit of data from yesterday's testing: After restarting everything using Feather RP2040, latest HX8357 & Adafruit GFX libs, etc. and reloading the graphicstest_featherwing example under HX8357, I was able to get the serial monitor to display stats on the gfx primitives being drawn (as the source indicates). Alas, each sequence "caught" with "Circles (outline)" as the first line to show in the serial monitor (presumably due to delay for it to "grab" the reappearing ttyACMx), and ended with "Done!".

Despite displaying statistics via the serial port, the 3.5" HX8357-based TFT panel never showed anything other than a bright white screen from booting to reset.

Code run follows, I made no adjustments.

P.S. Why does the banned spam word screener capture "c-u-p-b-0-a-r-d-s" (in non-l33t)? If you knew it did, why put that word in example source code?

Code: Select all

/***************************************************
  This is our library for the Adafruit 3.5" TFT (HX8357) FeatherWing
  ----> http://www.adafruit.com/products/3651

  Check out the links above for our tutorials and wiring diagrams
  These displays use SPI to communicate, 4 or 5 pins are required to
  interface (RST is optional)
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  MIT license, all text above must be included in any redistribution
 ****************************************************/

#include <SPI.h>
#include "Adafruit_GFX.h"
#include "Adafruit_HX8357.h"

#ifdef ESP8266
   #define STMPE_CS 16
   #define TFT_CS   0
   #define TFT_DC   15
   #define SD_CS    2
#elif defined(ESP32) && !defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
   #define STMPE_CS 32
   #define TFT_CS   15
   #define TFT_DC   33
   #define SD_CS    14
#elif defined(TEENSYDUINO)
   #define TFT_DC   10
   #define TFT_CS   4
   #define STMPE_CS 3
   #define SD_CS    8
#elif defined(ARDUINO_STM32_FEATHER)
   #define TFT_DC   PB4
   #define TFT_CS   PA15
   #define STMPE_CS PC7
   #define SD_CS    PC5
#elif defined(ARDUINO_NRF52832_FEATHER)  /* BSP 0.6.5 and higher! */
   #define TFT_DC   11
   #define TFT_CS   31
   #define STMPE_CS 30
   #define SD_CS    27
#elif defined(ARDUINO_MAX32620FTHR) || defined(ARDUINO_MAX32630FTHR)
   #define TFT_DC   P5_4
   #define TFT_CS   P5_3
   #define STMPE_CS P3_3
   #define SD_CS    P3_2
#elif defined(FEATHERS3)
   #define STMPE_CS 33 // was 6
   #define TFT_CS   9  // was 9
   #define TFT_DC   10  // was 10
   #define SD_CS    38 // was 5
#else
    // Anything else, defaults!
   #define STMPE_CS 6 // was 6
   #define TFT_CS   9  // was 9
   #define TFT_DC   10  // was 10
   #define SD_CS    5 // was 5
#endif


#define TFT_RST -1

// Use hardware SPI and the above for CS/DC
Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC, TFT_RST);


void setup() {
  Serial.begin(115200);
  Serial.println("HX8357D Test!"); 

  while (true) 
    continue;

  tft.begin();

  // read diagnostics (optional but can help debug problems)
  uint8_t x = tft.readcommand8(HX8357_RDPOWMODE);
  Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(HX8357_RDMADCTL);
  Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(HX8357_RDCOLMOD);
  Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(HX8357_RDDIM);
  Serial.print("Image Format: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(HX8357_RDDSDR);
  Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX); 
  
  Serial.println(F("Benchmark                Time (microseconds)"));

  tft.setRotation(1);

  Serial.print(F("Text                     "));
  Serial.println(testText());
  delay(500);

  Serial.print(F("Lines                    "));
  Serial.println(testLines(HX8357_CYAN));
  delay(500);

  Serial.print(F("Rectangles (outline)     "));
  Serial.println(testRects(HX8357_GREEN));
  delay(500);

  tft.fillScreen(HX8357_BLACK);
  Serial.print(F("Circles (outline)        "));
  Serial.println(testCircles(10, HX8357_RED));
  delay(500);


  Serial.print(F("Triangles (outline)      "));
  Serial.println(testTriangles());
  delay(500);

  Serial.print(F("Triangles (filled)       "));
  Serial.println(testFilledTriangles());
  delay(500);


  Serial.print(F("Rounded rects (outline)  "));
  Serial.println(testRoundRects());
  delay(500);

  Serial.print(F("Rounded rects (filled)   "));
  Serial.println(testFilledRoundRects());
  delay(500);

  Serial.println(F("Done!"));
}


void loop(void) {
  for(uint8_t rotation=0; rotation<4; rotation++) {
    tft.setRotation(rotation);
    testText();
    delay(1000);
  }
}

unsigned long testFillScreen() {
  unsigned long start = micros();
  tft.fillScreen(HX8357_RED);
  tft.fillScreen(HX8357_GREEN);
  tft.fillScreen(HX8357_BLUE);
  tft.fillScreen(HX8357_WHITE);
  return micros() - start;
}


unsigned long testText() {
  tft.fillScreen(HX8357_BLACK);
  unsigned long start = micros();
  tft.setCursor(0, 0);
  tft.setTextColor(HX8357_WHITE);  tft.setTextSize(1);
  tft.println("Hello World!");
  tft.setTextColor(HX8357_YELLOW); tft.setTextSize(2);
  tft.println(1234.56);
  tft.setTextColor(HX8357_RED);    tft.setTextSize(3);
  tft.println(0xDEADBEEF, HEX);
  tft.println();
  tft.setTextColor(HX8357_GREEN);
  tft.setTextSize(5);
  tft.println("Groop");
  tft.setTextSize(2);
  tft.println("I implore thee,");
  tft.setTextSize(1);
  tft.println("my foonting turlingdromes.");
  tft.println("And hooptiously drangle me");
  tft.println("with crinkly bindlewurdles,");
  tft.println("Or I will rend thee");
  tft.println("in the gobberwarts");
  tft.println("with my blurglecruncheon,");
  tft.println("see if I don't!");
  
  tft.setTextColor(HX8357_WHITE);
  tft.println(F("Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, 'and what is the use of a book,' thought Alice 'without pictures or conversations?'"));

tft.println(F("So she was considering in her own mind (as well as she could, for the hot day made her feel very sleepy and stupid), whether the pleasure of making a daisy-chain would be worth the trouble of getting up and picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her."));

tft.println(F("There was nothing so very remarkable in that; nor did Alice think it so very much out of the way to hear the Rabbit say to itself, 'Oh dear! Oh dear! I shall be late!' (when she thought it over afterwards, it occurred to her that she ought to have wondered at this, but at the time it all seemed quite natural); but when the Rabbit actually took a watch out of its waistcoat-pocket, and looked at it, and then hurried on, Alice started to her feet, for it flashed across her mind that she had never before seen a rabbit with either a waistcoat-pocket, or a watch to take out of it, and burning with curiosity, she ran across the field after it, and fortunately was just in time to see it pop down a large rabbit-hole under the hedge."));

tft.println(F("In another moment down went Alice after it, never once considering how in the world she was to get out again."));

tft.println(F("The rabbit-hole went straight on like a tunnel for some way, and then dipped suddenly down, so suddenly that Alice had not a moment to think about stopping herself before she found herself falling down a very deep well."));

tft.println(F("Either the well was very deep, or she fell very slowly, for she had plenty of time as she went down to look about her and to wonder what was going to happen next. First, she tried to look down and make out what she was coming to, but it was too dark to see anything; then she looked at the sides of the well, and noticed that they were filled with ********* and book-shelves; here and there she saw maps and pictures hung upon pegs. She took down a jar from one of the shelves as she passed; it was labelled 'ORANGE MARMALADE', but to her great disappointment it was empty: she did not like to drop the jar for fear of killing somebody, so managed to put it into one of the ********* as she fell past it."));
  
  return micros() - start;
}

unsigned long testLines(uint16_t color) {
  unsigned long start, t;
  int           x1, y1, x2, y2,
                w = tft.width(),
                h = tft.height();

  tft.fillScreen(HX8357_BLACK);

  x1 = y1 = 0;
  y2    = h - 1;
  start = micros();
  for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
  x2    = w - 1;
  for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
  t     = micros() - start; // fillScreen doesn't count against timing


  return micros() - start;
}

unsigned long testFastLines(uint16_t color1, uint16_t color2) {
  unsigned long start;
  int           x, y, w = tft.width(), h = tft.height();

  tft.fillScreen(HX8357_BLACK);
  start = micros();
  for(y=0; y<h; y+=5) tft.drawFastHLine(0, y, w, color1);
  for(x=0; x<w; x+=5) tft.drawFastVLine(x, 0, h, color2);

  return micros() - start;
}

unsigned long testRects(uint16_t color) {
  unsigned long start;
  int           n, i, i2,
                cx = tft.width()  / 2,
                cy = tft.height() / 2;

  tft.fillScreen(HX8357_BLACK);
  n     = min(tft.width(), tft.height());
  start = micros();
  for(i=2; i<n; i+=6) {
    i2 = i / 2;
    tft.drawRect(cx-i2, cy-i2, i, i, color);
  }

  return micros() - start;
}

unsigned long testFilledRects(uint16_t color1, uint16_t color2) {
  unsigned long start, t = 0;
  int           n, i, i2,
                cx = tft.width()  / 2 - 1,
                cy = tft.height() / 2 - 1;

  tft.fillScreen(HX8357_BLACK);
  n = min(tft.width(), tft.height());
  for(i=n; i>0; i-=6) {
    i2    = i / 2;
    start = micros();
    tft.fillRect(cx-i2, cy-i2, i, i, color1);
    t    += micros() - start;
    // Outlines are not included in timing results
    tft.drawRect(cx-i2, cy-i2, i, i, color2);
  }

  return t;
}

unsigned long testFilledCircles(uint8_t radius, uint16_t color) {
  unsigned long start;
  int x, y, w = tft.width(), h = tft.height(), r2 = radius * 2;

  tft.fillScreen(HX8357_BLACK);
  start = micros();
  for(x=radius; x<w; x+=r2) {
    for(y=radius; y<h; y+=r2) {
      tft.fillCircle(x, y, radius, color);
    }
  }

  return micros() - start;
}

unsigned long testCircles(uint8_t radius, uint16_t color) {
  unsigned long start;
  int           x, y, r2 = radius * 2,
                w = tft.width()  + radius,
                h = tft.height() + radius;

  // Screen is not cleared for this one -- this is
  // intentional and does not affect the reported time.
  start = micros();
  for(x=0; x<w; x+=r2) {
    for(y=0; y<h; y+=r2) {
      tft.drawCircle(x, y, radius, color);
    }
  }

  return micros() - start;
}

unsigned long testTriangles() {
  unsigned long start;
  int           n, i, cx = tft.width()  / 2 - 1,
                      cy = tft.height() / 2 - 1;

  tft.fillScreen(HX8357_BLACK);
  n     = min(cx, cy);
  start = micros();
  for(i=0; i<n; i+=5) {
    tft.drawTriangle(
      cx    , cy - i, // peak
      cx - i, cy + i, // bottom left
      cx + i, cy + i, // bottom right
      tft.color565(200, 20, i));
  }

  return micros() - start;
}

unsigned long testFilledTriangles() {
  unsigned long start, t = 0;
  int           i, cx = tft.width()  / 2 - 1,
                   cy = tft.height() / 2 - 1;

  tft.fillScreen(HX8357_BLACK);
  start = micros();
  for(i=min(cx,cy); i>10; i-=5) {
    start = micros();
    tft.fillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
      tft.color565(0, i, i));
    t += micros() - start;
    tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
      tft.color565(i, i, 0));
  }

  return t;
}

unsigned long testRoundRects() {
  unsigned long start;
  int           w, i, i2,
                cx = tft.width()  / 2 ,
                cy = tft.height() / 2 ;

  tft.fillScreen(HX8357_BLACK);
  w     = min(tft.width(), tft.height());
  start = micros();
  for(i=0; i<w; i+=8) {
    i2 = i / 2 - 2;
    tft.drawRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(i, 100, 100));
  }

  return micros() - start;
}

unsigned long testFilledRoundRects() {
  unsigned long start;
  int           i, i2,
                cx = tft.width()  / 2 + 10,
                cy = tft.height() / 2 + 10;

  tft.fillScreen(HX8357_BLACK);
  start = micros();
  for(i=min(tft.width(), tft.height()) - 20; i>25; i-=6) {
    i2 = i / 2;
    tft.fillRoundRect(cx-i2, cy-i2, i-20, i-20, i/8, tft.color565(100, i/2, 100));
  }

  return micros() - start;
}

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by mikeysklar »

Have you tried adding a delay before tft.begin()?
The display driver circuit needs a small amount of time to be ready after initial power. If your code tries to write to the display too soon, it may not be ready. It will work on reset since that typically does not cycle power. If you are having this issue, try adding a small amount of delay before trying to write to the display.

In Arduino, use delay() to add a few milliseconds before calling tft.begin(). Adjust the amount of delay as needed to see how little you can get away with for your specific setup.
https://learn.adafruit.com/adafruit-3-5 ... leshooting

Your soldering looks reasonably good. The pics on some boards it did look like possible shorts between pins, but it could be an artifact of the photo and just flux.

We can swap this one out if the delay does not resolve it.

User avatar
jwiede
 
Posts: 14
Joined: Thu Sep 27, 2012 9:15 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by jwiede »

Hehe, yeah, it's just flux, it's why I started doing the continuity cross-checking after soldering. I've gone back and re-confirmed that (aside from gnds), no pins have continuity with their neighbors. Guess I need to either switch to "no-clean" solder, or giving my boards an IPA wipedown when done.

I'll go back and try again adding delay (using FeatherRP2040) and report back shortly.

User avatar
jwiede
 
Posts: 14
Joined: Thu Sep 27, 2012 9:15 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by jwiede »

Delay didn't change anything, except allowed IDE serial monitor a chance to sync with serial port slightly earlier. Captured serial output...

Code: Select all

10:56:42.604 -> 1030324
10:56:43.088 -> Rectangles (outline)     55235
10:56:44.119 -> Circles (outline)        447397
10:56:45.088 -> Triangles (outline)      203062
10:56:45.995 -> Triangles (filled)       963226
10:56:47.925 -> Rounded rects (outline)  119463
10:56:48.766 -> Rounded rects (filled)   1918183
10:56:51.414 -> Done!
At no time while any of this is occurring is the screen displaying anything but a big white rectangle (e.g. backlight on, nothing displayed). Any other suggestions? If not, what all do I need to do in order to process return?

User avatar
DJDevon3
 
Posts: 210
Joined: Wed Mar 06, 2019 11:02 am

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by DJDevon3 »

For Arduino you can double-check the physical pin mapping your board is using by viewing:

C:\Users\Username\AppData\Local\Arduino#\packages\adafruit\hardware\YOURBOARDMODEL\version\variants\YOURBOARDVARIATION\variant.cpp

If you've attempted to use the TFT featherwing with multiple feathers, in different languages, using default sketches and it's still not working... the common denominator is the TFT featherwing. During the code initialization of the TFT the screen will turn black, seems like you're not even able to initialize the TFT. This suggests some type of physical manufacturing defect if pin soldering isn't the culprit. I have the same featherwing and have used it with Arduino and Circuit Python on a Feather Sense and Feather M0 without issue on default demo sketches.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by mikeysklar »

@jweide,

Please contact [email protected] and include this forum link along with your order# when requesting a replacement featherwing.

User avatar
jwiede
 
Posts: 14
Joined: Thu Sep 27, 2012 9:15 pm

Re: UM FeatherS3 vs 3.5 TFT_Featherwing..white screen only!

Post by jwiede »

@DJDevon3 As I noted in one of the posts, I can even see the RP2040 processing bitmap operations through the Gfx library, but nothing ever shows on the display. I'll take a look at the references in question, but once I switched to the RP2040, I'm nigh-certain I've got the proper pin assignments. Thanks for the info, though!

@mikeysklar Email sent incl. details and forum link. I purchased the hw a while back, so I'm fine with a replacement (if any around there working), or store credit if it's been too long for refund to be amenable. No worries, I mostly just need to get it working somehow. In mean time, guess I'll either use the 3,5 TFT HX8357 & breakout or a keyboard featherwing as the display for time being. Thanks for all your help with this!

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”