Closed Manu3l0us closed 2 months ago
Please use our bug template when reporting bugs. You need to edit this issue to include the information requested in https://github.com/zephyrproject-rtos/zephyr/blob/main/.github/ISSUE_TEMPLATE/001_bug_report.md (e.g. we have no idea which revision of Zephyr, you are reporting this against).
Added info about toolchain and Zephyr commit hash. I can provide detailed traces (including logic analyzer) next week.
I'm on a RP2040 using eeprom_target to emulate a 4KB EEPROM with 4KB addressing. When the Linux host reads my emulated EEPROM using the 24c32 driver in 128 byte chunks, it issues an 2byte address write before each chunk. The issue is, that the first, most significant address byte sometimes gets lost, so when I read the EEPROM, I see the first 256 bytes over and over again. This seems to happen because dw->state does not stay in I2C_DW_CMD_SEND after the first byte, so slave_cb->write_requested(dw->slave_cfg) is called again and the MSB of the address reset. This is highly timing dependent,
I tried building a workaround in the i2c_dw_isr but was not successful yet.
To Reproduce Steps to reproduce the behavior:
Expected behavior 16-bit I2C EEPROM emulation works correctly in conjunction if the i2c_dw driver on RP2040
Impact Only the first 256 bytes can be read reliably
Environment