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.

I2C1 on Omap-L138

Dear E2E:

I can't get  I2C1 interface working for some reason.

Can you please answer my questions:

1.  Will I2C1 work in muster mode (continuously transmit for example) if the data register - ICDXR is not lloaded by CPU or DMA?

2. I need to have the I2C1_SCL as an output from I2C1.

3. The I2C1_SCL is required for the period of ~10 second.

4. What mode would you recommend for I2C1?

I used the following settings:

1. ICCNT = 0 for 65536 data count

2. ICMDR[10]=1 for the "Master"

3. ICMDR[9] = 1 for Transmit

4. ICEMDR[1] = 1 for “Ignore NACK"

5. ICPSC = 0x9 for I2C clock frequency = 80/10=8MHz (SYSCLK4=80MHz) 

6. I2C is enabled through the PSC1_11. PSC1_11 status register retunes 0x1E03 which means I2C1 is ON.

7. PINMUX4 = 0x22442244 - UART_TX/RX, I2C1_SDA/SCL, I2C0_SCL/SDA, GP1[6:7].

The serial port I2C0 works OK.

But I2C1 does not generate the SCL - looks dead.

Can you give me an idea what is going wrong?

Thank you for your help,

Boris Ruvinsky

  • Hi Boris,

    Have you followed the steps outlined under section 23.2.10 and 23.2.11 of the OMAPL138 Technical Reference Manual. I am assuming that you have since you were able to get I2C0 to work but it is worth double checking the steps mentioned in the document.

    Page 190 of the OMAPL138 Users Guide shows that the I2C registers are the same except the page address for I2C0 starts at 0x01C22000 and I2C1 starts at 0x01E28000. Therefore, if your able to get I2C0 working try copying the same changes to I2C1. I am not sure how your code looks but it might be as simple as changing the I2C register base address from 0x01C22000 to 0x01E28000.

    So the only thing that differs between the two will be the PinMux and Power Management settings. Your PinMux settings look correct so it is most likely a Power Management problem. On page 182 technical reference manual, there is a little note at the bottom:

    "There are no LPSCs for peripherals in the Async2 clock domain (this includes RTC, Timer64P0/P1, and I2C0); from a power savings stand point, clock-gating these peripherals does not result in significant power savings."

    It looks like I2C0 is always powered on which isn't true with I2C1. What does your code look like to powerup the I2C1 module? By default the I2C1 clock is disabled on powerup.