STM32F4 JTAG: first tests

The FLRe p1 microcontroller board is finished and ready for tests. First test? Trying to get the CPU chip id over JTAG.

The target board uses a custom 0.5" JTAG header. Some home-made adapter are needed.

Open On-Chip Debugger 0.8.0 (2014-05-10-23:20)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m reset_config sysresetreq
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : J-Link initialization started / target CPU reset initiated
Info : J-Link ARM V8 compiled Sep 20 2012 13:27:01
Info : J-Link caps 0xb9ff7bbf
Info : J-Link hw version 80000
Info : J-Link hw type J-Link
Info : J-Link max mem block 9312
Info : J-Link configuration
Info : USB-Address: 0x0
Info : Kickstart power on JTAG-pin 19: 0xffffffff
Info : Vref = 3.196 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 0 TRST = 0
Info : J-Link JTAG Interface ready
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: stm32f4x.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x7 in JTAG-DP transaction

Unfortunately, the chip does not reply.

Output of a working target board:

Open On-Chip Debugger 0.8.0 (2014-05-10-23:20)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m reset_config sysresetreq
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : J-Link initialization started / target CPU reset initiated
Info : J-Link ARM V8 compiled Sep 20 2012 13:27:01
Info : J-Link caps 0xb9ff7bbf
Info : J-Link hw version 80000
Info : J-Link hw type J-Link
Info : J-Link max mem block 9312
Info : J-Link configuration
Info : USB-Address: 0x0
Info : Kickstart power on JTAG-pin 19: 0xffffffff
Info : Vref = 3.267 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 0 TRST = 0
Info : J-Link JTAG Interface ready
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints

Maybe I damaged the chip at first start-up because I noticed that one ground plane was floating and not connected to the others. The voltage regulator had no actual ground and outputed something like 4.20V which is outside the maximum specs of the chip.

From [1] (rev. 5, p. 77):

Check list for future reference

If the microcontroller does not respond:

  • check the power supply on each VDD pin. Note: even if the ADC is not used, its power pin VDDA must be supplied (see screenshot above, All main power (VDD, VDDA) and ground (VSS, VSSA) pins must always be connected to the external power supply, in the permitted range).
  • check that the JTAG lines actually arrive to the correct pins of the chip.
  • check the ground connection VSS (and VSSA), and check that the ground planes are actually connected together (on a blank PCB, since the chip will connect them together once soldered).

References

[1]ST, STM32F405xx and STM32F407xx datasheet, http://www.st.com/web/en/resource/technical/document/datasheet/DM00037051.pdf