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.

C5535: I2C repeated start mode



Hi, 

using C5535 csl lib, I notice that there is no I2C repeated start mode management.

I try to configure C5535 dsp in order to communicate with a device which requires a REPEATED START condition.

Can you tell me what registers must be programmed in order to initiate a valide repeated start I2C condition ?

Can you send me an example code ?

I just see some explanations in spruh87c. datasheet but this is not enough

Thanks

  • Hi,

     For information on I2C registers you can refer to Technical reference manual - C5535 TRM ( section 9.3 in I2C register in C5535 TRM).

    Below are the details on Repeat mode - from I2C Mode Register

    The Repeat mode bit only applicable when the I2C is a master-transmitter. The RM, STT, and STP bits determine when the I2C starts and stops data transmissions. If the I2C is configured in slave mode, the RM bit is don't care.

    "1" - Repeat mode. Data words are continuously received/transmitted by the I2C regardless of the value in ICCNT until the STP bit is manually set to 1.

    "0" - Nonrepeat mode. The value in the data count register (ICCNT) determines how many data words are received/transmitted by the I2C.

    In the CSL example, the repeat start mode is disabled, but based on your requirement you can use/refer this example to enable RM mode and also ensure other configurations required for RM mode are taken care.

    Hope this helps.

    Regards

     Vasanth

  • Hi, 

    thanks for your answer.

    I success to manage the repeat mode but I notice that I have to get a minimum delay of 25 us between the device acknowledge and the restart. Can you tell me if this value can be reduced ? What is the exact I2C timing in repeat mode and where can I find those informations ?

    Regards

  • Hi,

     A repeat start condition generates when BB is set to 1 and STT is also set to 1. What is the status on these bits ?

    The details on the repeat start condition can be found in  below mentioned TRM sections.

      section - 9.2.5 "START and STOP conditions"

      Section 9.2.6.4  - "Using a repeated START condition" ,

      Section -  9.2.9 Arbitration

    Also Refer to I2C electrical Data timing in section 6.11.2 - in C5535 Data Sheet - C5535Datasheet.

    Hope the above information helps.

    Regards

     Vasanth