Part Number: MSP430F2274 Tool/software: TI C/C++ Compiler Hello All, I am trying to do serial communication where I would like to share TX and RX on the same pin for MSp430F2274 . I have done the transmission part. Now, msp is in LPM and waiting for any data to receive. Can someone guide me what am I missing? bool uart_getc(unsigned int *c) { if (!hasReceived) { __bis_SR_register(CPUOFF + GIE); return false; } *c = RXByte; hasReceived = false; return true; } void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT BCSCTL1 = CALBC1_1MHZ; // Set range DCOCTL = CALDCO_1MHZ; // SMCLK = DCO = 1MHz uart_config(); __bis_SR_register(GIE); // interrupts enabled unsigned int c; for(int i = 0; i > 1; bitCount --; } } else { CCR0 += BIT_TIME; // Add Offset to CCR0 if ( bitCount == 0) { TACTL = TASSEL_2; // SMCLK, timer off (for power consumption) CCTL0 &= ~ CCIE ; // Disable interrupt isReceiving = false; P1IFG &= ~RXD; P1IE |= RXD; // enabled RXD interrupt if ( (RXByte & 0x201) == 0x200) { RXByte = RXByte >> 1; RXByte &= 0xFF; hasReceived = true; } __bic_SR_register_on_exit(CPUOFF); } else { if ( (P1IN & RXD) == RXD) { RXByte |= 0x400; } RXByte = RXByte >> 1; // Shift the bits down bitCount --; } } } Appreciate your help!
↧