Cannot make HSPI work faster than 8MHz clock

rGlory
Posts: 5
Joined: Fri Apr 30, 2021 6:23 pm

Cannot make HSPI work faster than 8MHz clock

Postby rGlory » Fri Apr 30, 2021 6:42 pm

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...
Last edited by rGlory on Sun May 02, 2021 6:48 pm, edited 1 time in total.

rGlory
Posts: 5
Joined: Fri Apr 30, 2021 6:23 pm

Re: Cannot make HSPI work faster than 8MHz clock

Postby rGlory » Sun May 02, 2021 5:05 pm

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?

ESP_Sprite
Posts: 8922
Joined: Thu Nov 26, 2015 4:08 am

Re: Cannot make HSPI work faster than 8MHz clock

Postby ESP_Sprite » Thu May 06, 2021 8:27 am

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.

Who is online

Users browsing this forum: No registered users and 56 guests