@@ -128,16 +128,17 @@ ZTEST(i2c_pan, test_clock_stretching_recovery)
128128 zassert_ok (ret , "i2c_read failed: %d\n" , ret );
129129 zassert_mem_equal (fixture .master_buffer , fixture .slave_buffer , TEST_BUFFER_SIZE );
130130
131- TC_PRINT ("STEP 2: TWIM - TWIS transmission with SCL pulled low (EIO error is expected)\n" );
131+ TC_PRINT ("STEP 2: TWIM - TWIS transmission with SCL pulled low "
132+ "(ETIMEDOUT error is expected)\n" );
132133 /* Pull TWIS SCL pin low */
133134 nrf_twis_scl_pin_set (twis .p_reg , 1 << 31 );
134135 nrf_gpio_cfg_output (scl_pin );
135136 nrf_gpio_pin_clear (scl_pin );
136137 TC_PRINT ("TWIS SCL pin (disconnected): 0x%x\n" , nrf_twis_scl_pin_get (twis .p_reg ));
137138 memset (fixture .slave_buffer , 0 , TEST_BUFFER_SIZE );
138139 ret = i2c_read (fixture .dev , fixture .master_buffer , TEST_BUFFER_SIZE , fixture .addr );
139- zassert_equal (ret , - EIO , "i2c_read failed with different error than expeced (EIO) %d\n" ,
140- ret );
140+ zassert_equal (ret , - ETIMEDOUT ,
141+ "i2c_read failed with different error than expeced (ETIMEDOUT) %d\n" , ret );
141142
142143 TC_PRINT ("STEP 3: TWIM - TWIS transmission after TWIS pin reconfiguration\n" );
143144 /* Restore original TWIS pin configuration */
@@ -146,9 +147,16 @@ ZTEST(i2c_pan, test_clock_stretching_recovery)
146147 zassert_ok (ret );
147148 TC_PRINT ("TWIS SCL pin (reconfigured): 0x%x\n" , nrf_twis_scl_pin_get (twis .p_reg ));
148149
150+ /* Attempt proper transfer, expected to fail on devices affected by nRf54L anomaly 105. */
149151 ret = i2c_read (fixture .dev , fixture .master_buffer , TEST_BUFFER_SIZE , fixture .addr );
150- zassert_ok (ret , "i2c_read failed (after SCL release): %d\n" , ret );
151- zassert_mem_equal (fixture .master_buffer , fixture .slave_buffer , TEST_BUFFER_SIZE );
152+ if (NRF_ERRATA_DYNAMIC_CHECK (54L , 105 )) {
153+ zassert_equal (ret , - ETIMEDOUT ,
154+ "i2c_read failed with different error than expeced (ETIMEDOUT) %d\n" ,
155+ ret );
156+ } else {
157+ zassert_ok (ret , "i2c_read failed (after SCL release): %d\n" , ret );
158+ zassert_mem_equal (fixture .master_buffer , fixture .slave_buffer , TEST_BUFFER_SIZE );
159+ }
152160}
153161
154162ZTEST_SUITE (i2c_pan , NULL , test_setup , NULL , cleanup_buffers , NULL );
0 commit comments