Page 1 of 1

Can I use / share the SPI pins used by the onboard SPI flash?

Posted: Mon May 28, 2018 9:06 pm
by Manuauto
Since I do not have may spare pins or might not even have enough, I'm looking into ways to possibly save some pins, using the Arduino Environment.
As far as I know, the onboard SPI flash IC operates via "normal" SPI, thus it should be possible to connect other devices onto the bus (MISO, MOSI and SCK shared).

I've tried to figure out which pins correspond to these aforementioned ones.
I came up with this:

Code: Select all

//SPI.begin(SCK, MISO, MOSI, SS);
SPI.begin(6, 7, 8, 11);   //Custom, Pin would need to be changed, tried it, it's not the reason for the crash
//SPI.begin(18, 19, 23, 5); //"Normal"
Unfortunately this crashes the ESP32! :?

The attached image shows which range of pins I'd like to use. It should be possible to "map" SPI to any set of pins, is it true for those marked? Can at least some of these pins be used as non-SPI IO?

I'd greatly appreciate any help! :)

Re: Can I use / share the SPI pins used by the onboard SPI flash?

Posted: Wed May 30, 2018 8:50 am
by Manuauto
Alright, from what I could gather from the Internet and this forum, it appears as if this is no viable option.
viewtopic.php?t=4157

Re: Can I use / share the SPI pins used by the onboard SPI flash?

Posted: Thu May 31, 2018 2:12 pm
by martinayotte
Right !
it's difficult because all of the code which accesses the other SPI device has to run from IRAM with the flash disabled