Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 01, 2024, 01:19:26 01:19


Login with username, password and session length


Pages: [1]
Print
Author Topic: STM32F4DISCOVERY and ST-LINK/V2 (Problem and Solution)  (Read 35692 times)
0 Members and 1 Guest are viewing this topic.
omar2009
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 51
-Receive: 181


« on: May 29, 2012, 09:37:21 21:37 »

Hi All,

I got STM32F4DISCOVERY board

http://www.st.com/internet/evalboard/product/252419.jsp

It is based on STM32F407VG Cortex-M4 ARM MCU

I tried to connect to it using ST-Link utility

http://www.st.com/internet/evalboard/product/251168.jsp

but i got:

Connected via SWD.

Cannot connect to the MCU device!


after some invistigations I recognized that the problem is in the
MCU revision which is: 'Z' Revision
            -----------------------
           |     STM32F407     |
           |   VGT6          Z     |    <----  Here is Revision code
           |   HPAFD      VG    |
           |   KOR   HP   203  |   
           ------------------------

Later found this Errata:

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/ERRATA_SHEET/DM00037591.pdf

on page 9 we can find:

2.1.2 MCU device ID is incorrect

So:
The Device ID of the STM32F4xx Rev.Z has been changed to 0x413 (instead of 0x411 for Rev.A).
Thus, ST-LINK Utility can't recognize the device ID of STM32F4 Rev.Z (Only Rev.A is supported).


Solution:

the attached patch adds the support of STM32 F4 rev.Z in the current version(v2.2).

Have fun


Omar



Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #1 on: May 30, 2012, 01:30:51 01:30 »

The original topic

bm.marwen says:
Quote
Hi,

The Device ID of the STM32F4xx Rev.Z has been changed to 0x413 (instead of 0x411 for Rev.A).
Thus, ST-LINK Utility can't recognize the device ID of STM32F4 Rev.Z (Only Rev.A is supported).
This issue will be fixed in the next version which will be released soon.
In the meanwhile, the attached patch adds the support of STM32 F4 rev.Z in the current version(v2.2).

Regards,
Marwen

Here is the original file attachment

This is a well known issue on STM32 discovery board. I looked at the both applications, the original and the one from the patch, and it seems this was a simple case statement change in C code.
« Last Edit: May 30, 2012, 01:46:40 01:46 by metal » Logged
codekey
Inactive

Offline Offline

Posts: 2

Thank You
-Given: 1
-Receive: 1


« Reply #2 on: May 07, 2018, 10:47:19 22:47 »

Hi All,

I got STM32F4DISCOVERY board

http://www.st.com/internet/evalboard/product/252419.jsp

It is based on STM32F407VG Cortex-M4 ARM MCU

I tried to connect to it using ST-Link utility

http://www.st.com/internet/evalboard/product/251168.jsp

but i got:

Connected via SWD.

Cannot connect to the MCU device!


after some invistigations I recognized that the problem is in the
MCU revision which is: 'Z' Revision
            -----------------------
           |     STM32F407     |
           |   VGT6          Z     |    <----  Here is Revision code
           |   HPAFD      VG    |
           |   KOR   HP   203  |   
           ------------------------

Later found this Errata:

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/ERRATA_SHEET/DM00037591.pdf

on page 9 we can find:

2.1.2 MCU device ID is incorrect

So:
The Device ID of the STM32F4xx Rev.Z has been changed to 0x413 (instead of 0x411 for Rev.A).
Thus, ST-LINK Utility can't recognize the device ID of STM32F4 Rev.Z (Only Rev.A is supported).


Solution:

the attached patch adds the support of STM32 F4 rev.Z in the current version(v2.2).

Have fun


Omar





I have one of those Discovery boards. I accidentally damaged the STM32F407 so i ordered a replacement STM32F407.  After replacing the STM32407 the ST-Link2 didn't recognize the micro. I ended up ordering a brand new STM32F4 Discovery board.

Now that i've read this post, i looked at the Discovery board i could not get to work and the Revision after VGT6 shows "2". Could this be the problem why the ST-Link2 does not recognize this micro?
Logged
h0nk
Senior Member
****
Offline Offline

Posts: 257

Thank You
-Given: 226
-Receive: 231



« Reply #3 on: May 08, 2018, 12:27:51 00:27 »


Hello

> Could this be the problem why the ST-Link2 does not recognize this micro?

Have You tried the "ST-Link Utility"?
At least it should be able to read the Device ID/Revision ID.
The size of the flash is also stored in a predefined register and
should be readable.

I have two F407 Discovery Boards. One is rather old with VGT6 - A.
The Chip is recognized as: Device ID: 0x411/Revision ID B and
a newer one with a VGT6 - Z. This shows Device ID: 0x413 and
Revision ID Z.

If the Chip is unknown to the software i would assume, that the utility shows
"Unknown Device" but with correct values for Device ID, Revision ID
and Flash size.

I would suggest to write a small test for the SWD-Pins in GPIO-Mode
and test the connection. You can use the boot loader to flash this test.
Dont forget a sufficient delay loop at the begin if you want to erase and
reprogram via SWD/JTAG later.

And you should update the ST-Link on the Board to the latest available version
together with the communication libraries for Your favorite IDE/Compiler.
I remember that i had similar problems with a brand new STM32L053 some time ago.

Good luck, and

Best Regards
Logged
Mr. Spock
Senior Member
****
Offline Offline

Posts: 261

Thank You
-Given: 473
-Receive: 827



« Reply #4 on: May 08, 2018, 09:38:16 21:38 »

Segger has an utility that transforms an ST-link into a Jlink. This may solve your problem
Logged
mEErEck
Inactive

Offline Offline

Posts: 4

Thank You
-Given: 1
-Receive: 2


« Reply #5 on: August 21, 2020, 09:56:55 09:56 »

Mr. Spock is right. You can follow this article: https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
I have convertered cloned STLINKs_v2 purchased from China into the JLink. The programmer became much faster in terms of flashing and stepping through the code at breakpoints.
Logged
simma
Junior Member
**
Offline Offline

Posts: 45

Thank You
-Given: 24
-Receive: 4


« Reply #6 on: August 22, 2020, 03:11:32 15:11 »

Mr. Spock is right. You can follow this article: https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
I have convertered cloned STLINKs_v2 purchased from China into the JLink. The programmer became much faster in terms of flashing and stepping through the code at breakpoints.

I agree with Mr Spock and mEErEck. You may find STLinkReflash.exe refuse to upgrade the clones. I used the info from the link in the attachment. It worked for me.

Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC