cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot connect to STM32F469 CPU

Andreas Zeiler
Associate II
Posted on September 20, 2017 at 13:06

Hi,

I'm trying to setup our new PCB with a STM32F469IGH6 MCU.

Our software includes a RealTime OS and some User Defined Modules as Testsoftware.

The Firmware formerly was written for the STM32F469 Discovery Board and I ported it to our new PCB. So I just deactivated IOs.

Unfortunatelly not all. But I think the main problem was the Clock Configuration. I didn't change it and now I think that the Clock is configured far to high.

HSE = 25MHz

PLL_M = 8

PLL_N = 360

PLL_P = 2

So I get a System Clock of about 560MHz.

The HSE on the Discovery Board ist at 8MHz. So I get a Systemclock of 180MHz on the Discovery Board.

The problem now is, that I cannot connect to the CPU anymore.

I use JLink and in Keil µVision I got this Output:

Header 1

JLink info:

------------

DLL: V6.20a, compiled Sep 15 2017 18:04:38

Firmware: J-Link Ultra V4 compiled Sep 15 2017 17:51:02

Hardware: V4.00

S/N : 504400261

Feature(s) : RDI, FlashBP, FlashDL, JFlash, GDB

 

* JLink Info: TotalIRLen = 9, IRPrint = 0x0011

* JLink Info: JTAG chain detection found 2 devices:

* JLink Info:  #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP

* JLink Info:  #1 Id: 0x06434041, IRLen: 05, STM32 Boundary Scan

* JLink Info: STM32 (connect): Can not attach to CPU. Trying connect under reset.

* JLink Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000

* JLink Info: TotalIRLen = 9, IRPrint = 0x0011

* JLink Info: JTAG chain detection found 2 devices:

* JLink Info:  #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP

* JLink Info:  #1 Id: 0x06434041, IRLen: 05, STM32 Boundary Scan

* JLink Info: STM32 (connect): Can not attach to CPU. Trying connect under reset.

* JLink Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000

***JLink Error: STM32: Connecting to CPU via connect under reset failed.

Error: Flash Download failed  -  Target DLL has been cancelled

Flash Load finished at 11:55:26

In JLink Commander this Output (using SWD):

Header 1

J-Link>connect

Please specify device / core. <Default>: STM32F469IG

Type '?' for selection dialog

Device>

Please specify target interface:

  J) JTAG (Default)

  S) SWD

TIF>s

Specify target interface speed [kHz]. <Default>: 4000 kHz

Speed>

Device 'STM32F469IG' selected.

Connecting to target via SWD

Found SW-DP with ID 0x2BA01477

STM32 (connect): Can not attach to CPU. Trying connect under reset.

Found SW-DP with ID 0x2BA01477

Found SW-DP with ID 0x2BA01477

STM32 (connect): Can not attach to CPU. Trying connect under reset.

Found SW-DP with ID 0x2BA01477****** Error: STM32: Connecting to CPU via connect under reset failed.Found SW-DP with ID 0x2BA01477

STM32 (connect): Can not attach to CPU. Trying connect under reset.

Found SW-DP with ID 0x2BA01477

Found SW-DP with ID 0x2BA01477

STM32 (connect): Can not attach to CPU. Trying connect under reset.

Found SW-DP with ID 0x2BA01477****** Error: STM32: Connecting to CPU via connect under reset failed.Cannot connect to target.

In JLink Commander this Output (using JTAG)

Header 1

Please specify device / core. <Default>: STM32F469IG

Type '?' for selection dialog

Device>

Please specify target interface:

  J) JTAG (Default)

  S) SWD

TIF>

Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect

JTAGConf>

Specify target interface speed [kHz]. <Default>: 4000 kHz

Speed>

Device 'STM32F469IG' selected.

Connecting to target via JTAG

TotalIRLen = 9, IRPrint = 0x0011

JTAG chain detection found 2 devices:

 #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP

 #1 Id: 0x06434041, IRLen: 05, STM32 Boundary Scan

STM32 (connect): Can not attach to CPU. Trying connect under reset.

TotalIRLen = ?, IRPrint = 0x..000000000000000000000000

TotalIRLen = 9, IRPrint = 0x0011

JTAG chain detection found 2 devices:

 #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP

 #1 Id: 0x06434041, IRLen: 05, STM32 Boundary Scan

STM32 (connect): Can not attach to CPU. Trying connect under reset.

TotalIRLen = ?, IRPrint = 0x..000000000000000000000000****** Error: STM32: Connecting to CPU via connect under reset failed.TotalIRLen = 9, IRPrint = 0x0011

JTAG chain detection found 2 devices:

 #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP

 #1 Id: 0x06434041, IRLen: 05, STM32 Boundary Scan

STM32 (connect): Can not attach to CPU. Trying connect under reset.

TotalIRLen = ?, IRPrint = 0x..000000000000000000000000

TotalIRLen = 9, IRPrint = 0x0011

JTAG chain detection found 2 devices:

 #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP

 #1 Id: 0x06434041, IRLen: 05, STM32 Boundary Scan

STM32 (connect): Can not attach to CPU. Trying connect under reset.

TotalIRLen = ?, IRPrint = 0x..000000000000000000000000****** Error: STM32: Connecting to CPU via connect under reset failed.Cannot connect to target.

Some Notes regarding the Current: Without Firmware the complete Board (2 CPUs on it) took about 30-40mA.

With the misconfigured Firmware only on CPU1 it is at about 90mA. CPU heats up but I can touch it .

Why can't I connect to my CPU anymore? Is it because of the Clock Config? What happens with the CPU if I write such an  Clock configuration?

Are there any possibilities to get into CPU again?

Kind regards

Andreas

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on September 20, 2017 at 13:21

Do you have the mcu reset connected to the debugger?

How are the BOOTx pins connected? Can you try connecting with debugger while in bootloader mode?

JW

View solution in original post

4 REPLIES 4
Posted on September 20, 2017 at 13:21

Do you have the mcu reset connected to the debugger?

How are the BOOTx pins connected? Can you try connecting with debugger while in bootloader mode?

JW

Andreas Zeiler
Associate II
Posted on September 20, 2017 at 13:56

Hi Jan,

yes Debugger is connected properly. I was able to flash this firmware and I am also able to connect to the second CPU which doesn't have any firmware now.

BOOT0 is connected to GND with a PullDown. BOOT1 is PB2 which is also set to GND over PullDown. But it should be possible to get BOOT0 to Vcc over a Pad. I will try it.

Kind regards

Andreas

Posted on September 20, 2017 at 14:53

PLL_M would need to be 25 if your HSE is 25 MHz and HSE_VALUE would also need to be coherent. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andreas Zeiler
Associate II
Posted on September 21, 2017 at 08:40

Hello,

thanks for your help.

Problem solved. I set the BOOT0 Pint to 3.3V and the controller booted into Bootloader Mode. Then I was able to attach to it with the debugger and erase the flash.

I already adjusted the RCC Values for my custom board. Now Firmware is running.

Kind regards

Andreas