From a677e413929f54b8a49b50634d68c5a92acd152c Mon Sep 17 00:00:00 2001 From: "C.S.M" Date: Tue, 19 Nov 2024 16:45:05 +0800 Subject: [PATCH] test(i2c): Enhance the stability for i2c tests --- .../test_apps/i2c_test_apps/main/test_i2c_slave_v2.c | 2 ++ components/hal/esp32s2/include/hal/i2c_ll.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_slave_v2.c b/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_slave_v2.c index e1282824d0..65a133b79c 100644 --- a/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_slave_v2.c +++ b/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_slave_v2.c @@ -74,6 +74,7 @@ static void i2c_slave_read_test_v2(void) .slave_addr = ESP_SLAVE_ADDR, .send_buf_depth = DATA_LENGTH, .receive_buf_depth = DATA_LENGTH, + .flags.enable_internal_pullup = true, }; TEST_ESP_OK(i2c_new_slave_device(&i2c_slv_config, &handle)); @@ -200,6 +201,7 @@ static void slave_write_buffer_test_v2(void) .slave_addr = ESP_SLAVE_ADDR, .send_buf_depth = DATA_LENGTH, .receive_buf_depth = DATA_LENGTH, + .flags.enable_internal_pullup = true, }; TEST_ESP_OK(i2c_new_slave_device(&i2c_slv_config, &handle)); diff --git a/components/hal/esp32s2/include/hal/i2c_ll.h b/components/hal/esp32s2/include/hal/i2c_ll.h index 840937e4e8..067b0ada6c 100644 --- a/components/hal/esp32s2/include/hal/i2c_ll.h +++ b/components/hal/esp32s2/include/hal/i2c_ll.h @@ -774,8 +774,6 @@ static inline void i2c_ll_slave_init(i2c_dev_t *hw) ctrl_reg.sda_force_out = 1; ctrl_reg.scl_force_out = 1; hw->ctr.val = ctrl_reg.val; - hw->fifo_conf.fifo_addr_cfg_en = 0; - hw->scl_stretch_conf.slave_scl_stretch_en = 0; } /**