Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32F4 Discovery - unknown chip id! 0xe0042000 #107

Closed
jpmzometa opened this issue Sep 1, 2012 · 27 comments
Closed

STM32F4 Discovery - unknown chip id! 0xe0042000 #107

jpmzometa opened this issue Sep 1, 2012 · 27 comments

Comments

@jpmzometa
Copy link

Hi, i have a problem similar as #issue 64, but with a STM32F4-DISCOVERY.

st-flash write build/ch.bin 0x8000000

2012-09-01T18:33:59 INFO src/stlink-usb.c: -- exit_dfu_mode
2012-09-01T18:33:59 INFO src/stlink-common.c: Loading device parameters....
2012-09-01T18:33:59 WARN src/stlink-common.c: unknown chip id! 0xe0042000
stlink_sram_flash() == -1

Any hints?

@blueskynis
Copy link

Hello,

Have a look here:
#62

"Connect under Reset" technique in STM-32 ST-LINK Utility brought back my dead mcus.

Cheers!

@Nomados
Copy link

Nomados commented Mar 30, 2013

I have the same problem!

@blueskynis
Copy link

To get back in touch with the chip, I have to boot into Windows and use the STM-32 ST-LINK Utility from ST to erase the flash with "Connect under Reset" enabled in Settings.

@kyab
Copy link

kyab commented Jul 15, 2013

I have the same problem but now it comes back with STM-32 ST-LINK Utility on Windows. Thanks!

@perexg
Copy link

perexg commented Jan 1, 2014

You can also short the BOOT0 pin with the VDD pin (using a jumper) to select the system memory (DFU bootloader) as the boot mode. Quick and simple.

@tghosgor
Copy link

@perexg That does not work.

@elpaso
Copy link

elpaso commented Sep 24, 2014

@tghosgor works for me...

@latsku
Copy link
Contributor

latsku commented Oct 29, 2014

What worked for me was:

  1. Short the BOOT0 pin with VDD
  2. Reset the board
  3. st-flash erase

@joostrijneveld
Copy link
Contributor

Thanks @latsku, that worked perfectly.

@erwincoumans
Copy link

@latsku yes, your 3 steps worked for me too. Thanks!

@ghost
Copy link

ghost commented Jun 3, 2015

Hi Latsku,

Great buddy, those 3 steps works fine for me ....
Thank you..

@vdudouyt
Copy link

@latsku thank you very much for your suggestion! This helped me as well.

@kont-noor
Copy link

Tried all suggestions but still get WARN src/stlink-common.c: unknown chip id! 0xe0042000

@ghost
Copy link

ghost commented Sep 23, 2015

Hi,
Check the below link, that works fine for me.

#107

On Tue, Sep 22, 2015 at 7:24 PM, Nickolay Kondratenko <
notifications@github.com> wrote:

Tried all suggestions but still get WARN src/stlink-common.c: unknown
chip id! 0xe0042000


Reply to this email directly or view it on GitHub
#107 (comment).

Regard's
ADARSH B U

@kont-noor
Copy link

@AdarshBU it's a link to the current page

@ghost
Copy link

ghost commented Sep 23, 2015

@ Nickolay : Even I faced the same issue at the beginning of my work and
solved it by following the procedure mentioned by Latsku.

unknown chip id 0xe0042000
This means either 1) you have bricked the ST-Link bridge chip (U2) somehow

  • you'll need ST's own Windows utilities to fix that, or 2) you are trying
    to flash the Discovery in ST-Link (SWD/JTAG) mode. Replace the CN3 jumper
    if you're using the Discovery board!

Also, follow the instructions in the stlink readme to the letter...
Simply going into GDB and calling "load whatever.elf" didn't work, you need
to

  1. start st-util
  2. load the elf file in GDB ("gdb fancyblink.elf")
  3. (gdb) load
  4. wait...
  5. (gdb) cont

and your code will start. Don't *use *run instead of cont, that doesn't
seem to work either. Unintuitive but there you go.

I would also like to suggest you to check with

  1. Jumper Configuration
  2. Have a look at: [reset] st-flash does not work when CPU is in sleep mode #62 [reset] st-flash does not work when CPU is in sleep mode #62
  3. Also flash does not work when CPU is in sleep mode

