Quantcast
Viewing all articles
Browse latest Browse all 63778

Forum Post: RE: I want to receive a string or a character through UART in msp430g2553 but not able to receive even a single character it. If a character arrives my IFG2 flag is not getting set so what should i do in this code ?

The last thing UART_INIT does is put the MCU to sleep (CPUOFF). Your program will not proceed from here: 1) RXIE isn't set, so even if a character arrives you won't reach the ISR 2) The ISR doesn't do a wakeup (LPM0_EXIT) so the foreground will stay asleep. Also, make sure "check" and "rx_char" are declared "volatile". How are you doing the RS232 conversion? Double check the TX/RX pin definitions for your converter, since different chips use different conventions.

Viewing all articles
Browse latest Browse all 63778

Trending Articles