Error: jtag status contains invalid mode value

25 May 2017

I am using Nucleo-F411RE board and running AC6 (SystemWorkbench) on Dell Laptop (Window 10). Once every 10 mins the Openocd will have following message, then STM32F4 will RESET.

Error: jtag status contains invalid mode value - communication failure Warn : target STM32L476.cpu is not halted Polling target STM32L476.cpu failed, trying to reexamine Examination failed, GDB will be halted. Polling again in 100ms Info : Previous state query failed, trying to reconnect Polling target STM32L476.cpu failed, trying to reexamine Info : STM32L476.cpu: hardware has 6 breakpoints, 4 watchpoints

I tried various forum but nobody seems to have a clear idea what I could try. Should I buy a new STlink board or new Laptop :(

25 May 2017

I've used several Nucleo boards in SW4STM32 on windows 10 and never ran into this problem. Did you try SW4STM32 1.14 that was released recently? Maybe something is fixed there. It looks like maybe you have a bunch of breakpoints set. Maybe clear all breakpoints and start over again. Maybe go in and delete your Debug Config and start a new one. Could try getting a usb cable with ferrite bead - maybe it's random noise. Or use a really short USB cable.

For me, I don't normally run controller 10mins at a time in debug mode. If my debug session halted after 10mins, no matter what the platform, I can't say I would be surprised. Though yesterday I ran an L476VG board in debug mode for an hour without any problem.

28 May 2017

Finally resolved after weeks of searching various forum.....this is "Dell Support Assist/Agent." After I uninstalled from Laptop, comm error not show up after an hour of running the STlink debugger.

No idea what Dell program doing in the background.