This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

convert block-write to sequence of byte-write

I have a requirement where I need to perform below I2c operations:
1) "S SlaveAddress W 05 03 01 7C FF PEC” in SMB mode.
Where 05 is offset/start address in slave device
03 -> the length of data to write
01, 7C, EF are the data to write in "SMB + PEC" mode.

My driver support only byte and word write/read. So Can i convert above block mode to byte mode?
If so, please help me on "how I will divide it into series of byte operation" and offset for each byte operation (in SMB|PEC) mode?

2) 2nd requirement is: I wants to perform below I2C operation in SMB mode:
"S SlaveAddress W 06 02 01 79
S SlaveAddress R 02 DataLowByte DataHighByte PEC P"
Above "Write Block Read Block Process" has below meaning.
06 ->offset /start address in slave device
02 -> length of data to write
01 and 79 are the data to write
02 --> length of the reading
DataLowByte DataHighByte are the data to read form address 0x79 in "SMB with PEC" mode

Can I convert it into series of byte write followed by byte read?
if so, then how I will divide it into multiple byte of write followed by read and what will be the offset for each operation.

I am struggling on this. Please help me on this.

0