Skip to content

PlatformIO RP2040 and ST7789 without CS PIN Dark/Black Screen #3561

Answered by Hraefns
Hraefns asked this question in Q&A - General
Discussion options

You must be logged in to vote

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

Replies: 3 comments 25 replies

Comment options

You must be logged in to vote
22 replies
@Hraefns
Comment options

@Basitadam
Comment options

@Hraefns
Comment options

@Hraefns
Comment options

@Basitadam
Comment options

Comment options

You must be logged in to vote
2 replies
@Basitadam
Comment options

@Hraefns
Comment options

Answer selected by Hraefns
Comment options

You must be logged in to vote
1 reply
@Hraefns
Comment options

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