17 lines
675 B
Diff
17 lines
675 B
Diff
diff --git a/components/hal/esp32s2/include/hal/i2c_ll.h b/components/hal/esp32s2/include/hal/i2c_ll.h
|
|
index f9a66b61d6..2f669b68c0 100644
|
|
--- a/components/hal/esp32s2/include/hal/i2c_ll.h
|
|
+++ b/components/hal/esp32s2/include/hal/i2c_ll.h
|
|
@@ -653,10 +653,12 @@ static inline void i2c_ll_enable_controller_clock(i2c_dev_t *hw, bool en)
|
|
static inline void i2c_ll_master_init(i2c_dev_t *hw)
|
|
{
|
|
typeof(hw->ctr) ctrl_reg;
|
|
+ uint32_t ref_always_on = hw->ctr.ref_always_on;
|
|
ctrl_reg.val = 0;
|
|
ctrl_reg.ms_mode = 1;
|
|
ctrl_reg.sda_force_out = 1;
|
|
ctrl_reg.scl_force_out = 1;
|
|
+ ctrl_reg.ref_always_on = ref_always_on;
|
|
hw->ctr.val = ctrl_reg.val;
|
|
}
|
|
|