Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 21936

MSP430FR6989's UCRXIFG0 question in IIC function

$
0
0

In the (eUSCI) – I2C Mode, as the userguide show "The UCRXIFG0 interrupt flag is set when a character is received and loaded into UCBxRXBUF","UCRXIFGx is automatically reset when UCxRXBUF is read".

So I want to check the UCRXIFG0 flag to read the  UCBRXBUF data in the main loop.code is following:

while(1)

{

while(!(UCB0IFG & UCRXIFG0));

RxData = UCB0RXBUF ;

}

But I found it is not successful !!!  

So I check the  UCB0IFG register in the USCI_B0_ISR(void) . I found UCRXIFG0 is set when the UCB0RXBUF is read and UCRXIFG0 is not set when the program into the receive Interrupt service function!!! What's wrong???

 





Viewing all articles
Browse latest Browse all 21936

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>