VSPI, HSPI and SDMMC together.

Salakhov
Posts: 11
Joined: Sat Aug 24, 2019 2:08 pm

VSPI, HSPI and SDMMC together.

Postby Salakhov » Sat Aug 24, 2019 2:49 pm

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!

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

Re: VSPI, HSPI and SDMMC together.

Postby ESP_Sprite » Mon Aug 26, 2019 3:52 am

No, sorry. If you route SPI signals over the GPIO matrix, speeds are limited to 40MHz. (Ref here)

Salakhov
Posts: 11
Joined: Sat Aug 24, 2019 2:08 pm

Re: VSPI, HSPI and SDMMC together.

Postby Salakhov » Mon Aug 26, 2019 8:34 am

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!

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

Re: VSPI, HSPI and SDMMC together.

Postby ESP_Sprite » Mon Aug 26, 2019 10:10 am

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.

Who is online

Users browsing this forum: lbernstone and 34 guests