feat(pvt): fix hplpgap assert error in pvt func on release v5.4

This commit is contained in:
yanzihan@espressif.com
2026-04-15 17:12:12 +08:00
parent a52c67a67b
commit 6bf5158987
@@ -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;