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.

MSP430G2553: I2C and UART shared interrupt vector

Part Number: MSP430G2553

Hi All,

I am using an MSP430G2553 along with a three axis accelerometer.

The microcontroller communicates with the accelerometer via I2C (set up routine, axis data, activating/ deactivating interrupts etc...), meanwhile I am trying to send XYZ data out over the UART to the PC for analysis via a terminal app. In other words there is always 2-way I2C communication (RX and TX) between the uC and accelerometer and constant one way comms to the PC from the uC via the UART.

Unfortunately (for me) the I2C and UART share the same interrupt vector (#pragma vector=USCIAB0TX_VECTOR). I am struggling to get this working properly with the info given in the datasheet/ peripheral guide. I assume there is a flag somwhere that indicates if the I2C/ UART is in use but i cannot find it.

I would appreciate some help if possible,

Thanks very much in advance.

  • Hello Richard,

    Even though both the USCIA and USCIB peripherals share the same interrupt pragma on this device, the TX and RX flags are different bits in the SFR (register). You would need to do either flag checks within the interrupt vector to see which peripheral is doing the interrupt or a switch/case for each bit to see if which is giving you the interrupt.

    Please see the I2C or UART Standard examples in the example code link below for examples on how to do the flag checks.
    dev.ti.com/.../

**Attention** This is a public forum