AnsweredAssumed Answered

JTAG unable to attach to CPU

Question asked by kihlmark.richard on Mar 8, 2013
Latest reply on Mar 9, 2013 by kihlmark.richard
Hello ST community, first forum post...

We're having problems with downloading EVAL example code into STM32F207ZC.
I've soldered 144-pin chip to an adapterboard and followed schematics in AN3320 "Getting started with Hardware development" document.
All Vdd and Vss are connected, also VddA and VssA. All recommended caps in place. 25MHz crystal mounted.

We use J-Link v8.0 from IAR. We have two, both give same error messages. Both work flawless for Atmel SAM7 which we want to replace with ST MCU.
In order to open EVAL project in IAR Workbench we had to download the latest version 6.5.
We have compiled an example from Standard Peripheral Library which should output PWM signal using TIM10.
Changed Device to MCU we're using inside IAR Workbench.

Of course we've tested all pin connections on adapterboard numerous times and all seem correct.
No pins except JTAG and RST pins are connected to anything.
We also scoped JTAG pins and they all wiggle when trying to download except nJTRST which as far as I understand is expected.
RST pin is pulled low several times by JTAG during attempt to contact MCU.

Workbench Messages:
"Failed to get CPU status after 4 retries"
"Failed to load flash loader C:\...\Embedded Workbench 6.5\arm\config\flashloader\ST\FlashSTM32F205xC.flash"
"Bad JTAG communication: Write to IR: Expected 0x1, got 0x2 (TAP Command : 10 @ Off 0x5)"

Workbench Log:
Fri Mar 08, 2013 10:28:37: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.5\arm\config\flashloader\ST\FlashSTM32F2xxxx.mac
Fri Mar 08, 2013 10:28:37: JLINK command: ProjectFile = C:\data\p-1026-lockkort\stm32f2xx_stdperiph_lib\STM32F2xx_StdPeriph_Lib_V1.1.0\Project\STM32F2xx_StdPeriph_Template\EWARM\settings\Project_STM322xG_EVAL.jlink, return = 0
Fri Mar 08, 2013 10:28:37: Device "STM32F207ZC" selected (256 KB flash, 64 KB RAM).
Fri Mar 08, 2013 10:28:37: DLL version: V4.64a, compiled Feb 25 2013 18:26:59
Fri Mar 08, 2013 10:28:37: Firmware: J-Link ARM V8 compiled Nov 14 2012 22:34:52
Fri Mar 08, 2013 10:28:37: JTAG speed is initially set to: 32 kHz
Fri Mar 08, 2013 10:28:37: TotalIRLen = 9, IRPrint = 0x0011
Fri Mar 08, 2013 10:28:37: STM32F2xxx/STM32F4xxx: Can not attach to CPU. Trying connect under reset.
Fri Mar 08, 2013 10:28:37: TotalIRLen = 9, IRPrint = 0x0011
Fri Mar 08, 2013 10:28:37: Hardware reset with strategy 0 was performed
Fri Mar 08, 2013 10:28:37: Initial reset was performed
Fri Mar 08, 2013 10:28:37: TotalIRLen = 9, IRPrint = 0x0011
Fri Mar 08, 2013 10:28:37: STM32F2xxx/STM32F4xxx: Can not attach to CPU. Trying connect under reset.
Fri Mar 08, 2013 10:28:38: TotalIRLen = 9, IRPrint = 0x0011
Fri Mar 08, 2013 10:28:38: TotalIRLen = 9, IRPrint = 0x0011

This is done numerous times
Fri Mar 08, 2013 10:28:38: STM32F2xxx/STM32F4xxx: Can not attach to CPU. Trying connect under reset.
Fri Mar 08, 2013 10:28:38: TotalIRLen = 9, IRPrint = 0x0011
Fri Mar 08, 2013 10:28:38: TotalIRLen = 9, IRPrint = 0x0011

and when we end debug session
Fri Mar 08, 2013 10:28:54: Fatal error:    Session aborted!
Fri Mar 08, 2013 10:28:54: Failed to load flash loader: C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.5\arm\config\flashloader\ST\FlashSTM32F205xC.flash

This is our first time testing ST processor, we've used example code for EVAL board. Copied PWM code example to Template folder as explained in readme.txt.
We've not done any changes to any files. Proper device is chosen inside Workbench and JTAG seem to adapt to this.
Are there any other required changes to run EVAL code from our own PCB?

Were having some doubts around how to configure BOOT0..1 pins. We don't have any bootloader to install yet and I guess?? that the factory programmed bootloader is unused when download is done via JTAG.
Do we need to configure these pins to a correct state in order to make JTAG download work? (we've tried all 3 options but "normally" stick with Flash option)

Any other suggestions why this would fail?

Regards,
Richard

Outcomes