Closed
Description
With this code on an ESP32-C3:
i2c
.write_read(ADDR_DOESNT_MATTER, &[], &mut [0; RECV_LEN_DOESNT_MATTER])
.expect("Failed i2c");
I get this signal trace: repeated.zip
The code panics due to the NACK
and then suspends execution in a loop inside my panic handler - I have triple checked this with both probe-rs
and defmt
logs. However, even though execution is suspended, the hardware I2C continues to send bogus I2C transmissions. So my only conclusion is that the registers that control the hardware I2C have been left in a state that repeatedly sends incorrect data.
Probably, it is due to this code in esp-hal
:
The write command is issued, but the data to write is never actually set because bytes
is empty.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done