I am working on a MSP430 connected to the PC via serial. The MSP430 also communicates with some other boards using a bit-banged serial interface. I'm using the timer peripheral to bit bang the serial, and I'm using the UART to talk to the PC.
When commands arrive from the PC, the USCIAB0RX_VECTOR interrupt gets executed, and while it's running, it blocks other interrupts. However, some times my serial RX routine takes a little while, which delays the timer interrupt and throws off the bit-bang interface.
In the serial RX ISR, I would like to allow the timer interrupt to still be serviced, but I would like to prevent the serial RX from interrupting itself (which shouldn't be able to happen for my specific application, but I would like to protect against this just in case)
- Should I simply manually mask the serial RX interrupt in the top of the serial ISR, and then enable global interrupts?
- Do I also need to unmask the serial RX interrupt at the end?
- Do I need to manually clear any interrupt request flags?
After the timer ISR returns, will the serial ISR continue, and then return to the main loop?
Are there any potential race conditions I need to consider?
- Is there a better solution?
- Is there an article about interrupting and interrupt? (i've already read about nested interrupts in the users guide)