Closed Gelemikke closed 2 months ago
Hi @Gelemikke, I am unable to reproduce the issue using Arduino IDE. Looks you are using Arduino as a component in IDF. What IDF version are you using?
@P-R-O-C-H-Y Yes, thats true! I'm running ESP-IDF version 5.1.4.240801
Thanks for quick response, Will try to reproduce there.
I can confirm the crash using Arduino as component. I will take look on what's wrong there. Thank you for reporting.
This issue was solved by https://github.com/espressif/arduino-esp32/pull/10122. The fix will be available in the 3.0.5 release. I am closing this as solved.
Board
LilyGo T-SIM7000, LilyGo T-SIM7600
Device Description
-
Hardware Configuration
-
Version
v3.0.4
IDE Name
PlatformIO
Operating System
Windows 11
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
Calling
SD.begin()
when no SD card is inserted andCONFIG_DISABLE_HAL_LOCKS is not set
in sdkconfig causes a LoadProhibited error and crashes the code. The expectation is thatSD.begin()
would instead returnfalse
when no SD card is inserted.Following the backtrace, the error is caused when
xSemaphoreGive(spi->lock);
is called invoid spiEndTransaction(spi_t *spi)
. I assume this fails becausespi->lock
does not point to a valid mutex. However, I can't figure out why that would be the case sincedo {} while (xSemaphoreTake(spi->lock, portMAX_DELAY) != pdPASS)
appears to be called a little bit earlier insdcard_uninit
and there it does not throw an error.I unfortunately don't have a working debugger at the moment, so I can't properly step through the code in any more detail. Setting
CONFIG_DISABLE_HAL_LOCKS=y
in sdkconfig appears to be a working remedy but has its side effects as it disables all HAL mutexes.Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide