You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original multibyte read simple read 2+ registers progressively, each in an entirely separate read_byte_data() call. This works for some devices like the DMCC, which only refresh their registers after an explicit call. Other devices are constantly refreshing, thus reading separate bytes could lead to the combined binary value being corrupt.
For those devices, multibyte reads in the form of read_word_data() and block read calls appear to be the expected interface. Unfortunately, not all devices are well behaved(*) under these conditions. To add to the confusion, some devices appear to need to be put in an auto-increment mode before multi-byte reads work, but more testing is required.
In the meantime, I'll be combining a flag and a call to read_word_data() to solve the immediate pain. This will likely need to be expanded upon to handle data larger than 2-bytes, as well as any other protocol variants discovered.
(*) The DMCC for example, locks up the I2C bus if anything more than a byte is read per call. Yay.
The text was updated successfully, but these errors were encountered:
The original multibyte read simple read 2+ registers progressively, each in an entirely separate read_byte_data() call. This works for some devices like the DMCC, which only refresh their registers after an explicit call. Other devices are constantly refreshing, thus reading separate bytes could lead to the combined binary value being corrupt.
For those devices, multibyte reads in the form of read_word_data() and block read calls appear to be the expected interface. Unfortunately, not all devices are well behaved(*) under these conditions. To add to the confusion, some devices appear to need to be put in an auto-increment mode before multi-byte reads work, but more testing is required.
In the meantime, I'll be combining a flag and a call to read_word_data() to solve the immediate pain. This will likely need to be expanded upon to handle data larger than 2-bytes, as well as any other protocol variants discovered.
(*) The DMCC for example, locks up the I2C bus if anything more than a byte is read per call. Yay.
The text was updated successfully, but these errors were encountered: