lpcware

LPC812(OM13069 Smartphone Quick-Jack solution) can't download code to flash

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Apr 27, 2017 by HOU BO
Content originally posted in LPCWare by j800514 on Sun May 29 19:00:34 MST 2016
HI

I use LPC-Link2 to download code to flash on OM13069 board

Used in the past are normal about NXP source code provided

But after I add UART function in source code,i can not download to board

It seems to find chips

In the keil Error message :JTAG/SWD Communication Failure

P.S. Other same board is the normal use , alone after increase UART Board is bad

what can i  solve about SWD can't debug the board ? 


there is my add to uart code:

void UART_Init(void)
{
LPC_SWM->PINENABLE0=(18uL<<24) | (19uL<<16) | (10uL<<8) | (4uL<<0);
//LPC_SWM->PINENABLE0 |= (1uL<<0);

LPC_SYSCTL->SYSAHBCLKCTRL |= (1uL<<14);
LPC_SYSCTL->PRESETCTRL &= ~(1uL<<3);
LPC_SYSCTL->PRESETCTRL |= (1uL<<3);

LPC_SYSCTL->UARTFRGDIV=0xFF;
LPC_SYSCTL->UARTFRGMULT=207;
LPC_SYSCTL->UARTCLKDIV=18;  //baudrate:115200bps

LPC_USART0->CFG &= ~(1uL<<0);
LPC_USART0->BRG = 0;
LPC_USART0->CFG = (1uL<<0) | (1uL<<2);
}



I think I can use ISP to repair it , is right ?

but i don't know what to do it on this board

Outcomes