Hello
I have trouble using the UART IF on MSP430F1611. I cant send any data (nor receive). The output just doesn’t do anything. Here is my used code for configuration and sending:
int main(void)
{ WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
reseterror();
IOselect(); // Setup of IO config incl. P3OUT = 0x10; P3DIR = 0x1F; P3SEL = 0x03;
CLK_init(); // Sets SMCLK to XT2CLK (7.3728MHz)
.
.
.
// Configuration of UART:
U0CTL |= SWRST;
ME1 |= UTXE0 + URXE0; //Enable USART0 TXD / RXD
U0CTL |= CHAR; // 8 Bit operation
U0TCTL |= SSEL0; // Set SSELx high to switch BRCLK to SMCLK
U0TCTL |= SSEL1; // Set SSELx high to switch BRCLK to SMCLK
//Baudrate = 7.3728MHz / 768 = 9600; 768 = 0x0300
U0BR0 = 0x00;
U0BR1 = 0x03;
U0MCTL =0x00;
U0CTL &= ~SWRST;
IE1 |= URXIE0 + UTXIE0; // vs Rx&Tx interrupt
// Send Loop:
while(1)
{
while(!(IFG1 & UTXIFG0)); //wait until USART0 TX buffer ready
U0TXBUF = 0x61;
while(!(IFG1 & UTXIFG0)); //wait until USART0 TX buffer ready
U0TXBUF = 0x99;
}
}
I would be glad for any help.
Best regards
Chrishen