Skip to content

Commit a677e41

Browse files
committed
test(i2c): Enhance the stability for i2c tests
1 parent 038a666 commit a677e41

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_slave_v2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ static void i2c_slave_read_test_v2(void)
7474
.slave_addr = ESP_SLAVE_ADDR,
7575
.send_buf_depth = DATA_LENGTH,
7676
.receive_buf_depth = DATA_LENGTH,
77+
.flags.enable_internal_pullup = true,
7778
};
7879

7980
TEST_ESP_OK(i2c_new_slave_device(&i2c_slv_config, &handle));
@@ -200,6 +201,7 @@ static void slave_write_buffer_test_v2(void)
200201
.slave_addr = ESP_SLAVE_ADDR,
201202
.send_buf_depth = DATA_LENGTH,
202203
.receive_buf_depth = DATA_LENGTH,
204+
.flags.enable_internal_pullup = true,
203205
};
204206

205207
TEST_ESP_OK(i2c_new_slave_device(&i2c_slv_config, &handle));

components/hal/esp32s2/include/hal/i2c_ll.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,6 @@ static inline void i2c_ll_slave_init(i2c_dev_t *hw)
774774
ctrl_reg.sda_force_out = 1;
775775
ctrl_reg.scl_force_out = 1;
776776
hw->ctr.val = ctrl_reg.val;
777-
hw->fifo_conf.fifo_addr_cfg_en = 0;
778-
hw->scl_stretch_conf.slave_scl_stretch_en = 0;
779777
}
780778

781779
/**

0 commit comments

Comments
 (0)