Get IDCODE error


I am teaching a course using the STM Nucleo-F401RE board. We are using Mbed studio. I have two student boards that both seem to have the same error (pasted below). I am unable to program the boards using Mbed studio anymore, it seems to get part way and then fails.

When I try to test if the board is appropriately detected using Mbed CLI, I get the following error: ERROR: Could not identify a board with the product code: '0799'. No connected Mbed devices found.

Any ideas on how I can fix these two boards? Thanks.

0001982:CRITICAL:__main__:STLink error (9): Get IDCODE error
Traceback (most recent call last):
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/", line 402, in run
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/", line 572, in do_flash
    with session:
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/core/", line 339, in __enter__
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/core/", line 457, in open
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/board/", line 85, in init
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/core/", line 117, in init
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/utility/", line 213, in invoke
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/utility/", line 208, in invoke
    resultSequence = call()
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/coresight/", line 376, in _connect
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/coresight/", line 163, in connect
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/coresight/", line 183, in _connect_probe
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/probe/", line 136, in connect
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/probe/stlink/", line 267, in enter_debug
  File "/Library/Application Support/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/probe/stlink/", line 305, in _check_status
    raise exceptions.ProbeError(error_message)
pyocd.core.exceptions.ProbeError: STLink error (9): Get IDCODE error


this is probably topic for Mbed Studio section instead of Mbed OS Bugs, I think.

Verify your boards with STM32CUBEProgrammer. Connect it if possible, then do full memory erase, check ST-link firmware up-date and try it again.

BR, Jan

OK, thanks. I am not sure how to move the post after it’s made.

I was able to check the boards with the programmer. Here’s what I’m seeing:

Broken boards:

14:30:10 : ST-LINK SN  : 0669FF555349898667241929
14:30:10 : ST-LINK FW  : V2J40M27
14:30:10 : Board       : NUCLEO-F401RE
14:30:10 : Voltage     : 3.27V
14:30:10 : Error: No STM32 target found!

Not broken board:

14:36:03 : Warning: Device changed, refreshing...
14:36:04 : ST-LINK SN  : 0667FF555349898667211636
14:36:04 : ST-LINK FW  : V2J33M25
14:36:04 : Board       : NUCLEO-F401RE 
14:36:04 : Voltage     : 3.26V
14:36:04 : SWD freq    : 4000 KHz
14:36:04 : Connect mode: Normal
14:36:04 : Reset mode  : Software reset
14:36:04 : Device ID   : 0x433
14:36:04 : Revision ID : Rev Z
14:36:04 : Debug in Low Power mode is not supported for this device.
14:36:05 :   Bank          : 0x00
14:36:05 :   Address       : 0x40023c14
14:36:05 :   Size          : 8 Bytes
14:36:05 : UPLOADING ...
14:36:05 :   Size          : 1024 Bytes
14:36:05 :   Address       : 0x8000000
14:36:05 : Read progress:
14:36:05 : Data read successfully
14:36:05 : Time elapsed during the read operation is: 00:00:00.021

I tried changing some of the settings in STM32CubeProgrammer (e.g. hardware reset instead of software reset) to see if I could get it to connect, but still no luck. I was able to update the ST-LINK firmware but that did not resolve the issue either.

This has just happened to a third board, so I am trying to figure out what is going on. The only thing in common between all the students I can think of is that they are using Windows machines. I haven’t had an issue like this on my mac. Any suggestions would be appreciated, thank you.

It’s quite possible that these boards simply got killed by static. I know a few people who were carrying around NUCLEO or LPC1768 boards in their backpacks and had them spontaneously die. Were the users carrying their boards in any sort of ESD bags?

Did you check all jumpers and solder bridges are in correct position?
If yes, then I agree with Jamie and MCU is probably dead.

BR, Jan

It’s a bummer if it is just static that killed the boards…but the students didn’t change any jumpers so I guess the MCU dying for some reason is the most likely explanation given the target won’t wake up using the STM32CUBEProgrammer. Just surprising for it to happen to 3 boards. I’ll order some ESD bags I guess. Thanks for the suggestions. If anyone else has ideas of other things to try, let me know.