-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unknown chip id 0! #620
Comments
Make sure you have hooked up the SWDIO/SWCLK and the Reset correctly. The reset should also have an pullup resistor. Have a look at Nucleo or Discovery board reference designs. |
They are consistent with the Discovery board, from what I can see on the schematics. What value resistor should be on the pullup? It is now returning a value of: st-flash --reset write main.bin 0x08000000 |
You should read the datasheet, normal 10k is enough also with a capacitor to ground for preventing glitches. |
Yes, it is setup as such. I based most of it of the discovery board. Still returning unknown chip ID 0. Is there any other information I can provide that will aide in debugging this? |
I have no idea why there is something wrong with your board, your chip is supported and chipid zero is mostly a hardware problem. |
FWIW, I've seen this error on F103 boards with DIO and CLK reversed. Swapping the wires solved it. |
I am having the same problem on my BluePill STM32F103 (http://wiki.stm32duino.com/index.php?title=Blue_Pill) and OS X 10.12.6
and once I get this message, any further attempt to flash the mcu using st-util/st-flash end up with this error. I usually "reset" this problem by connecting to a Windows PC and using the STM's STLink Utility (which can't connect to my MCU after being flashed using Texane st-link, unless I press the reset button during connection - something gets corrupted in the flash of the MCU with the st-util) from STLink Utility (just opening/closing with STLink Utility is enough to fix the problem!). Then it works fine, but it would really be nice if the st-util application had a similar functionality. Sometimes I am able to overcome this problem by holding RESET button and flashing my firmware with st-util, but in most cases this "method" isn't working. So, it looks like st-util occasionally damages something in the flash, which can be recovered by simply connecting to the target in STLink Utility while holding the RESET button (too bad this official tool is only available for Windows though). (Could it be because the flash memory of the controller is worn out? though I doubt it...) |
Holding reset has the effect of not starting your code, which might be disabling JTAG/SWD or messing with those I/O pins in some other way. As I understand it, JTAG & SWD will continue to work while the µC is in reset. Another approach might be to set BOOT1 to "1", cause the reset to enter the ROM boot loader - maybe then you can access your Blue Pill again? |
@jcw I am not doing anything in my code apart from setting this in Cube: |
@TediumRemedy maybe this is the case of https://community.st.com/thread/15556 |
I was also having "unknown chip id 0" issue using ST-LINK/V2 ISOL on custom board having STM32F04xx. I tested this with cheaper ST-LINK/V2 programmer and it is working fine. No other changes to setup. Does someone have any ideas why does not the ISOL version work? |
@el2ro in theory ISOL should not be different from the normal official STMicroelectronics stlinkv2/stlinkv2-1 |
@bryanmonti @jcw @TediumRemedy @el2ro: What is the current state of this for each of you? Is this hardware- or software-related? |
I have not run into this recently (but then again, I use a mix of openocd and stlink for uploading to various boards). I can confirm that chipid 0 will definitely show up when some µCs are in stop/standby mode, e.g. for STM32L031:
I can't make this go away by holding the µC in reset, but I can upload to it with openocd with reset pressed, and then released once the upload hangs - at that point the upload finishes, and verifies ok. PS. This particular example through an ST-Link 2.1, cut off from a Nucleo board (latest s/w rev). |
Can we have some recent feedback on this to show in which situations the warning |
I don't have an example at hand anymore. I use PlatformIO with a variety of boards, but that's all OpenOCD, as far as I can tell. |
@Ant-ON: As I read from the code,
Is there any possibility to implement the above scenario? I think this would indeed allow to distinguish use cases properly. |
@Nightwalker-87 In version 1.7+, it is displayed as zero if the address of chip id reading is unknown (possible only for new series of MCU, which are not yet). I'll fix this so that everything stops at the message: Line 1543 in 71d1dab
|
ping @Ant-ON |
@Nightwalker-87 I think this issue can be closed. Already added a message about connection failure and inability to identify the chip (see stlink_chip_id) |
Intermediate summary for possible reasons:
|
Finally closed by #1120. |
st-info
,st-flash
,st-util
-> st-flash-- This is a custom board, possible there is a design error but would like to confirm here first.
Output:
Expected/description:
Expecting the device to have to program loaded into flash. This is a custom board, as mentioned above. It is possible there is a design error. I am not too familiar with the way the STM32F4XX series works and may not have the knowledge to diagnose the issue myself. If there are resources beyond which I have found, I will gladly read up on them.
The text was updated successfully, but these errors were encountered: