Part Number: MSP432P4111
Hi,
I am working in a custom board developed for msp432p4111 the controller was working fine, i tried to debug a sample code for uart protocol now i am getting an error "Error connecting to the target: Unknown devic"
i have attached my sample code
#include <msp432p4111.h>
#include <stdint.h>
int main()
{
WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD;
/******************* Clock Module ****************************************/
CS->KEY = 0x0000695A;
CS->CTL0 = 0x00050000;
CS->KEY = 0x00000000;
/******************** UART Module*****************************************/
uart_a0();
}
int uart_a0(int Ua0_data)
{
CS->KEY = 0x0000695A;
CS->CTL0 = 0x00030000;
CS->KEY = 0x00000000;
P1->SEL0 = 0x03; //GPIO set for UART
EUSCI_A0->CTLW0 = 0x0001; //UART reset
EUSCI_A0->CTLW0 = 0x0021; //SMClk selected
EUSCI_A0->BRW = 0x004E;
EUSCI_A0->MCTLW = 0x0021; //Setting for 9600 baud rate
EUSCI_A0->CTLW0 = 0x0000; //UART ready to transmit and receive
/************************* Uart Transmit *****************************
while(1)
{
EUSCI_A0->TXBUF = Ua0_data;
}*/
/*************************Loop Back ***********************************/
while(1)
{
EUSCI_A0->STATW = 0x0080;
}
}