Hello. I have been having a problem where I will set UCSWRST, configure the I2C interface, and then clear UCSWRST. Immediately after I clear UCSWRST, the UCBBUSY bit will be set, though both SCL and SDA are high. Nothing (including slave address) will transmit when I set a start condition. I have 4.7k pullups on the SCL and SDA lines and the ports should be configured correctly (I2C selected, and set as outputs). So far this has happened on both devices I have attempted to interface with (MAG3110 and MAX7357). I have read many similar posts and have tried some of the solutions, but haven't had anything work so far. I have tried setting a stop condition after the UCBBUSY bit is set, but that did not solve the problem. None of the UCB1IFG bits are set when the UCBBUSY bit is set. I've tried running it without the debugger attached, as well. If I configure the pins as GPIOs I can pull them down to ground, so that shouldn't be the problem. Additionally, it has this same behavior on both my PCB and on a target board.
If anyone has an idea of what is going wrong, I would appreciate the help. Thanks.
------------Code-----------------------------------
//This is where I am trying to configure the I2C interface
UCB1CTL1 |= UCSWRST; // Enable SW reset so that we can change these settings safely
UCB1CTL0 = UCMST + UCMODE_3 + UCSYNC; // I2C Master, i2c mode, synchronous mode
UCB1CTL1 = UCSSEL_2 + UCTR + UCSWRST; // Use SMCLK, is transmitter, preserve SW reset
UCB1BR0 = 12; // TODO: change this
UCB1BR1 = 0;
UCB1CTL1 &= ~UCSWRST; // Clear SW reset, resume operation
UCB1I2CSA = COLOR_SENSOR_MUX_ADDRESS; //(MAX7357: 0x70) have tried having this before clearing the UCSWRST bit
//Here are the relevant port configurations
P3SEL = MAG_SDA + MAG_SCL + COLOR_BUS_SDA; //COLOR_BUS_SDA is for the MAX7357
P3DIR = MAG_SDA + MAG_SCL + COLOR_BUS_SDA + BIT3 + BIT4 + BIT5 + BIT6;
P5SEL = XT2IN + XT2OUT + COLOR_BUS_SCL; //COLOR_BUS_SCL is for the MAX7357
P5DIR = COLOR_BUS_SCL + BIT0 + BIT1 + BIT5 + BIT6 + BIT7;