|
Hi, thanks for the reply. The issue arose a couple of things: first, starting and stopping the transfer too quickly. Also, the UART interrupts were also causing issues. See below: interrupt(USCITX_VECTOR) USCIAB0TX_ISR(void) { if((IFG2 & UCB0RXIFG) != 0) //I2C RX { : : UCB0CTL1 |= UCTXSTP; // I2C stop condition [Set some flag if all bytes received] : : } else // Some UART code { } } WDTCTL = WDTPW + WDTHOLD; // Stop WDT P3SEL |= 0x06; // Assign I2C pins to USCI_B0 UCB0CTL1 |= UCSWRST; // Enable SW reset UCB0CTL0 = UCMST + UCMODE_3 + UCSYNC; // I2C Master, synchronous mode UCB0CTL1 = UCSSEL_2 + UCSWRST; // Use SMCLK, keep SW reset UCB0BR0 = 11; // fSCL = SMCLK/11 = 95.3kHz UCB0BR1 = 0; UCB0I2CSA = 0x48; // Slave Address is 048h UCB0CTL1 &= ~UCSWRST; // Clear SW reset, resume operation IE2 |= UCB0RXIE + UCB0TXIE; // Enable RX interrupt UCB0CTL1 |= UCTXSTT; // I2C start condition while(!flag) { UCB0CTL1 |= UCTXSTT; // I2C start condition } Sergey A. Borshch wrote: Ciaran Davies wrote: |
- [Mspgcc-users] I2C Initialisation Problem Ciaran Davies
- Re: [Mspgcc-users] I2C Initialisation Problem Sergey A. Borshch
- Re: [Mspgcc-users] I2C Initialisation Problem Ciaran Davies
