From 6bf5158987536a0cff531b2288f07567cfc22d4a Mon Sep 17 00:00:00 2001 From: "yanzihan@espressif.com" Date: Fri, 20 Mar 2026 17:24:43 +0800 Subject: [PATCH] feat(pvt): fix hplpgap assert error in pvt func on release v5.4 --- components/esp_hw_support/port/esp32c6/pmu_pvt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/esp_hw_support/port/esp32c6/pmu_pvt.c b/components/esp_hw_support/port/esp32c6/pmu_pvt.c index 114db6d6021..80eb2d3a0f7 100644 --- a/components/esp_hw_support/port/esp32c6/pmu_pvt.c +++ b/components/esp_hw_support/port/esp32c6/pmu_pvt.c @@ -44,9 +44,13 @@ static uint8_t get_lp_hp_gap(void) pvt_offset = offset_value; } pvt_offset = pvt_offset - 2; - assert((pvt_offset >= -15) && (pvt_offset <= 13)); - if (pvt_offset < 0 ) { - pvt_offset = 16 - pvt_offset; + if (pvt_offset < 0) { + if (pvt_offset >= -15) { + pvt_offset = 16 - pvt_offset; + } else { + // pvt offset value only has 4 bit + pvt_offset = 31; + } } } return pvt_offset;