Shortly after resuming from deep sleep, we sometimes see ESP32-S3 devices (revision 0.2) getting stuck in sha_hal_wait_idle when gathering entropy for mbedtls. We're calling mbedtls_entropy_func from our application code early on and the stack trace looks like this:
Code: Select all
0x420bb40c: sha_hal_wait_idle + 0x8
0x42094cc7: esp_sha_dma + 0x2cf
0x42091f18: mbedtls_sha512_update$part$0 + 0xa4
0x42091f7d: mbedtls_sha512_update + 0x11
0x4209063e: mbedtls_sha512 + 0x22
0x4208cca8: mbedtls_md + 0x8c
0x4208c25b: entropy_update + 0x23
0x4208c38d: entropy_gather_internal + 0x7d
0x4208c448: mbedtls_entropy_func + 0x38
...
We can try to investigate more and perhaps create a standalone repro. We are not yet sure if this is reproducible on the ESP32 or other revisions of the ESP32-S3.