ESP32-S3 stuck in sha_hal_wait_idle

kasperl
Posts: 18
Joined: Wed Nov 24, 2021 10:08 am

ESP32-S3 stuck in sha_hal_wait_idle

Postby kasperl » Fri Mar 01, 2024 8:43 am

(reposted from https://esp32.com/viewtopic.php?f=2&t=38343)

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
...
Has anyone seen something like this? We've added a task watchdog to capture this information, but we wouldn't expect these calls to ever block.

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.

ESP_harshal
Posts: 24
Joined: Wed Jul 06, 2022 8:36 am

Re: ESP32-S3 stuck in sha_hal_wait_idle

Postby ESP_harshal » Mon Mar 04, 2024 5:40 am

Hello @kasperl,

1. Could you share the sdkconfig file of your use case?
2. Also, it would be great if you could create and share a minimal example that would help me to reproduce this issue.

Thanks!

kasperl
Posts: 18
Joined: Wed Nov 24, 2021 10:08 am

Re: ESP32-S3 stuck in sha_hal_wait_idle

Postby kasperl » Mon Mar 04, 2024 7:03 am

This is the sdkconfig we use: https://github.com/toitlang/toit/blob/m ... /sdkconfig.

I'll try to build a smaller repro.

ESP_harshal
Posts: 24
Joined: Wed Jul 06, 2022 8:36 am

Re: ESP32-S3 stuck in sha_hal_wait_idle

Postby ESP_harshal » Mon Mar 04, 2024 7:32 am

Skimmed through the sdkconfig and it looks just normal.
I'll try to build a smaller repro.
Thanks that would be really helpful!

Who is online

Users browsing this forum: Corand and 69 guests