Stlink: STM32F103C8Tx: Sudden unknown chip id

Created on 13 Mar 2017  路  15Comments  路  Source: stlink-org/stlink

  • [x] Programmer/board type: Stlink/v2
  • [x] Programmer firmware version: e.g STSW-LINK007 2.27.15
  • [x] Operating system: macOS 10.12.3
  • [x] Stlink tools version: v1.3.1
  • [x] Stlink commandline tool name: st-flash and st-util
  • [x] Target chip: generic STM32F103C8

I was flashing without problems, suddenly I am getting "unknown chip id".

Output:

$ st-flash write main.bin 0x8000000
st-flash 1.3.1
2017-03-13T01:22:48 INFO src/common.c: Loading device parameters....
2017-03-13T01:22:48 WARN src/common.c: unknown chip id! 0xe0042000

Did I somehow fry my board? Or what does that mean?

componenst-flash componenst-util errounknown-chipid needinvestigation needissuer-feedback olinux omacOS programmestlinkv2 targestm32f1 targestm32f3 targestm32f7

Most helpful comment

Setting boot0 to 1, then st-flash erase, then setting it back to 0 and all was working again.
I am fine to close the issue - but still would love to hear how/why that happened.

All 15 comments

This happens on an erase:

$ st-flash erase
st-flash 1.3.1
2017-03-13T01:49:32 INFO src/common.c: Loading device parameters....
2017-03-13T01:49:32 WARN src/common.c: unknown chip id! 0xe0042000

When I hold the reset button while calling the erase I get:

$ st-flash erase
st-flash 1.3.1
2017-03-13T01:49:40 INFO src/common.c: Loading device parameters....
2017-03-13T01:49:40 INFO src/common.c: Device connected is: F1 Medium-density device, id 0x20036410
2017-03-13T01:49:40 INFO src/common.c: SRAM size: 0x5000 bytes (20 KiB), Flash: 0 bytes (0 KiB) in pages of 1024 bytes
Mass erasing

0 bytes?

Setting boot0 to 1, then st-flash erase, then setting it back to 0 and all was working again.
I am fine to close the issue - but still would love to hear how/why that happened.

@tcurdt are you using SWDIO/SDCLK as GPIO in your firmware? It may be like #577

@iglooom not by choice at least. I would need to check if any of the GPIO pins I am using are somehow connected to the SWDIO/SDCLK but according to this http://wiki.stm32duino.com/index.php?title=Blue_Pill they are not.

@tcurdt: I know this has been long ago, but do you still have the possibility to test if this is fixed now?

It might take a while - but still have a blue pill I can check with.

If you do some testing, ensure you use the develop branch or Release v1.6.1 (once released) for testing.

Now as Release v1.6.1 is published, it's about time to do some testing here. We should go back in time following recent releases to find out if this still appears somewhere...

I have this exact problem with stm32f303k8 nucleo board with stlink 1.6.0 on Arch Linux. Programmer has firmware V2J37M26 (STSW-LINK007 3.3.4). It was working before but suddenly, I started to get the following error:

st-util 1.6.0
2020-06-10T23:53:41 INFO common.c: Loading device parameters....
2020-06-10T23:53:41 WARN common.c: unknown chip id! 0x5fa0004

Since setting boot pins seems like requires some soldering on this board, I didn't get chance to test the solution suggested by @tcurdt.

I also tried it on with develop branch and I get a different warning

st-util
2020-06-11T07:47:32 WARN common.c: unknown chip id! 0x5fa0004
2020-06-11T07:47:32 INFO gdb-server.c: Listening at *:4242...

And st-flash from develop branch prints:

st-flash 1.6.0-370-g05f79e1
2020-06-11T07:48:30 WARN common.c: unknown chip id! 0x5fa0004
Failed to connect to target

I guess then I don't even need to test on my blue pill then. Seems like it's not fixed then.

Well, a test with v1.6.1 would be indeed be useful before adding this ticket to the v1.6.2 milestone.

Ah, missed that the other report was with 1.6.0.

Same problem here.. with STM32F401RE Nucleo board on Ubuntu 18.04,
It was working perfectly but suddenly I started to get this error :

$ st-flash write output/$(PROJ_NAME).bin 0x08000000
st-flash 1.6.1-69-gbe0157f
2020-07-16T02:48:35 WARN common.c: unknown chip id! 0x374b

@JihedChaibi: Note the different error code 0x374b in your warning.
I would need to investigate what exact cause is linked to this ID.

I'm having a similar problem on Mac OS Catalina using st-flash 1.6.1 from Homebrew on a new fresh-out-of-the-box Nucleo-F746ZG. Here is the output from "st-flash reset":

st-flash 1.6.1
2020-09-24T13:59:47 WARN common.c: unknown chip id! 0x5fa0004
Failed to connect to target

An old st-flash 1.3.0 executable on the same Mac works OK:

2020-09-24T13:58:40 INFO /Users/jerry/Downloads/stlink-master/src/common.c: Loading device parameters....
2020-09-24T13:58:40 INFO /Users/jerry/Downloads/stlink-master/src/common.c: Device connected is: F7 device, id 0x10016449
2020-09-24T13:58:40 INFO /Users/jerry/Downloads/stlink-master/src/common.c: SRAM size: 0x50000 bytes (320 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 2048 bytes
st-flash 1.3.0

And st-flash 1.5.1 on a Raspberry Pi 4 running Raspian also works OK:

2020-09-24T13:53:02 INFO common.c: Loading device parameters....
2020-09-24T13:53:02 INFO common.c: Device connected is: F7 device, id 0x10016449
2020-09-24T13:53:02 INFO common.c: SRAM size: 0x50000 bytes (320 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 2048 bytes
st-flash 1.5.1

Was this page helpful?
0 / 5 - 0 ratings