On Wed, Sep 23, 2015 at 2:48 PM, Nickolay Kondratenko <
notifications@github.com> wrote:

@AdarshBU https://github.com/ADARSHBU it's a link to the current page


Reply to this email directly or view it on GitHub
#107 (comment).

Regard's
ADARSH B U

@ogzarm
Copy link

ogzarm commented Dec 23, 2015

1.open Stm32 St-link utility application
2.Target>Settings mode should be Connect Under Reset
3.Full erase chip
it is okey.

@polaroi8d
Copy link

@latsku im very new in stlink and boards, so sorry for the dumb question but, what does "1. Short the BOOT0 pin with VDD" really mean?

@latsku
Copy link
Contributor

latsku commented Jan 27, 2016

@polaroi8d Not a dump question at all.
Connect the BOOT0 pin with the VDD pin.

And the electronics slang part. Short comes from short circuit, which is connecting the pins with a wire or similar conductor.

@polaroi8d
Copy link

@latsku Okey, thanks for the answer, its woorking :)

@tcurdt
Copy link

tcurdt commented Apr 9, 2016

So far I have just connected the ST-LINK V2 (with no board connected) and then ran st-util which gave the rc/stlink-common.c: unknown chip id! 0xe0042000 which let me here.

Now is this because there is no board connected?
Or is this about the ST-LINKV2 itself?
Or what is it?

I still have to try the above instructions on how to fix this - but could someone try to explain what the problem actually is? I didn't get it from the above comments yet.

@tcurdt
Copy link

tcurdt commented May 4, 2016

@xor-gate why the close without further explanation?

@xor-gate
Copy link
Member

xor-gate commented May 4, 2016

Because this issue dates back to 2011 and is kept alive by != author. Feel free to reopen a new detailed issue tested against stlink tools currently in master. And latest stlink firmware (2.27).

You are trying to detect a chip id with nothing connected, this is not as the tools are intended.

@joostrijneveld
Copy link
Contributor

joostrijneveld commented Jun 2, 2017

The comment by @ADARSHBU has proved to be valuable to me; I want to stress the fact that the CN3 pins need to be shorted.

Out of the box, discovery boards come with a jumper on these pins, but one of our boards had somehow lost this jumper and it took a while to notice. When in doubt, look up a few photos of the relevant board and check if the same jumpers are in place on yours!

@afiskon
Copy link

afiskon commented Jul 15, 2017

For people who comes to this issue from Google. If you see an unknown chip id! 0xe0042000 error this most likely means that you connected ST-Link pin SWDIO to the CLK pin of your STM32 board and vise versa (SWCLK on ST-Link to IO pin on the board). Just re-check the connection, it should be SWDIO -> IO and SWCLK -> CLK. This is exactly what happened to me.

@tcurdt
Copy link

tcurdt commented Jul 17, 2017

@afiskon not sure about the "most likely" but it might be a cause

@Nightwalker-87 Nightwalker-87 added this to the v1.6.0 milestone Feb 25, 2020
@Nightwalker-87 Nightwalker-87 linked a pull request Mar 18, 2020 that will close this issue
@Nightwalker-87 Nightwalker-87 self-assigned this Mar 18, 2020
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 13, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.0, v1.6.2 Mar 24, 2021
@Nightwalker-87 Nightwalker-87 added this to To do in Release v1.7.0 via automation Mar 24, 2021
@Nightwalker-87 Nightwalker-87 self-assigned this Mar 24, 2021
@Nightwalker-87 Nightwalker-87 moved this from To do to In progress in Release v1.7.0 Mar 24, 2021
@Nightwalker-87 Nightwalker-87 changed the title stm32f4-discovery - unknown chip id! 0xe0042000 STM32F4 Discovery - unknown chip id! 0xe0042000 Mar 24, 2021
@Nightwalker-87 Nightwalker-87 moved this from In progress to Reviewer approved in Release v1.7.0 Mar 24, 2021
Release v1.7.0 automation moved this from Reviewer approved to Done Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.