I use the LPC2294, make a project with ARTX and use the ULink to debug. In the Startup.s, the default VPB Clock=CPU Clock/4, when I change it to 'VPB Clock=CPU Clock', then the problem come. After I push the button of 'Start/Stop Debug session' the program load to the flash and get the error 'Couldn't stop ARM device! Please check the JTAG cable'. But After I erase the 2294, I set the 'VPB Clock=CPU Clock/4' and Debug again, no such problem. So I want to know whether the ARTX support 'VPB Clock=CPU Clock'? Or the Ulink don't support 'VPB Clock=CPU Clock' whe use the ARTX?
nobody meet this problem?
Sorry, we never saw this problem before. I guess that the device has some limitations regarding VPB clock. I have doubts that this problem refers to ARTX. Instead you should consult the current Philips datasheet. Reinhard
But if I don't use the ARTX, the debug is OK. I can set 'VPB=CPU Clock' or 'VPB Clock=CPU Clock/2' in the Startup.s. Or I can just set 'VPBDIV=1' or 'VPBDIV=2' in the main function. But when I use the ARTX, the VPB should equal to CPU Clock/4, not equal to CPU Clock or CPU Clock/2, also never set 'VPBDIV=1' or 'VPBDIV=2' in the main function or the task function, otherwise the error 'Couldn't stop ARM device! Please check the JTAG cable' come into being. So I think that the device has no limitations regarding VPB clock but the problem of ARTX. Another instance is after the error come I must use the series(UART0) to erase the chip, otherwise I can not load the program to the chip by the Ulink.
I doubt that this problem refers to ARTX. But if so, that means if we choose ARTX the VPB clock must be CPU clock/4, not more and not less? Can keil fix this problem?
There is an Errata on the Philips LPC2294 please refer to the Philips site for more informations. For the VPB register there is a bad value returned under certain states. It's a good thing reading the VPB register at least two times to get a good value! I'm using a LPC2294 too but I have to test the ARTX on my board. Is it possible that the hardware bug occurs when the ULINK try to identify clocks on the target board/chip to synchronize the execution to the program source code ?
It seems that the problem is related to the RESET behaviour of the device. We are investigating into a similar problem in the moment which is related to the MAM setup. When you insert the code from: http://www.keil.com/support/docs/2767.htm into the main function, the startup works. Reinhard
The way really do! You help me again. Reinhard, Thank you very much.
We know in the meantime why the problem happens. Some Philips variants do not provide a feature to stop the device at RESET (see: http://www.keil.com/support/docs/2767.htm). The LPC2129 is such a device. When you startup the board using ULINK, then ULINK corrects back the PC value to 0. However the timer interrupt is already running. During initialization the data become inconsistent, but the timer interrupt forces a task switch (which causes the system to hang). So the work-around for the startup behaviour definitely fixes this problem. Reinhard