Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 8 months ago.
LPC1768FET100 100TFBGA cannot enter SWD/JTAG debug mode
i have the following::
1) LPC1768FET100 100TFBGA chip on my final board
2) LPC1768FBD100 100LQFP chip on my protoboard
and running LPCXpresso 7.0 to use the JTAG/SWD function. proto and final boards are electrically equivalent
Both are running: USBSerial_HelloWorld - main.cpp code http://mbed.org/handbook/USBSerial
the JTAG/SWD works on LPC1768FBD100 100LQFP, but gets stuck on USB configuration with LPC1768FET100 100TFBGA. how come i cannot use JTAG/SWD on LPC1768FET100 100TFBGA? I ohmed out and tripled checked the signal paths. I can use JTAG to flash the *.bin on both proto and final.
the code below is where it gets stuck in the USBDevice.cpp. anyone know why i cannot get JTAG/SWD to work on the ball grid array version of the LPC1768?
USBDevice.cpp
void USBDevice::EP0in(void) { #ifdef DEBUG printf("EP0IN\r\n"); #endif /* Endpoint 0 IN data event */ if (!controlIn()) { /* Protocol stall; this will stall both endpoints */ EP0stall(); } } bool USBDevice::configured(void) { /* Returns true if device is in the CONFIGURED state */ return (device.state == CONFIGURED); //GETS STUCK HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! } void USBDevice::connect(void) { /* Connect device */ USBHAL::connect(); /* Block if not configured */ while (!configured()); }
3 Answers
10 years, 8 months ago.
You do know where it gets stuck, but how is that related to the jtag? It will get stuck there when it doesn't have a USB connection to a host PC. So you probably need to quadrupple check that connection, including the resistors.
10 years, 8 months ago.
it gets stuck at the code posted above where it says "GETS STUCK HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" at a section of USBDevice.cpp.
i have 100K pullup to 3.3V at the JTAG connections: TCK, TMS, TDI, TRST,
i am able to successfully flash the LPC1768 BGA, but not able to run Debug mode. not sure which pins JTAG uses on flashing only. was assuming the same.
the above schematic uses LPC1768FET100 100TFBGA
10 years, 8 months ago.
Are you able to use debug on code that does not use the USB. Note that default the SWD port is used for Cortex M3 rather than JTAG. The USB lib may have changed clock settings which do not match SWD. There are some clock settings for the SWD mode of the programmer in lpcxpresso. Other reasons why SWD/JTAG could fail is when code protection bits are set.
<<quote>>Are you able to use debug on code that does not use the USB.<</quote>>
yes. works fine without USBserial library
<<quote>>The USB lib may have changed clock settings which do not match SWD. There are some clock settings for the SWD mode of the programmer in lpcxpresso.<</quote>>
So i changed the lpcxpresso wire speed to 1000. see similar below. but for LPC1768.
http://host.lpcware.com/system/files/lpc812_debug.PNG
the code still gets stuck at the same location. see 1st post.
<<quote>>Other reasons why SWD/JTAG could fail is when code protection bits are set.<</quote>>
Using the same code, If i am able to get into debug mode using a protoboard that uses LPC1768FBD100 100LQFP, bbut fails the debug mode with LPC1768FET100 100TFBGA by getting stuck (see 1st post) then this rules out the code protection bits being set. correct?