hello,
I am a new user of microcontroller msp430fr5969 and I need help in programming the uart. and i want to connect the msp430 with a bluetooth (PAN1026).
when I use a terminal to see what I get , I find þþþþþþþþþþþþþþþþþþ.
here is my code
#include "driverlib.h"
unsigned char TCU_HCI_RESET_REQ[4] = {0x01, 0x03, 0x0c, 0x00};
unsigned char i;
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop Watchdog
P2SEL1 |= BIT5 | BIT6; // Configure UART pins
P2SEL0 &= ~(BIT5 | BIT6);
// Disable the GPIO power-on default high-impedance mode to activate
// previously configured port settings
PM5CTL0 &= ~LOCKLPM5;
// Configure USCI_A0 for UART mode
UCA1CTL1 |= UCSWRST;
UCA1CTL1 = UCSSEL__ACLK; // Set ACLK = 32768 as UCBRCLK
UCA1BR0 = 3; // 9600 baud
UCA1MCTLW |= 0x5300; // 32768/9600 - INT(32768/9600)=0.41
// UCBRSx value = 0x53 (See UG)
UCA1BR1 = 0;
UCA1CTL1 &= ~UCSWRST; // release from reset
UCA1IE |= UCRXIE; // Enable USCI_A1 RX interrupt
USART1_SendData(TCU_HCI_RESET_REQ,4);
}
void USART1_SendByte (unsigned char data) {
while(!(UCA1IFG & UCTXIFG));
UCA1TXBUF = data;
}
void USART1_SendData (unsigned char data[], unsigned char length) {
unsigned char i;
for(i=0; i<length; i++) {
USART1_SendByte(data[i]);
}
}


