Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST7796S and ESP32-S3-DevKitC-1-N-8R2 seems to cap my sprite maximum size? #3285

Open
zachtos opened this issue Apr 17, 2024 · 4 comments
Open

Comments

@zachtos
Copy link

zachtos commented Apr 17, 2024

Using This screen from other issue . With the ESP32-S3-DevKitC-1-N-8R2 I have the LCD working, but I can not make a sprite that is full screen. No matter what size sprite I make, it will cap out at around 60% of the 320x480 pixel screen via SPI interface. I do not have the touch chip or SD card wired up, just the LCD pins. I can see the PSRAM enabled, and have the sprite.setAttribute(PSRAM_ENABLE, true);

I CAN see the entire screen when running a demo example with non sprite pushes, but the library seems to be force capping the size of my sprites, EVEN with PSRAM enabled. What am I doing wrong?!

PlatformIO w/ Visual Studio 1.88
Espressif 32 v6.6.0
bodmer/TFT_eSPI@^2.5.43
board = esp32-s3-devkitc-1
build_flags =
-D ARDUINO_USB_CDC_ON_BOOT=1
-DBOARD_HAS_PSRAM
////////
Total heap: 394892
Free heap: 370344
Total PSRAM: 2095087
Free PSRAM: 1941483
/////////////
in user setup.h I have #define ST7796_DRIVER
in user select.h i have #include <User_Setups/Setup36_RPi_touch_ST7796.h>
in user_setup_ID36 I have to remove #define RPI_DISPLAY_TYPE or the screen will not boot
#define TFT_MISO 37
#define TFT_MOSI 35
#define TFT_SCLK 36
#define TFT_CS 10 // Chip select control pin
#define TFT_DC 7 // Data Command control pin
#define TFT_RST 6 // Reset pin (could connect to RST pin)
#define TOUCH_CS 2 // Chip select pin (T_CS) of touch screen
tft.setRotation(1); //i've tried 0-3, not the issue
It works but it's some kind of sprite issue. I have worked with smaller screens without PSRAM no problems. I love this library, but I'm currently stumped.

//from read user setup example
TFT_eSPI ver = 2.5.43
Processor = ESP32
Frequency = 240MHz
Transactions = Yes
Interface = SPI
Display driver = 7796
Display width = 320
Display height = 480

MOSI = GPIO 35
MISO = GPIO 37
SCK = GPIO 36
TFT_CS = GPIO 10
TFT_DC = GPIO 7
TFT_RST = GPIO 6
TOUCH_CS = GPIO 2

Font GLCD loaded
Font 2 loaded
Font 4 loaded
Font 6 loaded
Font 7 loaded
Font 8 loaded
Smooth font enabled

Display SPI frequency = 40.00
Touch SPI frequency = 2.50

@zachtos
Copy link
Author

zachtos commented Apr 17, 2024

Solved my own issue. I guess I don't quite understand why, but when I set rotation to 1 for landscape, the Height and Width dimensions are now flipped for sprite creation. It's strange, I have to pretend it's oriented portrait when using pushSprite and create sprite. Is that supposed to be that confusing? Why not flip them when you set rotation for consistency?

@techniks
Copy link

Hmmm.. I thought for sure you would not be able to use gpio 35,36,37 when PSRAM is activated. I see that you are using these lines for MISO, MOSI, SCK and it works. Can you please verify that is the case. That opens additional possibilities for me! Thanks

@zachtos
Copy link
Author

zachtos commented Apr 29, 2024

Hmmm.. I thought for sure you would not be able to use gpio 35,36,37 when PSRAM is activated. I see that you are using these lines for MISO, MOSI, SCK and it works. Can you please verify that is the case. That opens additional possibilities for me! Thanks
There are two models of ESP32S3 with PSRAM. The ones with QUAD type don't use those pins, but the OCTAL ones do, I think those models have 16mB flash and/or larger PSRAM. I went a model down to avoid loss of those pins, so can confirm they still work.

@techniks
Copy link

Ahaaa! Now I see. I've been using the ESP32S3-N16 to gain the extra pins. Looks like a ESP32S3-N16R2 would allow the pins to be used AND get some PSRAM.
Thank you for your reply! Perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants