Page 1 of 1

VSPI, HSPI and SDMMC together.

Posted: Sat Aug 24, 2019 2:49 pm
by Salakhov
I make some POV project.
Both VSPI and HSPI are used for 2 led strips control. SPI speed is maximal of possible one. It is 80MHz.

Folowing default pins used:
vspi
SCLK = 18, MISO = 19, MOSI = 23, SS = 5
hspi
SCLK = 14, MISO = 12, MOSI = 13, SS = 15

SD card is connected to pins: 27, 21, 4, 22.
There is no problem to read and to show pictures.

But I want to read some video and to show it on POV.

I want use SDMMC library and connections:
D2 12
D3 13
CMD 15
CLK 14
D0 2
D1 4.

Because of it I have to change hspi pins to alternative recommended:
SCLK=25, MISO=26, MOSI=27, SS=32.
vspi will be the past:
SCLK = 18, MISO = 19, MOSI = 23, SS = 5.


The question:

Is it possible to use hspi, vspi and SD_MMC together?
Will speed is left the same?

Thanks!

Re: VSPI, HSPI and SDMMC together.

Posted: Mon Aug 26, 2019 3:52 am
by ESP_Sprite
No, sorry. If you route SPI signals over the GPIO matrix, speeds are limited to 40MHz. (Ref here)

Re: VSPI, HSPI and SDMMC together.

Posted: Mon Aug 26, 2019 8:34 am
by Salakhov
Thank you very much for the reply.

What about speed of SDMMC and vspi if I shall not use hspi?
SDMMC
D2 12
D3 13
CMD 15
CLK 14
D0 2
D1 4.

vspi
SCLK = 18, MISO = 19, MOSI = 23, SS = 5.

P.S. Where to find description of SDMMC library? I have found only examples.

Thanks!

Re: VSPI, HSPI and SDMMC together.

Posted: Mon Aug 26, 2019 10:10 am
by ESP_Sprite
In general, if you use the dedicated pins of the SPI peripheral, you'll be able to get 80MHz. If you do not, you're limited to 40MHz (plus some extra requirements, see the link I posted earlier.) SDMMC documentation would be here.