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.

CCS/MSP430F5529: How to use SPI and UART together without data lose?

Part Number: MSP430F5529


Tool/software: Code Composer Studio

I'm using MSP430F5529 mcu. there is spi communication for collecting data from sensor. also there is another mcu which is c2000 and it requests data from MSP430 through uart. uart data collect using receiver interrupt. some times uart interrupt the spi data reading. then it records error data. is there any suggestion to make it error free?

  • Hello harshana,

    If we look at the interrupt vector table for the MSP430F5529, depending on which combination of USCI_Ax and USCI_Bx you use, yes the UART will have priority over the SPI.

    Not sure how you implement your functions to read the SPI and UART but one method to prevent UART from interrupting the SPI is to temporarily disable the UART interrupt(s).

    Else you could set a flag variable that indicates whe the SPI is busy and the UART function could then wait until SPI is not busy.

  • Hello harshana,

    I haven’t heard from you for a couple of days now, so I’m assuming you were able to resolve your issue.
    If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

**Attention** This is a public forum