PlatformIO RP2040 and ST7789 without CS PIN Dark/Black Screen #3561
-
Hi newcomer here, I need help with making this library to work on my RP2040(YD-RP2040) and ST7789(Without CS PIN) using PlatformIO. I can confirm the PIN is correct and the TFT is not faulty because I already tried to do a flashing background test manually without any library. I tried to set TFT_BACKLIGHT_ON to LOW and it's work because my TFT screen goes complete black, I can see a greyish flash when I press the reset button too, but after that all I see just complete black screen. I already tried to search the platformIO.ini example and this is what I came up with but still no luck:
Here is the simple code I used to test with TFT_eSPI:
I don't know if the setup is correct since I'm pretty new to PIO and somehow my earlephilhower will failed without having PICO_CYW43_SUPPORTED & CYW43_PIN_WL_DYNAMIC set to 0. Any help will be really appreciated! :) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 25 replies
-
Can you give a try with this pin setup:
with reference to RPi official doc: and Adafruit doc: |
Beta Was this translation helpful? Give feedback.
-
Okay, I don't find any macro that could be used to fix this but. The fix simply just to modify the TFT_eSPI_RP2040.h just find the macro SET_BUS_READ_MODE and change it into this: because if not at the end of each spi transaction (writecommand) it will pull the clock line to SPI MODE 0 (CPOL=0, CPHA=0). @Basitadam Thank you so much for taking your time to help me, if it wasn't for your help I will still pulling my hairs trying to figure out why the lib doesn't work |
Beta Was this translation helpful? Give feedback.
-
Maybe this will also help from a few days ago: #3476 2.5.34 2.5.43 The spi_set_format function has been reinstated. So I updated to 2.5.42 again and commented out that function and now it's working. Not sure why this is an issue really, it looks like it should be ok using that function. I don't know enough to investigate further. Hoping others can figure it out from here. :) Cheers, Ian |
Beta Was this translation helpful? Give feedback.
Okay, I don't find any macro that could be used to fix this but. The fix simply just to modify the TFT_eSPI_RP2040.h just find the macro SET_BUS_READ_MODE and change it into this:
#define SET_BUS_READ_MODE spi_set_format(SPI_X, 8, (spi_cpol_t)(TFT_SPI_MODE >> 1), (spi_cpha_t)(TFT_SPI_MODE & 0x1), SPI_MSB_FIRST)
because if not at the end of each spi transaction (writecommand) it will pull the clock line to SPI MODE 0 (CPOL=0, CPHA=0).
@Basitadam Thank you so much for taking your time to help me, if it wasn't for your help I will still pulling my hairs trying to figure out why the lib doesn't work