nopnop2002 / esp-idf-st7789

ST7789 Driver for esp-idf
MIT License
234 stars 56 forks source link

SPI data is sampled on rising edge of clock, wrong mode? #38

Closed DaveDavenport closed 7 months ago

DaveDavenport commented 9 months ago

Connecting a waveshare screen to an esp32-s3 it did not work, after looking in datasheet of the screen: (https://www.waveshare.com/w/upload/a/ae/ST7789_Datasheet.pdf)

image

and the timings: image

it looks like that the data is sampled on the rising edge of the clock. This should indicate it is spi mode 0 or 3. In diagram clock idles low so 0?. Changing this also fixes the black screen and I get a working demo. image

I am not sure if waveshare uses a slightly different version of the chip?

Thanks for the library.

(I got a déjà vu feeling, but could not find earlier issue. might have been somewhere else.).

nopnop2002 commented 7 months ago

Changed SPI mode from 2 to 3.