Other Parts Discussed in Thread: MSP430F5338
Hello
I am using MSP430F5338 UART OF USCI_A0.
I have configure Port 2 pins for TX and RX using PORT mapping functions.
I have used ACLK 32768hz.
I want to transmit only one byte on uart . But my code is not working .
UCSCTL4=SELA_2; //SELECT REFOCLOCK 32768hz FOR ACLK
P2SEL |=BIT4+BIT5; //FOR PORT MAPPING FUNCTION;
PMAPKEYID=0X02D52; //ENABLE WRITE ACCESS TO PORT MAPPING REGISTERS;
if (!(PMAPCTL & PMAPLOCKED))
{
P2MAP4=PM_UCA0TXD; // P2.4 CONFIGURE FOR TX
P2MAP5=PM_UCA0RXD; // P2.5 CONFIGURE FOR TX
}
UCA0CTL1=UCSSEL_1; //ACLK CLK
UCA0BR0=0X03; // FOR BAUD RATE 9600
UCA0BR1=0X00;
UCA0MCTL=0X4A; //MULTIPLICATION FACTOR 4A
UCA0IE=UCTXIE+UCRXIE; //ENABLE INTERRUPTS
UCA0CTL1&=~UCSWRST; //CLEAR RST FOR UART OPERATION
while(!(UCA0IFG&UCTXIFG)); //CHECKING TRANSMIT FLAG
UCA0TXBUF=0xAB; //SENDING BYTE
while(!(UCA0IFG&UCTXIFG));
Pls let me know where is the problem in this approch?
Manish