0

for some reason I cannot flash my Nucleo (STM32F446) board anymore. It used to work well... I got the following message:

openocd -f ./cfg/openocd.cfg -c "program ./build/ch.elf verify reset" -c "shutdown"
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
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 v34 API v2 SWIM v25 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.247800
Error: init mode failed (unable to connect to the target)
in procedure 'program' 
in procedure 'init' called at file "embedded:startup.tcl", line 506
in procedure 'ocd_bouncer'
** OpenOCD init failed **
shutdown command invoked

Makefile:210: recipe for target 'flash' failed
make: *** [flash] Error 1

Also when I am issuing:

telnet localhost 4444

I get:

Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

When I plug my Nucleo board I can see its build version etc. Strange.

Edit: LD1 is solid when the board is plugged. I think it should normally be blinking red.

1
  • Can it be dead if I can see the device on my computer ?
    – Florian K
    Commented Aug 5, 2019 at 18:12

1 Answer 1

0

I used st link utility which is a windows program provided by st.

It allowed me to erase and reflash the mcu using SWD interface.

The reason behind my problem was I ticked the Set all free pins as analog to optimize power consumption before generating my project files with CubeMX. It actually broke the boot config as BOOT0 pin was set to analog.

TLDR: don't tick Set all free pins as analog in CubeMX

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .