cancel
Showing results for 
Search instead for 
Did you mean: 

Iam unable to debug STM32 B-L0722Z-LRWAN1 board having onboard STM32L072CZ MCU. It gets programmed but no respose for breakpoints and also unable to suspend

Attaching the log files.

Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-23-20:37)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

srst_only separate srst_nogate srst_open_drain connect_assert_srst

Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

adapter speed: 8000 kHz

adapter_nsrst_delay: 100

Info : Listening on port 6666 for tcl connections

Info : Listening on port 4444 for telnet connections

Info : clock speed 8000 kHz

Info : STLINK v2.1 JTAG v31 API v2 M21 VID 0x0483 PID 0x374B

Info : using stlink api v2

Info : Target voltage: 3.253438

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : Stlink adapter speed set to 4000 kHz

Info : STM32L072CZYx.cpu: hardware has 4 breakpoints, 2 watchpoints

Info : Listening on port 3333 for gdb connections

Info : accepting 'gdb' connection on tcp/3333

target halted due to debug-request, current mode: Thread 

xPSR: 0xf1000000 pc: 0x080021dc msp: 0x20005000

STM32L0: Enabling HSI16

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : Stlink adapter speed set to 4000 kHz

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

adapter speed: 4000 kHz

Info : Device: STM32L0xx (Cat.5)

Info : STM32L flash has dual banks. Bank (0) size is 96kb, base address is 0x8000000

Info : Device: STM32L0xx (Cat.5)

Info : STM32L flash has dual banks. Bank (1) size is 96kb, base address is 0x8018000

Info : Padding image section 0 with 4 bytes

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000000e msp: 0x20005000

Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (3269). Workaround: increase "set remotetimeout" in GDB

Error: jtag status contains invalid mode value - communication failure

Warn : target STM32L072CZYx.cpu is not halted (gdb fileio)

Polling target STM32L072CZYx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 100ms

Info : Previous state query failed, trying to reconnect

Error: jtag status contains invalid mode value - communication failure

Polling target STM32L072CZYx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 300ms

Info : Previous state query failed, trying to reconnect

Error: jtag status contains invalid mode value - communication failure

Polling target STM32L072CZYx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 700ms

Info : Previous state query failed, trying to reconnect

Error: jtag status contains invalid mode value - communication failure

Polling target STM32L072CZYx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 1500ms

Info : Previous state query failed, trying to reconnect

Error: jtag status contains invalid mode value - communication failure

Polling target STM32L072CZYx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 3100ms

Warn : WARNING! The target is already running. All changes GDB did to registers will be discarded! Waiting for target to halt.

Info : Previous state query failed, trying to reconnect

Error: jtag status contains invalid mode value - communication failure

Warn : target STM32L072CZYx.cpu is not halted (gdb fileio)

Polling target STM32L072CZYx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 6300ms

Info : Previous state query failed, trying to reconnect

Error: jtag status contains invalid mode value - communication failure

Polling target STM32L072CZYx.cpu failed, trying to reexamine

Examination failed, GDB will be halted. Polling again in 6300ms

1 ACCEPTED SOLUTION

Accepted Solutions

General things which will give problems are overly high speeds on the SWD port, and the device going into low power modes.

When debugging it is generally advisable to define LOW_POWER_DISABLE

Consider also use of tools like Keil, which has a free license for ST Micro CM0(+) devices, which would include the L0

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

General things which will give problems are overly high speeds on the SWD port, and the device going into low power modes.

When debugging it is generally advisable to define LOW_POWER_DISABLE

Consider also use of tools like Keil, which has a free license for ST Micro CM0(+) devices, which would include the L0

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Fixed.. As you said disabling low power mode was the key.. Since this option was available in many places, was unable to get it done. Changing it in the hw_conf.h finally fixed it