stm32f4-discovery - unknown chip id! 0xe0042000 #107

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

Comments

Projects
None yet
@jpmzometa

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

This comment has been minimized.

Show comment
Hide comment
@blueskynis

blueskynis Mar 13, 2013

Hello,

Have a look here:
#62

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

Cheers!

Hello,

Have a look here:
#62

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

Cheers!

@Nomados

This comment has been minimized.

Show comment
Hide comment
@Nomados

Nomados Mar 30, 2013

I have the same problem!

Nomados commented Mar 30, 2013

I have the same problem!

@blueskynis

This comment has been minimized.

Show comment
Hide comment
@blueskynis

blueskynis Mar 30, 2013

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.

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

This comment has been minimized.

Show comment
Hide comment
@kyab

kyab Jul 15, 2013

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

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

This comment has been minimized.

Show comment
Hide comment
@perexg

perexg 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.

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

This comment has been minimized.

Show comment
Hide comment
@tghosgor

tghosgor Apr 11, 2014

@perexg That does not work.

@perexg That does not work.

@elpaso

This comment has been minimized.

Show comment
Hide comment
@elpaso

elpaso Sep 24, 2014

@tghosgor works for me...

elpaso commented Sep 24, 2014

@tghosgor works for me...

@latsku

This comment has been minimized.

Show comment
Hide comment
@latsku

latsku Oct 29, 2014

Contributor

What worked for me was:

  1. Short the BOOT0 pin with VDD
  2. Reset the board
  3. st-flash erase
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

@fnack fnack referenced this issue in RIOT-OS/RIOT Jan 6, 2015

Merged

cpu/stm32f4: Add LPM implementation #2246

@joostrijneveld

This comment has been minimized.

Show comment
Hide comment
@joostrijneveld

joostrijneveld May 16, 2015

Contributor

Thanks @latsku, that worked perfectly.

Contributor

joostrijneveld commented May 16, 2015

Thanks @latsku, that worked perfectly.

@erwincoumans

This comment has been minimized.

Show comment
Hide comment
@erwincoumans

erwincoumans May 31, 2015

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

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

@ADARSHBU

This comment has been minimized.

Show comment
Hide comment
@ADARSHBU

ADARSHBU Jun 3, 2015

Hi Latsku,

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

ADARSHBU commented Jun 3, 2015

Hi Latsku,

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

@vdudouyt

This comment has been minimized.

Show comment
Hide comment
@vdudouyt

vdudouyt Jul 25, 2015

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

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

@kont-noor

This comment has been minimized.

Show comment
Hide comment
@kont-noor

kont-noor Sep 22, 2015

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

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

@ADARSHBU

This comment has been minimized.

Show comment
Hide comment
@ADARSHBU

ADARSHBU 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

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

This comment has been minimized.

Show comment
Hide comment
@kont-noor

kont-noor Sep 23, 2015

@ADARSHBU it's a link to the current page

@ADARSHBU it's a link to the current page

@ADARSHBU

This comment has been minimized.

Show comment
Hide comment
@ADARSHBU

ADARSHBU 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: #62 #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

@ 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: #62 #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

This comment has been minimized.

Show comment
Hide comment
@ogzarm

ogzarm 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.

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

This comment has been minimized.

Show comment
Hide comment
@polaroi8d

polaroi8d Jan 27, 2016

@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 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

This comment has been minimized.

Show comment
Hide comment
@latsku

latsku Jan 27, 2016

Contributor

@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.

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

This comment has been minimized.

Show comment
Hide comment
@polaroi8d

polaroi8d Feb 11, 2016

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

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

@prusnak prusnak referenced this issue Mar 18, 2016

Closed

unknown chip id #381

@tcurdt

This comment has been minimized.

Show comment
Hide comment
@tcurdt

tcurdt 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 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

This comment has been minimized.

Show comment
Hide comment
@tcurdt

tcurdt May 4, 2016

@xor-gate why the close without further explanation?

tcurdt commented May 4, 2016

@xor-gate why the close without further explanation?

@xor-gate

This comment has been minimized.

Show comment
Hide comment
@xor-gate

xor-gate May 4, 2016

Collaborator

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.

Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@joostrijneveld

joostrijneveld Jun 2, 2017

Contributor

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!

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

This comment has been minimized.

Show comment
Hide comment
@afiskon

afiskon 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.

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

This comment has been minimized.

Show comment
Hide comment
@tcurdt

tcurdt Jul 17, 2017

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

tcurdt commented Jul 17, 2017

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

@hggq

This comment has been minimized.

Show comment
Hide comment
@hggq

hggq May 25, 2018

Thanks @latsku your 3 setup very good

hggq commented May 25, 2018

Thanks @latsku your 3 setup very good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment