Page 1 of 1
Hardware SPI Problem
Posted: Sun Jul 17, 2022 12:50 pm
by TRMrNo
Hello,
I am trying to use st7789 LCD Display. I am using 14, 13 and 12 pins as hardware SPI interface but it is not working. When I use the same pins as SoftSPI it works properly. What Could be the problem ?
working
Code: Select all
spi = SPI(-1,baudrate=30000000, polarity=1, phase=0, sck=Pin(14), mosi=Pin(13), miso=Pin(12))
not working
Code: Select all
spi = SPI(1,baudrate=30000000, polarity=1, phase=0, sck=Pin(14), mosi=Pin(13), miso=Pin(12))
Re: Hardware SPI Problem
Posted: Mon Jul 18, 2022 3:23 am
by jimmo
Which board/port are you using?
Have you tried using a lower baudrate with the hardware SPI? (My guess is that the softspi isn't really running at 3Mb)
Re: Hardware SPI Problem
Posted: Mon Jul 18, 2022 6:15 pm
by TRMrNo
hello @jimmo I forgot to write the board. I am using ESP32-CAM module. SoftSPI is not resolving my problem. I need to run the Hardware SPI mode. I tried lower baudrates in Hardware mode but it did not worked.
Re: Hardware SPI Problem
Posted: Tue Jul 19, 2022 1:57 am
by jimmo
TRMrNo wrote: ↑Mon Jul 18, 2022 6:15 pm
hello @jimmo I forgot to write the board. I am using ESP32-CAM module. SoftSPI is not resolving my problem. I need to run the Hardware SPI mode. I tried lower baudrates in Hardware mode but it did not worked.
Sorry I don't follow -- are you saying that neither modes work? Or are there two different things going on here, one with the display, one with the camera?
Re: Hardware SPI Problem
Posted: Wed Jul 20, 2022 11:43 am
by TRMrNo
Hello @jimmo
Actually my problem is Hardware SPI. It is not working in fast or slow mode that I even tried in 100KHz. Besides, SoftSPI works as expected.
I can stream camera data to LCD display but due to harware SPI problem it is too slow.
Re: Hardware SPI Problem
Posted: Wed Jul 20, 2022 11:04 pm
by russ_h
I have not spent much time with the ESP32-CAM board, but the schematics show the SDCARD using pins 12, 13, and 14 (and others) for the SDMMC interface. Could that be causing issues with the hardware SPI?
Re: Hardware SPI Problem
Posted: Thu Jul 21, 2022 9:14 pm
by TRMrNo
I think that sharing the same pins with the SD card should not be problem. There should be another problem.