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.

MSP430FR6043: i2c slave example for reading from master

Part Number: MSP430FR6043
Other Parts Discussed in Thread: MSP430WARE, MSP430FR50431, MSP430FR6047

hi 

TI has the following slave code msp430fr6043_euscib0_i2c_11.c which writes to a master, i just snipit the ISR for reference.

    switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
    {
        case USCI_NONE:          break;     // Vector 0: No interrupts
        case USCI_I2C_UCALIFG:   break;     // Vector 2: ALIFG
        case USCI_I2C_UCNACKIFG: break;     // Vector 4: NACKIFG
        case USCI_I2C_UCSTTIFG:  break;     // Vector 6: STTIFG
        case USCI_I2C_UCSTPIFG:             // Vector 8: STPIFG
            TXData = 0;
            UCB0IFG &= ~UCSTPIFG;           // Clear stop condition int flag
            break;
        case USCI_I2C_UCRXIFG3:  break;     // Vector 10: RXIFG3
        case USCI_I2C_UCTXIFG3:  break;     // Vector 12: TXIFG3
        case USCI_I2C_UCRXIFG2:  break;     // Vector 14: RXIFG2
        case USCI_I2C_UCTXIFG2:  break;     // Vector 16: TXIFG2
        case USCI_I2C_UCRXIFG1:  break;     // Vector 18: RXIFG1
        case USCI_I2C_UCTXIFG1:  break;     // Vector 20: TXIFG1
        case USCI_I2C_UCRXIFG0:             // Vector 22: RXIFG0
            break;
        case USCI_I2C_UCTXIFG0:             // Vector 24: TXIFG0
            UCB0TXBUF = TXData++;
            //toggle LED
            P1OUT ^= BIT5;          // Toggle LED P1.5
            break;
        case USCI_I2C_UCBCNTIFG: break;     // Vector 26: BCNTIFG
        case USCI_I2C_UCCLTOIFG: break;     // Vector 28: clock low timeout
        case USCI_I2C_UCBIT9IFG: break;     // Vector 30: 9th bit
        default: break;
    }

i am looking for snippet that reads a byte from master.

thanks,

**Attention** This is a public forum