It looks like a nice part only missing needed documentation. They provide some on the web but as we all know screen shots are generally useless as this will show. Contact the vendor for a good set of documents and if you them post for others.
Sorry I have no experience with this part.
What I do when working with a new processor is try to simply cycle each of the pins, and if successful continue on with the other hardware.
Your code looks OK but I do not have a clue if it is valid for this processor. Good Luck.
can you see if the backlight is on?
you define BL as GPIO32
from this it look like it is GPIO3
to say the least the documentation has lots of nice photos but lacks technical details
however, checking the test of a 1.3" ST7789 240*240 TFT on an ESP32 running
File>Examples>Adafruit_ST7735_and_ST7789_Library>graphicstest
I have a note ESP32 - cannot get it to work - tried various SPI frequencies
/*!
@brief Initialization code common to all ST7789 displays
@param width Display width
@param height Display height
@param mode SPI data mode; one of SPI_MODE0, SPI_MODE1, SPI_MODE2
or SPI_MODE3 (do NOT pass the numbers 0,1,2 or 3 -- use
the defines only, the values are NOT the same!)
*/
/**************************************************************************/
tft.init(170, 320, SPI_MODE3);
/*
void Adafruit_ST7789::init(uint16_t width, uint16_t height, uint8_t mode) {
// Save SPI data mode. commonInit() calls begin() (in Adafruit_ST77xx.cpp),
// which in turn calls initSPI() (in Adafruit_SPITFT.cpp), passing it the
// value of spiMode. It's done this way because begin() really should not
// be modified at this point to accept an SPI mode -- it's a virtual
// function required in every Adafruit_SPITFT subclass and would require
// updating EVERY such library...whereas, at the moment, we know that
// certain ST7789 displays are the only thing that may need a non-default
// SPI mode, hence this roundabout approach...
spiMode = mode;
// (Might get added similarly to other display types as needed on a
// case-by-case basis.)
commonInit(NULL);
if (width == 240 && height == 240) {
// 1.3", 1.54" displays (right justified)
_rowstart = (320 - height);
_rowstart2 = 0;
_colstart = _colstart2 = (240 - width);
} else if (width == 135 && height == 240) {
// 1.14" display (centered, with odd size)
_rowstart = _rowstart2 = (int)((320 - height) / 2);
// This is the only device currently supported device that has different
// values for _colstart & _colstart2. You must ensure that the extra
// pixel lands in _colstart and not in _colstart2
_colstart = (int)((240 - width + 1) / 2);
_colstart2 = (int)((240 - width) / 2);
} else {
// 1.47", 1.69, 1.9", 2.0" displays (centered)
_rowstart = _rowstart2 = (int)((320 - height) / 2);
_colstart = _colstart2 = (int)((240 - width) / 2);
}
windowWidth = width;
windowHeight = height;
displayInit(generic_st7789);
setRotation(0);
}
*/
I have the same or similar mcu this works for me all I had to add was
pinMode(BL, INPUT_PULLUP); digitalWrite(BL, HIGH); in setup that turns the back light on it was off before
#include <Adafruit_GFX.h> #include <Adafruit_ST7789.h> #include <SPI.h>
////////// #define TFT_MOSI 23 // Data out #define TFT_SCLK 18 // Clock out
// Clear the screen //tft.fillScreen(ST77XX_BLACK);//++++++++++++++++++++++++++++++++
tft.fillScreen(ST77XX_BLUE);
tft.setTextWrap(false); // Disable text wrapping
tft.setTextSize(4); // Set text size
// tft.setTextColor(ST77XX_WHITE); // Set text color +++++++++++++++++++
tft.setTextColor(ST77XX_YELLOW); // Set text color