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.

AM335X I2C2 don't work and timeout

Other Parts Discussed in Thread: AM3352

HI, all:

     My platform is AM3352, SDK6.0, I have one i2c bus(i2c0), I want to add another i2c bus, select i2c2, the pin mux ix configured

     static struct pinmux_config i2c1_pin_mux[] = {

     {" uart0_ctsn.i2c1_sda",    OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW |
                                   AM33XX_PULL_ENBL | AM33XX_INPUT_EN},
       {" uart0_rtsn.i2c1_scl",   OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW |
                                   AM33XX_PULL_ENBL | AM33XX_INPUT_EN},
       {NULL, 0},

     }

   static struct i2c_board_info am335x_i2c1_boardinfo[] = {};

   static void i2c1_init(int evm_id, int profile)
  {
       setup_pin_mux(i2c1_pin_mux);
       omap_register_i2c_bus(2, 100, am335x_i2c1_boardinfo,
                     ARRAY_SIZE(am335x_i2c1_boardinfo));
       return;
 }

  Loader I2C driver, have some error information

 omap_i2c omap_i2c.2: controller timed out

 expect configure pin mux & init, if modify other code?

  • Hi, all
    Give me some idea!
  • Hi Ryan, 

    Which Board are you using? Did you check schematics for doing Pin Mux? 

    -Murali Krishna Dama

  • Hi,
    Pin mux configure refer to EE schecmatics, board is our, design to Starter SK EVM board.
  • Ryan,

    If you want to modify the existing code to your application use case.

    Please check modify the following stuff.

    1)  slave address of I2C device ( refer to device data sheet) 

    2)  PRCM (you will not be able to see any of I2C registers in Memory browser if not proper)

    3) Pin Mux ( Check board schematics, and Pinouts, Mode)

    4) Interrupt

    -Murali Krishna

  • Murali,
    Thank you for your help
    1. Don't discuss the slave device, I think that the contorl problem
    2. I2C0 is OK, I2C1 test signal, the Clock & Data have no signal. Now, I am compring I2C0 & I2C1 regitser value(under Kernel debuging)
    1. Pin mux configure should be OK, just two pin
    4. Interrupt , I can't see, could you say specific?
  • Hi, Murali

      The problem is close, but I can't see

      I2C1 Bus,  use the UART1_TX/RX,  (OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW |  AM33XX_PULL_ENBL | AM33XX_INPUT_EN)  is OK

      I2C Bus, use SPI0_D1 & SPI0_CS0, (OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_ENBL | AM33XX_INPUT_EN)  is OK

      But use UART0_RTSn/CTSn, (OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_ENBL | AM33XX_INPUT_EN) can't work

      So need modify (OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_UP | AM33XX_INPUT_EN) is OK

      Could you give some idea?

  • Ryan,

    If you are using I2C1 only, you need to configure 2 pins for that I2C1 DATA and CLK.

    Why there are more configurations. Please check the schematics and Check to see the Mapping for Pin and The signal out and Its Mode.

    It is not clear that which signal is mapped to which pin in code copied above.

    Could you please provide schematics for the same?

     

    -Murali Krishna Dama

  • Musali,
    I can't say clear!
    AM335X I2C1 cofgure pin have four group(UART1_TX/RX, SPI0_D1 & SPI0_CS0, UART0_RTSn/CTSn)
    if use UART0_RTSn/CTSn 2 pin, (OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_ENBL | AM33XX_INPUT_EN) can't work
    But the others pin conffured is OK!