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=1 for the "Master"
3. ICMDR = 1 for Transmit
4. ICEMDR = 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,
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.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.