Open Vollbrecht opened 3 months ago
Does this mean that SPI will not work at all when assigned to different pins on the esp32, or is this a rare bug?
What pins actually can be used?
Those given in the esp-idf-hal/examples/loopback
?
(PS, the example file comments are lying).
rust-esp32-demo uses these pins:
The ESP-IDF docs suggests the use of these pins for SPI2
And finally, esp-idf C examples suggest these pins:
I had intended to connect to a KSZ8851SNL and an SD Card via SPI, and I don't want to get my pin assignments wrong when I submit to the PCB manufacturer
The recommendation is to use this special gpio's because of potential minimal latency gains, since this gpio's dont need to go through the gpio matrix. Though they claim that any gpio can be used for the SPI2 device. quote: "However, the signals can also be routed to any other available pins using the less direct GPIO matrix." And that should be certainly true. I tried to debug it a bit but for some unknown reason my esp hard crashes and it's hard to debug the issue currently. I only know that it happens somewhere in the initiation phase inside the gpio matrix code path.
I guess my question is, which special GPIOs actually do work? And which devices are affected?
By esp32 -> classical esp32
Key observation is that it does work with gpio 15-18 for sclk,mosi,miso,cs and some minimal random other pin combinations, changing one or two of them, but most combinations of pinnumbers will freeze the esp and trigger a reset after varying seconds.
Use default cargo generate template.
Minimal repo: