ULINK JTAG communication Failure? HELP!

I have been using the ULINK, uVision3 and the MCB2130 board for a couple months now with no problem. Now I got my first prototype hardware using an LPC2131 and I am not able get the JTAG to work. I get the "JTAG Communication failure" error message. I magically got one to work about 3 times in the past week (3 out of 100). I really can't explain that. I have tried 4 different boards, all the same.

I put the long wait state at the beginning of main. I have tried changing the jumper in the ULINK and all the other suggestions from the Keil knowledgebase.

I have been able to use the Philips utility to load my code in thru UART0, works fine. The LPC2131 boots up and runs great. In my code I spit out lots of messages to the serial port(to hyperTerminal) so I have verified that the processor is running and doing what it is supposed to do (I have verified I2C, SPI, ADC, UART0, GPIO are all working properly). Watchdog is disabled. Low/Idle power mode is not used and disabled and I am not using the RTC.

Everything points to my hardware right!! I know. The one big difference between my hardware and the MCB is clock freq. My board uses a 12.288MHz crystal. I have made the changes to the PLL registers and target freq. I believe all the settings are correct. I use the same interface circuit as the MCB, with 10K pull-ups and pull-downs, with a good clean 3.3V supply.

I think I have verified most of the obvious dumb stuff (famous last words), i.e. shorted/open traces, power, gnd,...etc.

The only idea I am left with is my layout is too long or noisy? Has anyone else experienced this?

I am pretty tight on board space so I don't have room for the big dual row 20-pin header. The ULINK connects to a small dongle board, then a small 14-pin cable takes the signals down to my board. The header on my board is about 1.5 inches away from the LPC2131. Most of the lines are a straight shot, except for the TMS line which runs around and goes under the 12.88MHz crystal and driver. (Yes, I will fix that on the next board spin). Could this less-than-ideal-layout be the problem?????? Should I add buffers to the lines on my dongle board???

Please help. Any input would be greatly appreciated.

Thanks,
Dave Butler

More questions in this forum