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.

MSP430F2619: Can't set clear some registry bits of USCIA1 (UART mode)

Part Number: MSP430F2619

Hello everyone

I'm working on a project were I want to use the USCIA1 in UART mode to send some information to a pi.

Sending and receiving should be done by interrupts but this didn't work.

While debugging I noticed that the UCA1RXIE / UCA1TXIE are never set and the UCSWRST bit is never cleared. Going through the code step by step the microcontroller seams to just ignore the those lines, meaning that the debugger showes that the registers are unchanged afterwards.

The compiler is set to no optimisations and the lines seem to be executed but don't have any effect.

Following is the in my opinion relevant part of the code:

	//initialize RX
	setValue(&gUartRx, false);				//sets pin to 0
	setMode(&gUartRx, special);				//sets pin mode to use for peripheral
	//initialize TX
	setValue(&gUartTx, false);			//sets pin to 0
	setMode(&gUartTx, special);			//sets pin mode to use for peripheral

	//configure UART
	UCA1CTL1 |= UCSWRST;											//allready set
	UCA1CTL1 |= UCSSEL_2;				//set USCI Clock 1 for UART (SMCLK)

	UCA1BR0 = 0x08;					//baud-rate low-byte	(115200 baud)
	UCA1BR1 = 0x00;					//baud-rate high-byte
	UCA1MCTL = UCBRF_11 | UCOS16;			//modulation 11 , oversampling*/

	UCA0CTL1 &= ~UCSWRST;       			//enable UART						//does not work

	UC1IE |=  UCA1RXIE;				//enable read interrupt					//does not work
}

the comments further right are supposed to  clarify the lines I have problems with.

The main clock is set to 16MHz

_EINT() is set in a prior function.

I hope someone is able to help me.

Best regards

  Matthias

**Attention** This is a public forum