nopnop2002 / esp-idf-st7789

ST7789 Driver for esp-idf
MIT License
260 stars 64 forks source link

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

Closed DaveDavenport closed 1 year ago

DaveDavenport commented 1 year 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 1 year ago

Changed SPI mode from 2 to 3.