This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Could not stop Cortex-M device

I am having trouble running the debugger on a STM32F205ZG using µVision4 and the ULINK2. I keep getting the error message "Could not stop Cortex-M device! Please check the JTAG cable." I am using the SW port. Any help with this would be greatly appreciated.

Parents
  • Actually I've seen this behaviour a few times on NXP devices using uLink, and have been able to erase and re-program them with LPCXpresso, after which the uLink works fine.

    The problem was that the code loaded in flash was faulty and was placing the CPU into a busy loop branching back to the same address, this prevented the debugger accessing the bus.

    the uLink worked if I put the device into ISP mode as it never got to the user code.

    it seems that uLink takes too long to halt the device after reset, the spec tells you this somewhere, so by the time uLink tries to halt the CPU it is too late as it cannot access the bus and locks up.

    so it may be that the uLink was not faulty, but the timing was simply marginal.

    a simple fix is to code a delay in your startup code long enough to guarantee that uLink can stop the CPU before it crashes.

    regards

    Phil.

Reply
  • Actually I've seen this behaviour a few times on NXP devices using uLink, and have been able to erase and re-program them with LPCXpresso, after which the uLink works fine.

    The problem was that the code loaded in flash was faulty and was placing the CPU into a busy loop branching back to the same address, this prevented the debugger accessing the bus.

    the uLink worked if I put the device into ISP mode as it never got to the user code.

    it seems that uLink takes too long to halt the device after reset, the spec tells you this somewhere, so by the time uLink tries to halt the CPU it is too late as it cannot access the bus and locks up.

    so it may be that the uLink was not faulty, but the timing was simply marginal.

    a simple fix is to code a delay in your startup code long enough to guarantee that uLink can stop the CPU before it crashes.

    regards

    Phil.

Children