Does I2C write have length limitation? (How about size > 16B) - Con't

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi dmiya


Just came across this post: Does I2C write have length limitation? (How about size > 16B) - Con't

It seems the documentation is quite confusing.

For "datasheet of BCM20737", are you referring to this document? WICED™ Smart Hardware Interfaces

1. In this doc, it says "maximum transaction length of 16 bytes." But the comment of function "cfa_bsc_OpExtended" says "the size of the address plus the size of the data must be <= 8". Could you confirm it's 8 or 16?


2. Is maximum transaction length referring to (bufCount + addrCount)?


CFA_BSC_STATUS cfa_bsc_OpExtended(UINT8* buf,

                         UINT16 bufCount,

                         UINT8* addr,

                         UINT8 addrCount,

                         UINT8 slaveAdr,

                         UINT8 operation);

ps. one comment of function "cfa_bsc_OpExtended" is "

both addressed and unaddressed

//      The amount of data read/written can (not?) exceed 8", which I guess it's a typo?

0 Likes
1 Solution
Anonymous
Not applicable

sam.wang

as boont commented earlier, (bufCount + addrCount) <= 16. addrCount can be set to 0, in that case it will just send out the buffer. If addrCount is not zero, there will be a repeated start after addrCount bytes.

View solution in original post

0 Likes
3 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

The max write length is 16 bytes. You may refer to include/Drivers/i2cm.h within the SDK for more details.

In addition, you may check out "i2c_temeprature_sensor" application on how to use i2c.

0 Likes
Anonymous
Not applicable

sam.wang

as boont commented earlier, (bufCount + addrCount) <= 16. addrCount can be set to 0, in that case it will just send out the buffer. If addrCount is not zero, there will be a repeated start after addrCount bytes.

0 Likes
Anonymous
Not applicable

Hi boont and  kwang

Thanks for the info. It's clear now.

Best regards,

Sam

0 Likes