Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

MSP430F5529: Inconsistent UART data between host controller and CC2650 BLE (NPI Protocol)

$
0
0

Part Number:MSP430F5529

Hope everyone had a good holiday. Happy New Year to the e2e support team.

I currently have a MSP430F5529 design that use P4-5/UCA1RXD (Pin 46)  and  P4-4/UCA1TXD (Pin 45) for UART communication to BoosterXL-CC2650MA. This port is configured for 115200 baud rate. Below is the representative code. 

//------------UART1_Init------------
// Initialize the UART1 for 115,200 baud rate (assuming 24 MHz clock),
// 8 bit word length, no parity bits, one stop bit
// Input: none
// Output: none
void UART1_Init(void) {
	RxFifo_Init();                        // initialize empty FIFO
	USCI_A_UART_initParam param1 = { 0 };
	param1.selectClockSource = USCI_A_UART_CLOCKSOURCE_SMCLK;
	param1.clockPrescalar = 13;
	param1.firstModReg = 0;
	param1.secondModReg = 0;
	param1.parity = USCI_A_UART_NO_PARITY;
	param1.msborLsbFirst = USCI_A_UART_LSB_FIRST;
	param1.numberofStopBits = USCI_A_UART_ONE_STOP_BIT;
	param1.uartMode = USCI_A_UART_MODE;
	param1.overSampling = USCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION;


	if (STATUS_FAIL == USCI_A_UART_init(BLE_BASE_ADDR, &param1)) {
		return;
	}

	//Enable UART module for operation
	USCI_A_UART_enable(BLE_BASE_ADDR);

	//Enable Receive Interrupt
	USCI_A_UART_clearInterrupt(BLE_BASE_ADDR, USCI_A_UART_RECEIVE_INTERRUPT);
	USCI_A_UART_enableInterrupt(BLE_BASE_ADDR, USCI_A_UART_RECEIVE_INTERRUPT);

}

//******************************************************************************
//
//  Interrupt for BLE UART
//
//******************************************************************************
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=BLE_UART_VECTOR
__interrupt
#elif defined(__GNUC__)
__attribute__((interrupt(BLE_UART_VECTOR)))
#endif
void UART1_ISR(void) {
	uint8_t data;
	switch (__even_in_range(BLE_UART_VECTOR_REGISTER, 4)) {
	case USCI_UCRXIFG:	// received character interrupt

		data = USCI_A_UART_receiveData(BLE_BASE_ADDR);
		HW_RxFIFO[HW_RxPutI]=data;
		HW_RxPutI = (HW_RxPutI+1) & (HW_FIFOSIZE - 1);

	case USCI_UCTXIFG:	// transmitted character interrupt, not currently used
		break;

	default:	// shouldn't happen
		break;

	}
}







I have successfully tested the code both RX and TX using the terminal editor. The issue is when I connect to CC2560. I am using the NPI protocol
Question: When communication with CC2650, the UART is inconsistent in reading the data. The data gets lost sometime. Sometimes the data is read accurately. The expect response form the CC2650 is for SNP Power Up



I am wondering if UART is properly configured. I used the information as described at Unified Network Processor Interface to configure the UART port.

Related question: BOOSTXL-CC2650MA: Slave Initiated (SRDY) communication timing values when interfaced to MSP430F5529


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>