This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear All,
I am trying to set baud rate on MSP430F47127 and having problem.
Clock = 4194304
SCFI0 = FLLD_4+FN_4;
SCFQCTL = 31; // (31+1) * 32768 * 4 = 4194304
I am trying to set baud to 9600
P1SEL |= BIT6+BIT7; // P1.6,7 = USCI_A1 RXD/TXD
UCA1CTL1 |= UCSSEL_2; // CLK = SMCLK
UCA1BR0 = 0xB4;
UCA1BR1 = 0x01;
UCA1MCTL = 0xDF;
UCA1CTL1 &= ~UCSWRST; // Initialize USCI state machine
UC1IE |= UCA1RXIE ; // Enable USCI_A0 RX interrupt
But it is not working.
I have also tried :
P1SEL |= BIT6+BIT7; // P1.6,7 = USCI_A1 RXD/TXD
UCA1CTL1 |= UCSSEL_1; // CLK = ACLK
UCA1BR0 = 0x03;
UCA1BR1 = 0x00;
UCA1MCTL = 0x29;
UCA1CTL1 &= ~UCSWRST; // Initialize USCI state machine
UC1IE |= UCA1RXIE ; // Enable USCI_A0 RX interrupt
But unfortunately it also not working.
However when I tried to set to 19200 baud rate, it worked.
P1SEL |= BIT6+BIT7; // P1.6,7 = USCI_A1 RXD/TXD
UCA1CTL1 |= UCSSEL_2; // CLK = SMCLK UCSSEL_2
UCA1BR0 = 0xDA;
UCA1BR1 = 0x00;
UCA1MCTL = 0xAA;
UCA1CTL1 &= ~UCSWRST; // Initialize USCI state machine
UC1IE |= UCA1RXIE ; // Enable USCI_A0 RX interrupt
But i need to set it on 9600 baud rate. Please help.
Thanks in advance.
Hi Suman,
Try
UCA1BR0 = 180
UCA1BR1 = 1
UCA1BRF = 0
UCA1BRS = 7
I found these using the baudrate calculator: processors.wiki.ti.com/.../USCI_UART_Baud_Rate_Gen_Mode_Selection
Also you may want to have a look at this appnote for common problems with the (e)usci: www.ti.com/lit/slaa734
**Attention** This is a public forum