I'm programming an MSP430FR5949 and I've been trying every which way to get a UART interrupt handler to receive data while in a low power mode. I can transmit with no problem: stick a byte in the buffer and sleep until the buffer empty interrupt wakes up the routine. But with receive I just can't get it to work. If I stay awake and just poll for the receive buffer to be full I have no problem, but if it go to any low power mode and wait for the interrupt to wake up from an RX interrupt I get garbage. Instead of the 15 bytes being sent I get perhaps 6 and the data is garbage. If confirmed this by having a very short interrupt routine that simply stores the received byte in a buffer and increments a buffer counter. So the interrupt routine itself can store all the bytes I'm receiving. If the main program goes into a low power mode (it doesn't matter which one), the interrupt routine doesn't work. If I switch the low power mode command to while(1) and just put the program into an endless loop the interrupt routine works flawlessly. My UART is running at 115Kbaud. If tried DCO and MCLK speeds of 1MHz, 4MHz and 8MHz. The Uart is running of the SMCLK at 1MHz.
I've seen a comment in another forum that said: "If you are using the DCO as the clock source for the UART then it is likely drifting like ours was. If the system wakes up in your main loop and goes back to sleep before three clock cycles of the DCO reference clock then the FLL will incorrectly set the DCO." I'm wondering if this is my problem. I don't really understand what this comment is saying, and have even less of an idea of how to get around this problem. I've seen mention by other folks that have a problem with receiving in sleep mode, and I haven't yet found any sample programs that do it. Any assistance would be very much appreciated.