ESP32-POE Micro SD and UEXT SPI at the same time

Started by KellyU, November 08, 2019, 08:31:51 PM

Previous topic - Next topic

KellyU

The Micro SD card and the Uext SPI share the same SPI lines.  How do you use both in a sketch without interference?  I can read and write to the SD card as long as I don't activate the SPI lines on the Uext port.  I need both for a LoRa project.

LubOlimex

Any free GPIO can be defined for SPI usage. There is a slight downside of not using the default SPI pins in the speed. Refer to "Timing considerations" part in this article: https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/spi_master.html

So maybe use one of the other UEXT pins (If you don't need UART or I2C for example use those).

Of course - SD card and SPI at UEXT have different chip selects, so you can also time share the SPI ports. For example, write to the card at certain times and then turn it off so the SPI at the UEXT works and so on.
Technical support and documentation manager at Olimex