ESP32-PICO-D4 Quad-SPI as Slave - Possible?

MikeNaylor
Posts: 3
Joined: Mon Nov 11, 2024 10:30 pm

ESP32-PICO-D4 Quad-SPI as Slave - Possible?

Postby MikeNaylor » Thu Jun 05, 2025 12:12 pm

Afternoon all,

I'm trying to connect 2 PICO-D4 packages via an SPI bus, with one as the master and one as the slave.
The connections run from the HSPI IOMUX pins on the master to the VSPI IOMUX pins on the slave. All pins (including WP/HD) are connected as required.
In half-duplex single-line transfer at 20Mhz clock, everything works perfectly, but I'd like a little more bandwidth, so I'm trying to move to DIO or QIO.
I can currently transfer ~40kbytes (324,000 bits) in approx 16ms, as measured empirically on the master, which makes sense (324,000 / 20,000,000 = 0.0162 seconds)

If I add the SPICOMMON_BUSFLAG_DUAL or SPICOMMON_BUSFLAG_QUAD flags to the bus setup on the master, and SPI_TRANS_MODE_DIO or SPI_TRANS_MODE_QIO to the transaction flags, the transmission time drops as I would expect. However, the slave is clearly not receiving the data correctly.

I've added the same bus flags to the SPI Slave bus configuration, but it doesn't seem to matter.

I haven't found any code samples or references to anyone making this work properly.

Reading though the docs, it seems that the ESP32 core may not support quad-spi as a slave, although other chip variants (including the ESP32-S3) do... Does the ESP32 core just not support what I'm trying to achieve here?

I've checked the TRM and it doesn't seem to explicitly say it's supported or not.

For what it's worth, if this is just a driver issues, I'm comfortable messing with control registers directly, etc.

Thanks

Who is online

Users browsing this forum: Qwantbot and 3 guests