Page 1 of 1

SPI interfaces

Posted: Tue Nov 05, 2019 4:45 am
by zliudr
I read from the data sheet that there are 4 SPI interfaces. I assume that one is used by FLASH (internal or external?). That leaves 3? What about the pSRAM and external FLASH (on WROOM or WROVER modules)? How many are left? I'm reading an SPI sample program that displays an image to an LCD. It calls spi_bus_initialize().

I found the reference: ... _config_ti

There seems to be no mention of WHICH SPI interface is being used in the call, only the pins the interface uses. My goal is to read files in from say an SPI interfaced sd card and flash the content to an atmega328 via SPI interface.

If I run spi_bus_initialize() AFTER I initialized and mounted sd card (SPI interface), will the spi_bus_initialize() mess up the sd card access? I'm used to each SPI bus with a different name such as SPI0, SPI1 etc.

Thank you!

Re: SPI interfaces

Posted: Tue Nov 05, 2019 6:13 am
by zliudr
According to this, only spi2 and spi3 are available. I imagine spi0 and spi1 are used for ram and flash. ... ster.html#

Now after digging into sdspi_host.h, I found the default setting is to use HSPI (SPI2) on SD card. It seems that it won't be able to support threaded calls to HSPI while the sd card so mounted so I'm only able to use VSPI (SPI3) for actual SPI devices other than sd card. Hope it is going to work out.