ESP32-C5 Sleep Bug Fixed
ESP32-C5 microcontroller just got a critical bug fix for PSRAM and sleep mode conflicts that were causing instability in DIY smart home projects. The coexistence issues affected sensor nodes and automation bridges using both features. Update your firmware now for better reliability and battery life in low-power builds.
The recent bug fix for the ESP32-C5 addresses a critical flaw in how the chip manages its external RAM during sleep cycles and certain reset conditions. This issue primarily affected devices leveraging Pseudo-Static RAM (PSRAM) to expand their memory capacity for more complex smart home applications. The instability wasn't just a minor inconvenience; it could lead to device hangs and potential data corruption. At the heart of the problem was a "PSRAM Reset Hang." When running ESP-IDF v5.5.1 with PSRAM enabled, operations like a CPU or digital reset could cause the chip to freeze. This would then trigger a secondary watchdog timer to reset the device, a sequence that could inadvertently initiate an over-the-air (OTA) firmware rollback if that feature was enabled. Another significant issue resolved was related to data integrity when using hardware acceleration for encryption. Specifically, when the AES or SHA hardware attempted to access data stored in PSRAM, it could lead to data corruption if the information wasn't aligned in a specific way. This posed a risk to the security and reliability of data handling in affected applications. These bugs were particularly problematic for low-power applications that frequently enter and exit sleep states to conserve battery. The ESP32-C5 is designed for such scenarios, with deep sleep modes that can drop power consumption to mere microamps. However, the conflict with PSRAM undermined this key feature, impacting the stability of battery-operated sensor nodes and other intermittently connected devices. The issues were identified by Espressif Systems, the creators of the ESP32 line, and a bug advisory was published to address the PSRAM and sleep coexistence problems. The fix is distributed through an update to the ESP-IDF (Espressif IoT Development Framework), the official software development framework for the ESP32 series. Developers using the ESP32-C5 with PSRAM are strongly encouraged to update their firmware to ensure stability and prevent unexpected behavior in their projects.