fix(bod): Remove config for bod on p4 v0.x

This commit is contained in:
C.S.M
2024-11-01 11:08:50 +08:00
committed by BOT
parent 8ea7ae7086
commit 2db5607060
2 changed files with 14 additions and 34 deletions

View File

@@ -17,6 +17,8 @@
#include "hal/regi2c_ctrl.h"
#include "hal/psdet_types.h"
#include "soc/regi2c_brownout.h"
#include "hal/efuse_hal.h"
#include "soc/chip_revision.h"
#define BROWNOUT_DETECTOR_LL_FIB_ENABLE (BIT(1))
@@ -68,6 +70,9 @@ static inline void brownout_ll_reset_config(bool reset_ena, uint32_t reset_wait,
*/
static inline void brownout_ll_set_threshold(uint8_t threshold)
{
if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 100)) {
threshold = 0; // Fix this level as 0 so that on v0.x brownout value will be fixed around 2.52v.
}
REGI2C_WRITE_MASK(I2C_BOD, I2C_BOD_THRESHOLD_L, threshold);
REGI2C_WRITE_MASK(I2C_BOD, I2C_BOD_THRESHOLD_H, threshold);
}