Page 1 of 1

Cannot make HSPI work faster than 8MHz clock

Posted: Fri Apr 30, 2021 6:42 pm
by rGlory
Hi,

I am trying to make ESP32-CAM to stream images over ethernet using ENC28J60 with SPI interface. So far I can only make it to work reliable with 8MHz clock on SPI bus. I am using arduino SPIClass interface with transactions and manual control over CS pin. If I try to use 20MHz or 10MHz clock I have data corrupted when sending data. Does HSPI have some limitations (on this board or in general) or I am missing something?

Thanks

PS This moderation thing is really annoying, you a question to ask but you have to wait days until your message approved. Looks like you do not need too many participans...

Re: Cannot make HSPI work faster than 8MHz clock

Posted: Sun May 02, 2021 5:05 pm
by rGlory
I found this topic https://www.esp32.com/viewtopic.php?t=4 ... 0impedance. which says:
My result:
in case use HSPI & VSPI mapped like this:
HSPI_CLK = 14 or 25 GPIO
HSPI_MOSI = 13 or 26 GPIO
HSPI_MISO = 12 or 32 GPIO
HSPI_CS = 15 or 33 GPIO

VSPI_CLK = 18 or 21 GPIO
VSPI_MOSI = 23 or 22 GPIO
VSPI_MISO = 19 or 19 GPIO
VSPI_CS = 05 or 23 GPIO

the maximum speed of CLK is 9 MHz.
So is it hardware limitation on HSPI interface?

Re: Cannot make HSPI work faster than 8MHz clock

Posted: Thu May 06, 2021 8:27 am
by ESP_Sprite
rGlory wrote:
Fri Apr 30, 2021 6:42 pm
PS This moderation thing is really annoying, you a question to ask but you have to wait days until your message approved. Looks like you do not need too many participans...

Fwiw, only the first 3 posts need to be approved. Approval usually happens within a day; you just happened to post during a Chinese holiday.