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

User avatar
Manuauto
Posts: 2
Joined: Mon May 28, 2018 8:49 pm

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

Postby Manuauto » Mon May 28, 2018 9:06 pm

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! :)
Attachments
ESP32_SPI - Copy.ino.txt
(1.49 KiB) Downloaded 623 times
pinout_wroom_pinout.png
pinout_wroom_pinout.png (540.88 KiB) Viewed 5466 times

User avatar
Manuauto
Posts: 2
Joined: Mon May 28, 2018 8:49 pm

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

Postby Manuauto » Wed May 30, 2018 8:50 am

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

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

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

Postby martinayotte » Thu May 31, 2018 2:12 pm

Right !
it's difficult because all of the code which accesses the other SPI device has to run from IRAM with the flash disabled

Who is online

Users browsing this forum: No registered users and 108 guests