Skip to content

Commit bd4f0b4

Browse files
committed
fix(i2c): Fix scl frequency is wrong on esp32s2 in legacy i2c driver,
Closes espressif#15301, Closes espressif#14603
1 parent c7e8b68 commit bd4f0b4

File tree

1 file changed

+3
-0
lines changed
  • components/driver/i2c

1 file changed

+3
-0
lines changed

components/driver/i2c/i2c.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,9 @@ esp_err_t i2c_param_config(i2c_port_t i2c_num, const i2c_config_t *i2c_conf)
825825
#endif // SOC_I2C_SUPPORT_SLAVE
826826
{
827827
i2c_hal_master_init(&(i2c_context[i2c_num].hal));
828+
I2C_CLOCK_SRC_ATOMIC() {
829+
i2c_ll_set_source_clk(i2c_context[i2c_num].hal.dev, src_clk);
830+
}
828831
//Default, we enable hardware filter
829832
i2c_ll_master_set_filter(i2c_context[i2c_num].hal.dev, I2C_FILTER_CYC_NUM_DEF);
830833
I2C_CLOCK_SRC_ATOMIC() {

0 commit comments

Comments
 (0)