-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Boot Loop on ESP32S3 Due to Mis-defined SPI Port #3488
base: master
Are you sure you want to change the base?
Conversation
2 i s probably a better default,, but it doesn't really matter 2 vs 3
This seems not to work. |
@bluecraank Can you share more details? What version of the Arduino ESP32 framework are you on? What error are you getting? Are you confidant that the change is in effect in your application? Are the error messages different after applying the change? |
I have esp32 espressif version 3.0.7. The only working fix was in User_Setup.h Versions above 2.0.14 does not work with TFT_eSPI See my issue espressif/arduino-esp32#10564 Here i found the only working solution right now |
That's interesting, my original commit on this PR changed it to port 3, which looks to be the port you're using by setting When I tested it on my board, it didn't seem to matter whether 2 or 3 was used. My work-around was to set |
Update: I've been running Espressif 32 platform v6.8.1 and framework 2.0.17 ( On this version, I just updated to Espressif 32 platform v6.9.0, but this did not change the framework version. I attempted to manually update the framework to version 3.0.7, but it appears this version is incompatible with the v6.9.0 framework. Here's the relevant portion of my platformio.ini:
This post has some info on the sort of errors I received when attempting this combination of versions: https://community.platformio.org/t/pio-stopped-working-and-cannot-complie/36236/2 Unfortunately, without being able to use 3.0.7, there's not much more I can do. Perhaps if you could share more info about your platformio.ini config I can investigate further. |
I spent a bunch of time dealing with this issue today... This change fixed my problem on ESP32 Arduino core version 3 but breaks it on core version 2. Adding conditional preprocessor logic to only change SPI_PORT to 2 only if ESP_ARDUINO_VERSION_MAJOR >= 3 ended up fixing it for me for now and retained compatibility with version 2 and 3 of ESP32 Arduino core, but this feels like a hack. |
People have been having trouble using SPI on ESP32 S3. Here are a couple of related discussions:
#3283
espressif/arduino-esp32#10254
The ESP IDF code indicates that only SPI 2 and 3 should be used. See: https://github.com/espressif/esp-idf/blob/9b3eda09741b5c7dae8f22fe60d193dcc3a7ec44/components/soc/esp32s3/include/soc/soc.h#L37
When
SPI_PORT
is defined toFSPI
, the ESP Arduino framework defines it to0
. https://github.com/espressif/arduino-esp32/blob/7018cd114d00249674567846c9d67fbb3a1240a3/cores/esp32/esp32-hal-spi.h#L32Using
0
withREG_SPI_BASE
in ESP IDF soc.h returns NULL, which causes all subsequent SPI actions to hard-fault.The simplest solution is to not define
SPI_PORT
toFSPI
, but rather to GSPI2 or GPSI3 by default, as these are supported by the ESP IDF.