STM32F4 Discovery for STM32F429

Hello,

Trying to setup openOCD on a STM32 F4 Discovery kit, I was faced with following errors (see listing next).

I currently use texane st-flash tool to flash the MCU, but st-util does not start, reporting an error (see issue https://github.com/texane/stlink/issues/322) on that same board.

Thanks in advance for your assistance.

Marc

$ openocd -f interface/stlink-v2.cfg -f board/stm32f429discovery.cfg

Open On-Chip Debugger 0.9.0 (2015-05-19-13:44)

Licensed under GNU GPL v2

For bug reports, read

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

Warn : Interface already configured, ignoring

Error: already specified hl_layout stlink

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

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 v17 API v2 SWIM v0 VID 0x0483 PID 0x3748

Info : using stlink api v2

Info : Target voltage: 2.882256

Error: jtag status contains invalid mode value - communication failure

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

Error: jtag status contains invalid mode value - communication failure

Polling target stm32f4x.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 stm32f4x.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 stm32f4x.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 stm32f4x.cpu failed, trying to reexamine

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

Info : Previous state query failed, trying to reconnect

Error: jtag status contains invalid mode value - communication failure

Polling target stm32f4x.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 stm32f4x.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 stm32f4x.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 stm32f4x.cpu failed, trying to reexamine

Please could somebody help, it is really frustrating to get stuck on setting up a dev environnement ? Thanks

I upgraded the ST Link firmware from Linux using the ST supplied Java package (V2.J17 => V2.J24). So it seems my hardware and Linux conf are OK.

However the problem remains the same:

$ openocd -f board/stm32f429discovery.cfg

Open On-Chip Debugger 0.9.0 (2015-05-19-13:44)

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

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 v24 API v2 SWIM v0 VID 0x0483 PID 0x3748

Info : using stlink api v2

Info : Target voltage: 2.885933

Error: jtag status contains invalid mode value - communication failure

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

I think I found the reason. See http://nuttx.org/doku.php?id=wiki:howtos:jtag-debugging