HomeBlogMagic

STM32F4xx debug settings

Troubleshooting

Settings for STM32F407VET

copy /usr/share/openocd/scripts/board/stm32f4discovery.custom.cfg /usr/share/openocd/scripts/board/stm32f4discovery.cfg

Now change reset_config srst_only to reset_config srst_nogate

Default openocd config not working

Error happened on STM32F407VET Boarde with external ST-LINK V2

Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Started by GNU ARM Eclipse
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v29 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.151358
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x10076413
Info : flash size = 512kbytes
undefined debug reason 7 - target needs reset
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
Error: timed out while waiting for target halted
TARGET: stm32f4x.cpu - Not halted
in procedure 'reset' 
in procedure 'ocd_bouncer'

target halted due to debug-request, current mode: Thread 
xPSR: 0x61000000 pc: 0x080074fe msp: 0x2001c360
semihosting is enabled
Warn : No RTOS could be auto-detected!
Warn : No RTOS could be auto-detected!
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
Error: timed out while waiting for target halted
TARGET: stm32f4x.cpu - Not halted
in procedure 'reset' 
in procedure 'ocd_bouncer'

Error: Target not halted
Error: failed erasing sectors 0 to 5
Error: flash_erase returned -304
Info : dropped 'gdb' connection

Look at ## Settings for STM32F407VET

Permalink: https://adirmeier.de/Blog/ID_326
Tags: Blog, STM32F4von am 2020-06-28