Skip to content

Conversation

knw1
Copy link

@knw1 knw1 commented Jan 30, 2023

Hi There!

The pull request provides a fix that solves a problem of reading a few bytes at once (as one transaction) from an emulated i2c device

I encountered the problem during using the example "i2c_tools".
Consider the following i2c-tools cmd:

i2c-tools> i2cget -c 0x48 -r 0x00 -l 0x05
0x19 0xee 0xee 0xee 0x00 
i2c-tools> 

There is an error on stdout/stderr of the qemu during performing above cmd:

qemu-system-xtensa: esp32_i2c: read I2C FIFO while it is empty
qemu-system-xtensa: esp32_i2c: read I2C FIFO while it is empty
qemu-system-xtensa: esp32_i2c: read I2C FIFO while it is empty

Response after applying my changes

i2c-tools> i2cget -c 0x48 -r 0x00 -l 0x05
0x19 0x00 0xff 0xff 0xff 
i2c-tools> 

No error on QEMU stdout/stderr. Got expected result, emulated TMP105 returns 0xff when i2c master wants to read more than two bytes

If you need more info, let me know.

Best regards,
Karol

@github-actions github-actions bot changed the title esp32_i2c: allow to read many bytes esp32_i2c: allow to read many bytes (QEMU-95) Jan 30, 2023
@knw1
Copy link
Author

knw1 commented Feb 28, 2023

ping

Copy link
Member

@igrr igrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the fix, and sorry I have overlooked your PR when doing the recent rebase to v7.2.0. One small comment, which I can also apply myself when cherry-picking your commit, if you agree.

@knw1
Copy link
Author

knw1 commented Feb 28, 2023

Corrected according to your suggestion :)

@knw1
Copy link
Author

knw1 commented Mar 8, 2023

Thanks a lot for the fix, and sorry I have overlooked your PR when doing the recent rebase to v7.2.0. One small comment, which I can also apply myself when cherry-picking your commit, if you agree.

I prepared a correction and squashed the commits so there is only one commit.

@igrr
Copy link
Member

igrr commented Apr 13, 2023

Cherry-picked as db73e5e, thank you for the fix!

@igrr igrr closed this Apr 13, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally and removed Status: To Do labels May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants