mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-10 06:31:24 +00:00
fix(bod): Remove config for bod on p4 v0.x
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user