Part Number: MSP430FR2355
Tool/software: Code Composer Studio
I have a UART ISR....Within the receive portion I increment a counter and then wake up from LPM3 to process then go to sleep and wait for next incoming rx data.....I have a logic analyzer connected to the data streams (tx and rx) and am monitoring them....My first rx stream coming in is "ER_CMD#P9"... I am seeing two strange results:
1. if I place a breakpoint on __bic_SR_register_on_exit(LPM3_bits); within the rx ISR, the first time through my counter reads 1 yet my RXBUFFER register shows 9?? This is after a reset AND it is the only thing I am receiving in the code. How is this possible?
2. Within main I go to sleep then wait to be woken from the rx ISR at which point I have the command
if (UCA1IFG & UCRXIFG) {
within here the first thing I do is read RXBUFFER. Two concerns here firstly I never break within this which seems to imply the second thing which is according to the USER GUIDE the way you clear the IFG is to read RXBUFFER but it seems to clear on it's own by entering and exiting out of the ISR WITHOUT reading the buffer.....Please comment??
Thanks