diff --git a/components/hal/esp32h2/include/hal/brownout_ll.h b/components/hal/esp32h2/include/hal/brownout_ll.h index f0b3d63263..c6048ccaa3 100644 --- a/components/hal/esp32h2/include/hal/brownout_ll.h +++ b/components/hal/esp32h2/include/hal/brownout_ll.h @@ -63,7 +63,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) { - REGI2C_WRITE_MASK(I2C_BOD, I2C_BOD_THRESHOLD, threshold); + REGI2C_WRITE_MASK(I2C_BOD, I2C_BOD_THRESHOLD_L, threshold); + REGI2C_WRITE_MASK(I2C_BOD, I2C_BOD_THRESHOLD_H, threshold); + } /** diff --git a/components/soc/esp32h2/include/soc/regi2c_brownout.h b/components/soc/esp32h2/include/soc/regi2c_brownout.h index 9daf67f093..0d2caf531c 100644 --- a/components/soc/esp32h2/include/soc/regi2c_brownout.h +++ b/components/soc/esp32h2/include/soc/regi2c_brownout.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -44,6 +44,10 @@ #define I2C_PMU_OR_DREFH_VDDA_MSB 7 #define I2C_PMU_OR_DREFH_VDDA_LSB 5 -#define I2C_BOD_THRESHOLD I2C_PMU_OR_DREFL_VDDA -#define I2C_BOD_THRESHOLD_MSB I2C_PMU_OR_DREFL_VDDA_MSB -#define I2C_BOD_THRESHOLD_LSB I2C_PMU_OR_DREFL_VDDA_LSB +#define I2C_BOD_THRESHOLD_L I2C_PMU_OR_DREFL_VDDA +#define I2C_BOD_THRESHOLD_L_MSB I2C_PMU_OR_DREFL_VDDA_MSB +#define I2C_BOD_THRESHOLD_L_LSB I2C_PMU_OR_DREFL_VDDA_LSB + +#define I2C_BOD_THRESHOLD_H I2C_PMU_OR_DREFH_VDDA +#define I2C_BOD_THRESHOLD_H_MSB I2C_PMU_OR_DREFH_VDDA_MSB +#define I2C_BOD_THRESHOLD_H_LSB I2C_PMU_OR_DREFH_VDDA_LSB