Dear all,
I am working on MCB1768/keil uVision with my students for 2 years now, and we use ULINK2 to programm the board. Sometimes, a student (accidentally) push the reset button of a board while the programm is loading in the target. After that, it is no more possible to load anything, and the debug is also no more possible. The error message is "Could not stop Cortex-M device, Please check the Jtag cable". I know that the problem is with the board (not the ulink probe or the cable), as the problem is still here when I try to download the code with other probes or cable... even with Ulink-ME. I have tried different solutions found on the net (change clock, JTAG/SW mode...) but nothing seems to work. As I have now 5 boards with such problem, I ask you if you have an idea to make the boards work again... Thank you. Best regards,
Try alternate connection options, ie Connect Under Reset. If the is a BOOT mode of some description, try using that.
This type of thing frequently happens if your code breaks the debug interface pins (GPIO), or puts the device is some low power mode.
Try starting the boards in ISP mode. I.e., Press INT0 button and press reset. Release the INT0 button after reset has been released. Make sure the INT0 jumper is populated. This should initialize the boards in ISP mode which should allow the debugger to go in and reprogram the device. You could also program the boards via serial port ISP using Flash Magic. If you use Flash Magic make sure the ISP and RST jumpers are also populated.
Thank you for your answer.
-> Try alternate connection options, ie Connect Under Reset. I have tried that, then I get a "JTAG communication failure" (if JTAG connection) or "Can not acces Memory" (if SW)... The problem looks similar to the one presented in: community.nxp.com/.../443998 (same issue than what is presented in the word attached file, depending on the connection choice)
-> If the is a BOOT mode of some description, try using that. I am sorry I do not know what you are talking about. Where is the corresponding menu in uVision?
Thank you.
-> Try starting the boards in ISP mode. I.e., Press INT0 button and press reset. Release the INT0 button after reset has been released. Make sure the INT0 jumper is populated. This should initialize the boards in ISP mode which should allow the debugger to go in and reprogram the device.
Is there a way to see if I am in ISP mode? I have tried your proposition, but the error message is still the same :/ (reset and Int0 jumpers are present)
-> You could also program the boards via serial port ISP using Flash Magic. If you use Flash Magic make sure the ISP and RST jumpers are also populated.
I have never done that. I will download Flash magic and try to understand how it works.
For flash Magic, just to be sure, before doing something wrong: - I place a serial cable between my PC and the MCB1768 COM0 - I go in ISP mode with the INT0/reset trick - I load with flash Magic one of my project hex file in the MCB target - I can again use the U-link2 for next code loading in the target. Can you confirm me all of these steps? Thank you. Best regards,
>>I am sorry I do not know what you are talking about. Where is the corresponding menu in uVision?
This is a going to be a board/chip level option, not Keil. Review the documentation for the part for a BOOT or ISP mode, ie where it runs a System Loader, or equivalent from ROM in the device.
JTAG connectivity will require a full complement of pins, SWD typically needs just the SWDIO/SWCLK. Having NRST connected can be critical in these difficult situations, as will a working familiarity with the parts and tools you are using.
RE: ISP, Yes, that is the correct hookup.