Skip to content

Commit 3286651

Browse files
committed
Merge branch 'fix/i2c_scl_freq_s2' into 'master'
fix(i2c): Fix scl frequency is wrong on esp32s2 in legacy i2c driver Closes IDFGH-13739 and IDFGH-14539 See merge request espressif/esp-idf!37066
2 parents deb703c + dcfbac8 commit 3286651

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)