ST7789 TFT LCD working on ESP32 WROOM Dev Kit but not working on ESP32-C3-WROOM-02 Dev Kit in Arduino #1712
Replies: 21 comments
-
The new ESP32-C3 is not currently supported. Today I received an ESP32-S2 board so will be working on adapting the library for that processor, maybe the C3 will then work too. As you note the issue seems to be SPI port references. |
Beta Was this translation helpful? Give feedback.
-
Thanks very much! I'll be happy to do testing when ready. |
Beta Was this translation helpful? Give feedback.
-
The library has been updated for the ESP32 S2 processor variant, the changes may also work with the C3 but this is untested and I do not have a C3 board. |
Beta Was this translation helpful? Give feedback.
-
There is a post from Twitter maybe useful: https://twitter.com/martinfasani/status/1386019656016728068?s=20 |
Beta Was this translation helpful? Give feedback.
-
Thanks for doing the work on the S2. I have finally been able to get some time to look at this. I noted that ESP32 Arduino board package 2.0.0 is required per the notes, so I reinstalled with GIT etc. per the instructions here: https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html I have Arduino 1.8.16, The first test, with no dev module plugged in, was to set the target board to ESP32S2 Dev Module and just do a compile, and that worked just fine. Then I switched to ESP32C3 Dev Module and tried to recompile but I get a similar list of errors as before. This is without any dev module plugged in at all, just compiling for the C3 dev module as the target. You mentioned that you didnt have a C3 dev module but errors I am getting exist without even a dev module plugged in, just by changing to the C3 module as target. I have attached the error list if that helps any. If I selected S2 Dev Module and compiled and tried to upload to the C3 module anyway it wont because it knows I have a C3 Module. I am not sure what else I can do to from here. Thoughts? |
Beta Was this translation helpful? Give feedback.
-
arduino esp32c3 spi is not implemented yet.esp32s2 spi_reg.h#include "soc.h" #define SPI_CMD_REG(i) (REG_SPI_BASE(i) + 0x000) =================================================================== esp32c3 spi_reg.h#include "soc.h" #define SPI_CMD_REG(i) (REG_SPI_BASE(i) + 0x0) |
Beta Was this translation helpful? Give feedback.
-
The compile problem is caused by bugs and inconsistencies in the IDF for the ESP32C3. I have added some patches to the latest Github master. The examples compile OK now but I have not tested the library on the ESP32C3 as I do not have one! |
Beta Was this translation helpful? Give feedback.
-
Hello, I use your latest library to run on ESP32C3 and drive the ST7789 display screen, but it does not work properly. I use oscilloscope to measure the pin and find no SPI signal output. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your information. I think we can say the C3 is currently unsupported. I may get a C3 at some point to figure out what is happening. |
Beta Was this translation helpful? Give feedback.
-
I recently got the c3 working with https://github.com/PaulStoffregen/XPT2046_Touchscreen. I published an article about it https://www.gabrielcsapo.com/arduino-esp32-c3-32s-ili9341-with-touchscreen/. My next step is getting this library to work with it. @Bodmer if you need a test chip DM me and I can send you one. |
Beta Was this translation helpful? Give feedback.
-
I can get the touchscreen to respond, but no dice on any TFT output.
|
Beta Was this translation helpful? Give feedback.
-
The problem with the C3 variant is likely to do with the SPI configuration. I do not have an ESP32 C3 so am unable to test any changes. At the moment the C3 is no supported. If you can figure out what the problem is then do let me know. |
Beta Was this translation helpful? Give feedback.
-
FSPI=0 Looking at debugging this further tonight. |
Beta Was this translation helpful? Give feedback.
-
If anyone has a c3 and wants to help figure this out #1586 I have a draft PR opened to collaborate. |
Beta Was this translation helpful? Give feedback.
-
The library uses register level access to the SPI registers. Looking at the ESP32 board package I see the C3 requires extra code before triggering the transmit. At the moment the library does not have this, so that is likely to be the problem: |
Beta Was this translation helpful? Give feedback.
-
Thanks @Bodmer , I will look into this. |
Beta Was this translation helpful? Give feedback.
-
@Bodmer I have added this 9266855 which seems to do exactly what the lines you sent do. Still no dice. |
Beta Was this translation helpful? Give feedback.
-
I patched the branch here so that it might now work with the ESP32 C3. Note I do not have an ESP32 C3 to test it with but it compiled OK under v 2.0.3 RC1 of the ESP32 Arduino board package! |
Beta Was this translation helpful? Give feedback.
-
@cgandrewdev @BeijingUncle @gabrielcsapo @GYSS1204 @freemanzwin et al ESP32 C3 is now supported in v2.4.61 and tested with a SPI ILI9341 display |
Beta Was this translation helpful? Give feedback.
-
Excuse me and greetings, I'm new to esp 32 and I would like to connect a st7789 screen to esp32 but I haven't been able to do it with the TFT_eSPI library, could you help me? |
Beta Was this translation helpful? Give feedback.
-
I have been successful in getting the ESP32-C3-12F module from AI-Thinker working with the BuyDisplay 240x240 IPS TFT module. I configured the ESP32 to use the secondary SPI interface hardware - designated as the FastSPI interface in the C3 Technical Reference Manual. Modded the associated config files in the TFT_eSPI library. Most of the demos work ... but sprites don't. Might be an issue with readback from the display. Haven't dug into that yet. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I have been successfully using the TFT_eSPI library on an ESP32 WROOM dev kit in conjunction with an ST7789 based SPI TFT LCD 240x240 module in the Arduino UI. The library works really well, thank you.
I have switched to a newer dev kit, the ESP32-C3-WROOM-02 dev kit which uses the newer C3 module. But I have not been able to compile the example project, for example the Read_User_Setup project. It compiles and runs fine when I set the Board to ESP32 Dev Module but as soon as I change the board to ESP32C3 Dev Module and change the port and recompile, I get pages full of errors:
... and so on, I would have attached the full output as a file but I might not be able to add files.
I am not sure where to start, the errors seem to be SPI related. I have been looking at the specifications for the C3 module and found that it has three SPI ports SPI0, SPI1, and SPI2, only SPI2 is configurable as general purpose SPI. I dont really know what I should be doing to solve this.
If anyone has any advice it would be much appreciated! Thanks
Beta Was this translation helpful? Give feedback.
All reactions