jtag status contains invalid mode value - communication failure
I am trying to develop a UART protocol using STM32F4xx-Nucleo example.
However, once I put in a printf in main loop to print once a second to PC through USB,
the debugger will have following error after few prints :
Error: jtag status contains invalid mode value - communication failure
Warn : target stm32f4x.cpu is not halted
Polling target stm32f4x.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 stm32f4x.cpu failed, trying to reexamine
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Update : I try different example (Blink LED), result is the same after few minutes, GDB is disconnect.