SoC
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
  • Arm Cortex M3
  • Contact
Reading: Could not stop Cortex-M device! Please check the JTAG cable.
SUBSCRIBE
SoCSoC
Font ResizerAa
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Search
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Have an existing account? Sign In
Follow US
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
© S-O-C.ORG, All Rights Reserved.
Arm

Could not stop Cortex-M device! Please check the JTAG cable.

Andrew Irwin
Last updated: September 17, 2023 2:13 am
Andrew Irwin 5 Min Read
Share
SHARE

Seeing the error message “Could not stop Cortex-M device!” when trying to debug or program a Cortex-M chip over JTAG is a common issue that can often be resolved by checking the physical JTAG connections. There are a few key things to check:

Contents
1. Check the JTAG cable2. Check target power supply3. Check target board JTAG pin connections4. Try lower JTAG clock speeds5. Update debugger firmware/software6. Disable other interfaces sharing pins7. Try external JTAG isolators8. Verify target JTAG enable/disable settings9. Check target reset line10. Try JTAG chain re-enumeration

1. Check the JTAG cable

The most likely culprit is a problem with the physical JTAG cable connecting the debugger to the target board. Here are some things to try:

  • Inspect the cable for any obvious damage like cuts or crimps in the wiring.
  • Wiggle and flex the cable while connected to see if the error comes and goes. This can reveal intermittent breaks in the wiring.
  • Try swapping the cable out for a known good one if available.
  • Test the cable continuity with a multimeter to verify there are no opens.

If wiggling the cable makes the error appear/disappear or if cable continuity fails, you likely need a new cable.

2. Check target power supply

Insufficient power to the target board can also cause JTAG communication issues. Verify:

  • The board has a stable 3.3V or 5V power source connected.
  • Power is being properly regulated with capacitors close to the JTAG pins.
  • JTAG pin voltages are at expected levels.

Erratic target power can intermittently disrupt JTAG causing errors. Adding capacitors, checking regs, or fixing power issues may resolve it.

3. Check target board JTAG pin connections

It’s also important to closely inspect the physical JTAG connections between the cable and target board:

  • Verify JTAG pinout and connections match documentation.
  • Check for shorts or incorrect connections, especially around the TCK/TMS pins.
  • Reseat JTAG connectors and reflow solder joints if needed.
  • Inspect pins under a magnifying glass for cracked solder joints or other damage.

With high-speed JTAG signals, even small shorts/disconnects between pins can prevent stable communication.

4. Try lower JTAG clock speeds

Higher JTAG clock speeds can sometimes exceed cable/board capabilities leading to errors. Try lowering debugger JTAG clock speed settings incrementally until communication succeeds. Common speeds to try are 1 MHz, 500 kHz, or lower. If very slow speeds are required it can indicate cabling issues.

5. Update debugger firmware/software

Old or buggy debugger firmware and host software can also be a factor. Ensure you have the latest firmware and software installed. Interface chips like FTDI adapters in particular may require the latest drivers.

6. Disable other interfaces sharing pins

On some boards JTAG pins are shared with other interfaces like SWD, GPIO, SPI, etc. Make sure JTAG has exclusive access to the pins by disabling any other interfaces in firmware or hardware.

7. Try external JTAG isolators

For tricky issues, external JTAG isolators can help by cleaning up signal integrity issues between the debugger and target. They buffer the JTAG signals providing robust communication.

8. Verify target JTAG enable/disable settings

The target Cortex-M device JTAG interface may need to be explicitly enabled in firmware or unlocked. Consult documentation and ensure any required steps to enable JTAG are performed before trying to communicate over it.

9. Check target reset line

The JTAG communication relies on the target being in a stable reset/powered state. Verify the reset line is being held low and not pulsing erratically which could disrupt sync. A pull-down may be needed on reset.

10. Try JTAG chain re-enumeration

For complex JTAG chains with multiple chips, manually initiating a JTAG re-enumeration after connecting can help synchronize communication. The debugger may be getting confused about how many/which devices are in the chain.

Debugging JTAG communication issues takes patience but methodically checking connections, signal integrity, power, and settings will eventually uncover the root cause. Don’t forget to also reach out to the debugger hardware/software vendors for assistance – they may have additional advice for troubleshooting their tools.

With a bit of care to the hardware and configuration, JTAG can be a very reliable debug/programming interface for Cortex-M devices. Taking the time to properly diagnose tricky issues will pay off with a robust JTAG link for future development work.

Newsletter Form (#3)

More ARM insights right in your inbox

 


Share This Article
Facebook Twitter Email Copy Link Print
Previous Article Is it possible to port the DesignStart Eval design to a different FPGA board?
Next Article Cannot Find the Register for the Program Counter in My Cortex-M0
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

2k Followers Like
3k Followers Follow
10.1k Followers Pin
- Sponsored-
Ad image

You Might Also Like

Bootloader Impact on Cortex-M0 PendSV Exception Handling

The ARM Cortex-M0 processor implements the PendSV exception handler to…

8 Min Read

Here are the completed keywords in the requested format

The ARM Cortex series of processors are central processing units…

14 Min Read

Is UART full duplex?

The short answer is yes, UART (Universal Asynchronous Receiver/Transmitter) is…

7 Min Read

Saving Cortex-M4 Processor State for Power-Down and Resume

The Cortex-M4 processor, like most modern processors, supports power-down modes…

6 Min Read
SoCSoC
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
Welcome Back!

Sign in to your account