-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
STM32L422CB: st-flash fails to flash ihex image #923
Comments
Who can take a closer look at this? |
I suggest a check with the same board and other flash tools so that we can confirm this is not a hardware problem. |
I tried with both, a genuine st link v2 and one of those cheap copies from china. It fails on both. I will look at the registers later when i have some more time. |
The "flash tools" I mentioned refers to openocd or the official tools by ST. Sorry for the ambiguous expression. When you check the register values, it would be better to print out |
Sorry for replying so late. |
The clue is that FLASH_SR shows PGSERR and PGAERR are set, that is, there are some alignment issues. If you can provide the general purpose register values after a failed programming (with Edit: Would be better if you can provide STM32_FLASH_SR original value before flashing. |
these are the registers after failed flash (connected without reset). Here the output with --debug set: |
@lulle2007200 in the mail I received you said that with —debug it flashes without error. I noticed that you edited it. If so, it may be a timing problem, just like that of f0 series. From the log, things seem to be fine before running. the general purpose registers hold values that are hard to explain. If r0 was zero at the very beginning, maybe some issues with functions that write values to registers? |
It didnt work, i messed up while trying to redirect output of st-flash to file. turned out it didnt run at all, but i had flashed it before using st link utilty... |
@lulle2007200: Any update on this? |
I kind of forgot about this. |
Now we are looking for a skilled developer who his somehow familiar with the L4 series to have the chance for a fix. |
I can confirm same issue on L0.
her is the .bin
After an unsuccessful flash I can only restart the board. |
One can assume that this issue has been fixed in #1113. |
Trying to flash a small hex file to a STM32L422CB. The hex file is fine, flashes successfully with st-link utility. st-flash erases the first 2kb page of flash successfully, but doesnt write the the hex file at all.
Futher we kindly ask you to describe the detected problem as detailed as possible and to add debug output if available, by using the following template:
Commandline-Output:
Expected/description:
Should flash the hex file without errors
The text was updated successfully, but these errors were encountered: