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.

DLPC350 I2C read transaction

Other Parts Discussed in Thread: DLPC350

Hello ALC team,

I have a few questions about the I2C of DLPC350. Would you please answer these questions?

Q1. The procedure to read the registers is written in “1.1.2 I2C Read Transaction Sequence” of DLPC350 Programmer’s guide, page8.

There is a following description in this section;
 5. Host reads a status byte and checks that bit zero is set. If bit zero is not set, the read transaction is repeated until bit zero is set. If bit one is also set, an error occurred. Successful command requests will only have bit zero set.

It is written that if bit0 of the status byte is 0b, the host should repeat the read transaction until 1b is set to bit0.
First, I would like you to explain about the status byte.
Next, what period do you specify for the read transaction? Please tell us which case is correct.

If we use the case of 1.1.2.1 Example Read Transaction Sequence as an example and if the bit0 of status byte is 0b,
1) We should retry from S34 04 P ... (That is, we have to send all again)
2) We just can retry from S35 01 00 P.
3) Except for 1) or 2).


Q2. This is just a confirmation.
There is a description of “3. Host sends a STOP (depicted as P in Figure 1-1) condition.” in 1.1.2 I2C Read Transaction Sequence.
Is this Stop condition always needed? Or, is it not needed in the case of read transaction?


It would be helpful if you can give any comment.

Best Regards,
Nobu Arai

  • Q1 -
    The first byte read from DLPC350 for any I2C read or write transaction basically contains the response byte; which indicates what happened to the previous I2C read/write command. If everything was okay you should read 0x01; and if any failure occurred and command is not executed it will return 0x03. After sending READ command you can add delay around 10ms before reading the response.

    The correct case is as follows -
    1. Send a READ command
    2. Read the response after delay; if the 1st response byte is 0x01 - you can go ahead and read the expected number of bytes for the READ command. If the 1st response byte is 0x03 - Something is not correct could be I2C command wrong or the controller is in wrong state. If the 1st response byte is 0x00 then command execution status in progress - try reading the again the response byte after delay of few ms.

    Q2.
    It is always needed even for a READ transaction.

    Regards,
    Sanjeev
  • Hello Sanjeev-san,

    Thank you for the explanation.
    I understand the I2C status byte.

    Please let me confirm one thing about your comment below.
    >>After sending READ command you can add delay around 10ms before reading the response.

    Is this specification (around 10ms) defined by any document? If so, we would to know where this is written.


    Best Regards,
    Nobu Arai
  • Hello Nobu Arai,

    This is not a strict specification number. I mentioned it as a example safer time. It will work for smaller delays also which you can experiment by reducing the delay time.

    Regards,

    Sanjeev