From f5c5c4cb8af2d47c6210904679a25e3a235e3025 Mon Sep 17 00:00:00 2001 From: "yanzihan@espressif.com" Date: Fri, 20 Mar 2026 17:23:23 +0800 Subject: [PATCH] feat(pvt): fix hplpgap assert error in pvt func on release v5.3 --- components/esp_hw_support/port/esp32c6/pmu_pvt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/esp_hw_support/port/esp32c6/pmu_pvt.c b/components/esp_hw_support/port/esp32c6/pmu_pvt.c index 114db6d602..e517f28d23 100644 --- a/components/esp_hw_support/port/esp32c6/pmu_pvt.c +++ b/components/esp_hw_support/port/esp32c6/pmu_pvt.c @@ -37,16 +37,19 @@ static uint8_t get_lp_hp_gap(void) uint8_t offset_read = efuse_ll_get_dbias_vol_gap(); bool offset_flag = offset_read >> 4; uint8_t offset_value = offset_read & 0xf; - int8_t pvt_offset = 0; if (offset_flag) { pvt_offset = -1 * offset_value; } else { 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;