AnsweredAssumed Answered

OM13069 Smartphone Quick-Jack solution(LPC812) 無法調試(SWD)

Question asked by lpcware Employee on Jun 15, 2016
Latest reply on May 1, 2017 by jeremyzhou
Content originally posted in LPCWare by j800514 on Sun May 29 20:23:29 CDT 2016
OM13069 Smartphone Quick-Jack solution(LPC812) 無法調試(SWD)

使用NXP所提供原始碼進行修改,在加入UART程序後進行SWD調試後再也無法偵測到晶片

KEIL顯示錯誤:SWD/JTAG Communication Failure

使用其他未增加UART功能板子是可以正常做SWD調試的

請問我的板子發生了什麼事?  要如何解決?

下面是我新增的UART CODE

void UART_Init(void)
{
LPC_SWM->PINENABLE0=(18uL<<24) | (19uL<<16) | (10uL<<8) | (4uL<<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);
}

Outcomes