I2C3 bus on T30 module

Dear Toradex, we have recently bought several Colibri T30 IT boards. We have some problem witch I2C3 bus on our custom mother board.

We are using latest WEC7 image and libs.

We are able to use I2C1 and I2C2 bus, but the problem is the I2C3 bus. On all I2C2 buses, there are pull-ups 47k. If we try to scan I2C1 or I2C2, we get the addresses of attached devices. If we try it with I2C3, we get nothing, nor error, no success. There is no activity on both I2C3 lines (seeing witch oscilloscope). On I2C1 and I2C2, there is nice clock and data square signals.

I2C3 pins is are multiplexed with MMC card. We are not use it, and SDBusDriver+SDIO drivers loading are disabled via renaming through a registry editor.

Can you kindly give us some feedback? Is there something what we do wrong?

here is piece of main code:

#define I2C1 0x7000C000 // SODIMM PINS 194 and 196
#define I2C2 0x7000C400 // SODIMM PINS 127 and 133
#define I2C3 0x7000C500 // SODIMM PINS 49 and 51  

      ////////////////start of piece of the main function
 if (FALSE == I2CInitEx(I2C3))
 {
      printf("Fatal error: cannot init I2C\n");
      return -1;
  }
  I2CSetSpeed(I2C_400KBPS);

  if (FALSE == GetI2CLock(2000))
  {
        printf("Fatal error: cannot acquire I2C lock\n");
        return -1;
   }
   i2cScan();// nothing happens on both the I2C3 lines
    /////////////////////////////////////////////// end main
 void i2cScan()
 {
  int count = 0;

  printf("Scanning i2c bus: ");
  for (size_t i = 1; i < 127; i++)
  {
        if (TRUE == I2CBurstWrite(i, NULL, 0, 0))
        {
              printf("%s0x%02x", ((count++ == 0) ? "[" : ", "), i);
        }
        Sleep(1); // 1 ms
  }
  if (count > 0)
  {
        printf("] ");
  }
  printf("%i device(s) found\n", count);
}

thank you

Martin

@marsaf Currently a lot of our engineers are busy at the embedded world. We will check this issue when we are back. So there can be some delay on the reply on this qeustion.

okay, will be waiting, thank you. Martin

The issue is that SODIMM pin 49 and 51 are multiplexed:

  • SODIMM 49: GPIO S5 and BB1 are multiplexed on there.
  • SODIMM 51: GPIO S6 and BB2 are multiplexed on there.

To get IC2 3 working on this pins you have to tristate GPIO S6 and S5 and set them to GPIO input. For a first test you can do this with the GPIO Config Tool (get it from here). If this solves your issue you can do this configuration also in your code by using the GPIO Lib (API is located here).

Thank you for the reply. Infront of my main code, I’ve added:

TegraSetTristatePinGroup(TEGRA_GPIONUM('s', 5), TRUE);
TegraSetTristatePinGroup(TEGRA_GPIONUM('s', 6), TRUE);

SetGPIOAltFn(TEGRA_GPIONUM('s', 5),-1, FALSE); 
SetGPIOAltFn(TEGRA_GPIONUM('s', 6),-1, FALSE);

I2CInitEx(I2C3);
I2CSetSpeed(I2C_400KBPS);
i2cScan();// nothing found, but with I2C1 and I2C2 found device.
***

But it still doesn’t work. Is my pin tristating and input mode pin correct?
But anyway, thank you for your suggestions.

Best regards

Martin

I quickly tested this with our Evaluation Board and was able to successfuly scan the RTC Chip we have there. If you have one of these boards, please give it a try.

The test looks as following:

  • Flash WEC 7, V1.4 on a Colibri T30
  • Disable SDIO driver
  • Remove jumpers on X8.47 and X8.46 (SODIMM 194 and 196)
  • Remove jumpers on X11.23 and X11 24 (SODIMM 49 and 51)
  • Connect X10.23 with X7.48
  • Connect X10.24 with X7.47

If you now run your code, you should get the RTC Device (ID [0x68]) which is mounted on the Evaluation Board.

Can you reproduce that?

Great! Now it works. I reflashed WEC7 and after disabling SDIO, it worked nicely. I Suppose that my version of WEC7 was kind of over-modificated.

Thank you very much! Let’s consider that topic as SOLVED.

Best Regards

Martin