mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
Merge branch 'fix/i2c_nack_c5' into 'master'
fix(i2c_master): Fix potential concurrency issue with task and interrupt when nack happens See merge request espressif/esp-idf!32307
This commit is contained in:
commit
708699bb8e
@ -494,6 +494,13 @@ static void s_i2c_send_commands(i2c_master_bus_handle_t i2c_master, TickType_t t
|
||||
if (xQueueReceive(i2c_master->event_queue, &event, ticks_to_wait) == pdTRUE) {
|
||||
if (event == I2C_EVENT_DONE) {
|
||||
atomic_store(&i2c_master->status, I2C_STATUS_DONE);
|
||||
} else if (event == I2C_EVENT_NACK) {
|
||||
// For i2c nack detected, the i2c transaction not finish.
|
||||
// start->address->nack->stop
|
||||
// So wait the whole transaction finishes, then quit the function.
|
||||
while (i2c_ll_is_bus_busy(hal->dev)) {
|
||||
__asm__ __volatile__("nop");
|
||||
}
|
||||
}
|
||||
s_i2c_err_log_print(event, i2c_master->bypass_nack_log);
|
||||
} else {
|
||||
|
@ -3,10 +3,6 @@
|
||||
components/esp_driver_i2c/test_apps/i2c_test_apps:
|
||||
disable:
|
||||
- if: SOC_I2C_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET in ["esp32p4", "esp32c5"]
|
||||
temporary: true
|
||||
reason: lack of runners, c5 test failed # TODO: [ESP32P4] IDF-8960, [ESP32C5] IDF-10332
|
||||
depends_components:
|
||||
- esp_driver_i2c
|
||||
# Following dependency is needed because they might increase lazy installed memory
|
||||
|
@ -6,8 +6,6 @@ from pytest_embedded import Dut
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
# TODO: [ESP32P4] IDF-8960, [ESP32C5] IDF-10332
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4', 'esp32c5'], reason='esp32p4 support TBD, c5 test failed')
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user