TCA9548A Mux stops responding

#1

Hello, I’ve been having some trouble with the TCA9548A I2C Mux chip. I’ve got it soldered into my board, and have had it working in the past for a number of tests with other I2C chips on its busses. The problem starts unannounced and without any repeatable action (as far as I can see). It seems that the chip becomes unresponsive when giving it commands, causing it to lock up my test program. Resoldering the chip tends to fix it temporarily (I’ll also try just leaving it for a bit).

I’m using an Arduino Mega to test the communication out, but will eventually transition to the Beaglebone. I am powering the TCA with +3.3v, but my Arduino Mega’s I2C pins work on 5V. Could that be the problem? If so, what can I do to step them down? I have tried powering up OpenAg device software on the Beaglebone, and it couldn’t recognize the Mux, so I’m assuming it was having the same issue.

Here’s a basic test program I’m using to communicate with the TCA9548A and see what addresses are on its channels.

/**
 * TCA9548 I2CScanner.pde -- I2C bus scanner for Arduino
 *
 * Based on code c. 2009, Tod E. Kurt, http://todbot.com/blog/
 *
 */

#include "Wire.h"
extern "C" { 
#include "utility/twi.h"  // from Wire library, so we can do bus scanning
}

#define TCAADDR 0x77

void tcaselect(uint8_t i) {
  if (i > 7) return;
 
  Wire.beginTransmission(TCAADDR);
  Wire.write(1 << i);
  Wire.endTransmission();  
}


// standard Arduino setup()
void setup()
{
    
}

void testTCA(){
  while (!Serial);
    delay(1000);

    Wire.begin();
    
    Serial.begin(9600);
    Serial.println("\nTCAScanner ready!");
    
    for (uint8_t t=0; t<8; t++) {
      tcaselect(t);
      Serial.print("TCA Port #"); Serial.println(t);

      for (uint8_t addr = 0; addr<=127; addr++) {
        if (addr == TCAADDR) continue;
      
        uint8_t data;
        if (! twi_writeTo(addr, &data, 0, 1, 1)) {
           Serial.print("Found I2C 0x");  Serial.println(addr,HEX);
        }
      }
    }
    Serial.println("\ndone");
}


void loop() 
{
  testTCA();
  delay(1500);
}

This works great sometimes, but eventually begins to hang consistently after Arduino Wire sends a transmission.

i.e. Normally I get an output like this:

TCAScanner ready!
TCA Port #0
TCA Port #1 Found I2C 0x27
TCA Port #2
TCA Port #3
TCA Port #4
TCA Port #5
TCA Port #6
TCA Port #7
done

But when things aren’t working, it hangs here:

> 
> TCAScanner ready!

Any thoughts on what might be up, or how to go about troubleshooting? Thanks very much!

#2

So I’ve managed to get a test script running on the Beaglebone to test the TCA mux. I think I’m having the same issues…I’ll resolder it, it works great for 5 minutes, then it loses communication and I have to resolder it to “wake” it back up. I’m completely stumped – all I can think of at this point is getting a new chip, but not sure if that will do anything because it’s clearly not burned out completely. Any ideas what’s happening here?

#3

Hey guys, I did end up figuring it out. Just a bad chip! I ordered a new TCA9548A and it’s working fine now.