Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workarounds for 32 byte I2C block size limitation dictated by SMBus #99

Open
altineller opened this issue Nov 3, 2023 · 1 comment
Open

Comments

@altineller
Copy link

Hello,

I am reading i2c data from my custom device as:

status = bus.read_i2c_block_data(0x3C, 0xA0, STATUS_BUFFER_SIZE)

Where 0x3c is the address, and 0xa0 is the offset.

I needed to read 64 bytes, and discovered the 32 bytes block size limit, so:

status64 = i2c_msg.read(0x3C, STATUS_BUFFER_SIZE) but this omits the offset.

how can I make > 32bytes reads by using i2c_msg and still be able to use this offset.

Best Regards,
C.

@kplindegaard
Copy link
Owner

kplindegaard commented Nov 4, 2023

Would two calls cut it? First one to address/offset 0xA0 and the second to 0xC0?

For some devices that works perfectly fine, but I guess that depends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants