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: UART receive is interrupted by timer interrupts

Part Number: MSP430F5529

Tool/software: Code Composer Studio

Hello, 

I'm using USCI_A0 to send/receive through UART and timer A0. However, I'm missing some bytes when I receive UART when I have timer interrupts enabled. If they aren't enabled, I have no issues. I thought that UART interrupts are higher priority interrupts which means that this shouldn't really be the case. I'm not sure how to fix this? 

  • Hello Smurflovers, 

    Interrupt servicing is described in section 1.3.4 of the Family User's Guide: http://www.ti.com/lit/ug/slau208q/slau208q.pdf 

    Priority will only matter if the interrupts are fired at the same time before an ISR is serviced.  If this happens, then the higher priority interrupt will be serviced first. 

    By default, interrupt nest is disabled. When an ISR is serviced, the GIE bit is disabled to prevent any other interrupt from interrupting the routine.  So, interrupts are serviced sequentially.     It is possible to re-enable the GIE and have nested interrupts, but you must be very careful that they don't somehow don't interfere.   

    I would probably focus on trying to shorten the Timer ISR or disable when UART is running.  When the timer ISR fires, maybe you can just set a flag and then service the software in your main flow, so that you are always available for a UART ISR. 

    Hope this helps,

    JD  

**Attention** This is a public forum