cancel
Showing results for 
Search instead for 
Did you mean: 

Unknown chip id! 0x421

Odega
Associate II

Hello, so I am completely new to working with STM boards in general. 

I just got a brand new stm32f446re board, and I tried to upload some code to it through Linux. And I do mean brand new, I haven't uploaded or downloaded any code to it before this attempt. However, when I attempted to do so, I got an error message:

"WARN common.c: unknown chip id! 0x421"

So, I looked around for a bit and tried a simple command: st-info --probe to see some internal stuff on it. But I was told this:

"No such file or directory

version:V2J33S25

serial: 066DFF534871754867255336

flash: 0 (pagesize: 0)

sram: 0

chipid: 0x421"

 

After spending roughly about two weeks trying to find stuff online, I couldn't figure out anything on what to do. So, I am very much open to suggestions if anybody knows anything about this error.

Thank you very much in advance for any help.

25 REPLIES 25

@Odega wrote:

What I am using to compile the code is Ubuntu Linux.. 


No. That's just the operating system which your development system is running - that tells us nothing about the tools that you're using.

 


@Odega wrote:

 and typing up a simple list of commands 


So show us exactly what commands you a typing, and what responses you are getting when you type them.

Copy and paste from your Linux terminal.

 


@Odega wrote:

 I don't use any external tools. 


Of course you do: "typing commands" is what invokes the tools!

You're not trying to use your development host's native compiler to build the code for your target - are you?


@Odega wrote:

I am an electrical engineering student


Then you really should be getting your teacher/supervisor to help you with this.

They will be able to see exactly what you have, and exactly what you are doing and get you going far easier than remote strangers who can see none of that!

As much as I wish they would know, they don't. This is a research project I am helping a professor with, and have talked to more than a few different professors and most of them are just as lost as I am.

This photo is what I am looking at. I try to upload the code to the board from a laptop through Ubuntu Linux. 


This is a different error message than you've posted in the initial post. It appears, that your installation of these tools is incorrect (that's why the "no such file or directory" when the tools apparently try to find the chips database which should've been installed together with the tools) and/or obsolete.

https://github.com/stlink-org/stlink

Those tools most probably output version upon --version command-line switch, try and tell us of result.You also might want to update the tools using whatever Debian's default packaging/updating tool (apt-get? I am not into Linux/Debian.)

As these are not official ST tools, ST won't support them directly. Also, there are only a few users using Linux, most users are using Windows, as do probably all the regulars here. You may be better off trying to get help through that gihub project.

JW

 


@Odega wrote:

This photo is what I am looking at.


Again please copy & paste the text - rather than a screenshot

So you are using two tools there:

  1. st-flash
  2. st-info

Neither of those tools is building your code - so what did you use to build it?

Or have you obtained this rover-stm.bin file pre-built from someone else?

I don't know those tools - do they support a --help option?

Both of those tools are telling you that they can't find a config file or folder - so that's not going to help anything.

The output from the st-info tool suggests that you are successfully communicating with the ST-Link - because it gets the version & serial number - but the ST-Link is failing to communicate with the Target microcontroller.

 

Are you stuck with using Linux?

Maybe it would be worth trying again to get the Cube tools working ...


@Andrew Neil wrote:

I don't know those tools ...


Found documentation here:

https://manpages.debian.org/testing/stlink-tools/st-flash.1.en.html

https://manpages.debian.org/testing/stlink-tools/st-info.1.en.html

so no --help option, but to see the output from --version would be useful - are you up-to-date?

This looks like the open-source project:

https://github.com/stlink-org/stlink

check the installation & usage instructions there ...

The exact lines of code I use to build the project are:


"cd Research

source env/bin/activate

cd rover-stm

mbed compile"

 

And this is what follows:

[mbed] Working path "/home/soeuser/Research/rover-stm" (program)
Building project rover-stm (NUCLEO_F446RE, GCC_ARM)
Scan: rover-stm
Link: rover-stm
Elf2Bin: rover-stm
| Module               |      .text |    .data |      .bss |
|----------------------|------------|----------|-----------|
| [fill]               |    238(+0) |    5(+0) |    22(+0) |
| [lib]/c.a            |  36880(+0) | 2474(+0) |    89(+0) |
| [lib]/gcc.a          |   7840(+0) |    0(+0) |     0(+0) |
| [lib]/m.a            |   8128(+0) |    1(+0) |     0(+0) |
| [lib]/misc           |    180(+0) |    4(+0) |    28(+0) |
| [lib]/nosys.a        |     32(+0) |    0(+0) |     0(+0) |
| [lib]/stdc++.a       |   6452(+0) |    8(+0) |    44(+0) |
| mbed-os/cmsis        |   7732(+0) |  168(+0) |  5957(+0) |
| mbed-os/connectivity |     60(+0) |    0(+0) |     0(+0) |
| mbed-os/drivers      |   3880(+0) |    0(+0) |     0(+0) |
| mbed-os/hal          |   1728(+0) |    4(+0) |    66(+0) |
| mbed-os/platform     |   3504(+0) |  260(+0) |   352(+0) |
| mbed-os/rtos         |    868(+0) |    0(+0) |     0(+0) |
| mbed-os/targets      |   8348(+0) |    8(+0) |  1130(+0) |
| rover-stm/src        |  19922(+0) |   68(+0) |  8752(+0) |
| Subtotals            | 105792(+0) | 3000(+0) | 16440(+0) |
Total Static RAM memory (data + bss): 19440(+0) bytes
Total Flash memory (text + data): 108792(+0) bytes
 
Image: ./BUILD/NUCLEO_F446RE/GCC_ARM/rover-stm.bin

 

From what I have been told, these lines of code did work in the past before I joined the project. The final line is what saves the file to the rover-stm.bin file. 

And after a couple of weeks of roaming around on the internet looking for a solution, I had come to the same conclusion. It detects the board just fine, but the problem is that the computer and the microcontroller can't communicate for some unknown reason.

I am sadly stuck with Linux. As far as my predecessors go, they all used Linux to build, compile, and send out the code. 

Right - so you're using the mbed tools!

What is this "rover-stm" project?

Is it a known-good project for the Nucleo board you have?

 

[mbed] Working path "/home/soeuser/Research/rover-stm" (program)
Building project rover-stm (NUCLEO_F446RE, GCC_ARM)
Scan: rover-stm
Link: rover-stm
Elf2Bin: rover-stm
| Module               |      .text |    .data |      .bss |
|----------------------|------------|----------|-----------|
| [fill]               |    238(+0) |    5(+0) |    22(+0) |
| [lib]/c.a            |  36880(+0) | 2474(+0) |    89(+0) |
| [lib]/gcc.a          |   7840(+0) |    0(+0) |     0(+0) |
| [lib]/m.a            |   8128(+0) |    1(+0) |     0(+0) |
| [lib]/misc           |    180(+0) |    4(+0) |    28(+0) |
| [lib]/nosys.a        |     32(+0) |    0(+0) |     0(+0) |
| [lib]/stdc++.a       |   6452(+0) |    8(+0) |    44(+0) |
| mbed-os/cmsis        |   7732(+0) |  168(+0) |  5957(+0) |
| mbed-os/connectivity |     60(+0) |    0(+0) |     0(+0) |
| mbed-os/drivers      |   3880(+0) |    0(+0) |     0(+0) |
| mbed-os/hal          |   1728(+0) |    4(+0) |    66(+0) |
| mbed-os/platform     |   3504(+0) |  260(+0) |   352(+0) |
| mbed-os/rtos         |    868(+0) |    0(+0) |     0(+0) |
| mbed-os/targets      |   8348(+0) |    8(+0) |  1130(+0) |
| rover-stm/src        |  19922(+0) |   68(+0) |  8752(+0) |
| Subtotals            | 105792(+0) | 3000(+0) | 16440(+0) |
Total Static RAM memory (data + bss): 19440(+0) bytes
Total Flash memory (text + data): 108792(+0) bytes

Image: ./BUILD/NUCLEO_F446RE/GCC_ARM/rover-stm.bin
Looks like the build succeeded, at least.
(note that you need to use a monospaced font for the text layout to work)
 
 
Have you tried creating a simple blinky project, and downloading that?
 

The rover-stm project is a file within directories. Right now, the project is to just drive a rover. Since we haven't fully implemented the GPS into it yet, we are just using hardware tools to drive the device. 

For reference, I have pulled the microprocessor off of the project and disconnected it from everything and still get the issue. I tried connecting it to the project and all of the other devices as well and the same result occurred. 

I haven't tried to create a blinky project for this specific board yet. That is probably going to be my next stop and try that out either today or tomorrow. 

@Andrew Neil,

While this is an interesting information, I don't think the error messages we've seen from the st-link-project's utilities are related to the mbed tools used to compile/generate .bin.

I maintain that those utilities are of an obsolete version and/or incorrectly installed.

JW