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

I2C: Increase TWIBUS buffer size from 32 to 256 #4396

Closed
wants to merge 1 commit into from

Conversation

bkerler
Copy link
Contributor

@bkerler bkerler commented Jan 9, 2025

This covers issue #4343.

For reference :
Originally the TWI Bus buffersize has been limited to 32 bytes. The reason mainly was the eeprom size limit. However, this doesn't seem to be a real hardware limitation but more a device dependent limitation, as it was stated on places all over the internet, for example see: Arduino discussion on i2c twi buffer limitation

Alternative:
In the past, if more than 32 bytes should be sent, a chain of multiple 32 byte buffers was sent in sequence instead.

What this PR does:
As this is no real limitation but in order to make sure that not too much ram is used for this feature, the buffer limit has been increased to only 256 bytes which should be sufficient for most edge cases.
For data larger then 256, multiple packet should be sent instead, further increasing the buffer size would unnecessarily fill the RAM.

@CZDanol
Copy link
Contributor

CZDanol commented Jan 9, 2025

This change permanently increases RAM usage by 448 B. Every byte counts. I'm not really sure it's worth for us to increase it like this for a guy that managed to do it in a different way already.

@bkerler
Copy link
Contributor Author

bkerler commented Jan 12, 2025

Aye. So let's close this PR.

@bkerler bkerler closed this Jan 12, 2025
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

Successfully merging this pull request may close these issues.

2 participants