This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SN65DSI84-Q1: I2c multibyte read/write

Part Number: SN65DSI84-Q1

Hi,

I have been using SN65DSI84-Q1 interface through I2C with master iMx8, an using Vector Microsar I2C driver code. As far as I know to read multibyte of data from a slave device through i2c the following
flow is used. I2C start with Device address with write-> ack-> registeraddress to be read the data -> ack -> (Repeated start) Device address with read ->ack -> n bytes of read data ->Nack-> stop bit

but in the SN65DSI84-Q1 it is referred  in the section 8.5, is quite confusing me also I couldn't see anywavefroms for I2C R/W in the data sheet.

Could you please guide shall I proceed with general I2C read procedure to read multibyte by setting a starting sub address?

When I am tryng to write into the registers 0x09,0x0A,0x0B sequentially as I2Start->DA->RegisterAddress(0x09)->bytetobewrittenin0x09->bytetobewrittenin0x0A->bytetobewrittenin0x0B
is not writing properly? I assumed these registers are stored in contiguous memeory locations, if not correct me, this info aalso need to be updated in data sheet.

  • Hi Prakash,

    To read multiple bytes of data, you can follow the procedure in section 8.5.

    If you want to start at a specific subaddress other than 00h, then you should follow the "The following procedure is followed for setting a starting sub-address for I2C reads" procedure first. Then, you can follow the "The following procedure is followed to read the SN65DSI84-Q1 I2C registers" procedure. 

    Regards,

    I.K. 

  • Hi,

    Thanks for your swift response.

    As per the section "The following procedure is followed for setting a starting sub-address for I2C reads", executing the I2C read function by setting initial register address to start read and the "The following procedure is followed to read the SN65DSI84-Q1 I2C registers" is same as handling the repeated start, right?

    In step3 mentioned under the topic "The following procedure is followed to read the SN65DSI84-Q1 I2C registers" is quite confusing, it has raised me a question like do i need to send the address as 0x00 again?

    also the other statement in the step 3 

    "If a write to the SN65DSI84-Q1 I2C register occurred prior to the read, then the SN65DSI84-Q1 will start at the subaddress specified in the write.", is describing the write happened as per the sec "The following procedure is followed for setting a starting sub-address for I2C reads", right?

    Also please confirm whether the registers are stored in continuous memory location? I could see 0x0D after the register address 0x0B, please clarify this as well?

    Thanks in advance!

  • Hi Prakash,

    I don't believe it's the same as a repeated start. The procedure requires a stop and then another start.

    Step 3 is a step that the device takes. You are not required to do anything in step 3 for that procedure. 

    In regards to the other statement in step 3, you are correct.

    The registers are stored in contiguous memory locations, yes. Registers that you don't see in the datasheet (e.g. 0x0C) are test registers that you should only write 0x00 to.

    Regards,

    I.k.