Thank you for linking specific example code!
I gave this a test today, and was able to replicate the crashing behavior. I then discovered there’s a new version of Simple FOC and the ESP32 core, both have come out in the last week. Updating those fixed the problem for me. For reference, these are the versions that work for me with that example code:
Simple FOC
v2.3.5esp32
v3.3.0
Skimming through the release notes, looks like Simple FOC recently added support for the esp32 core v3.3 (ESP-IDF v5.x) via this pull request, and more recently fixed an ESP32 bug in this pull request. So, sounds like Simple FOC just hadn’t caught up to the latest ESP32 core, but seems like it should be all good now. If you have any issues with this again, I would strongly recommend opening an issue in the Simple FOC repository, because they will be able to provide better guidance faster than we can.
Hope this helps!