mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
fix(i2c): Fix that fsm reset cause i2c scl frequency changed on esp32s2
This commit is contained in:
@@ -131,6 +131,10 @@ static esp_err_t s_i2c_hw_fsm_reset(i2c_master_bus_handle_t i2c_master, bool cle
|
||||
}
|
||||
|
||||
i2c_hal_master_init(hal);
|
||||
// Restore the clock source here.
|
||||
I2C_CLOCK_SRC_ATOMIC() {
|
||||
i2c_ll_set_source_clk(hal->dev, i2c_master->base->clk_src);
|
||||
}
|
||||
i2c_ll_disable_intr_mask(hal->dev, I2C_LL_INTR_MASK);
|
||||
i2c_ll_clear_intr_mask(hal->dev, I2C_LL_INTR_MASK);
|
||||
i2c_hal_set_timing_config(hal, &timing_config);
|
||||
|
Reference in New Issue
Block a user