-
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
Timing issue when reading the STM32L431 flash size gets result 0 #801
Comments
This is really weird, by changing timing it works. |
What is your libusb version, and which platform are you using e.g mingw, cygwin, visual studio? |
libusb version 1.0.22 I have tested with MinGW-w64 and Visual Studio 2017. Same issue with both. Same fix works with both as well. I will try building with GCC on Linux to see if I have the same issue there. |
I can confirm that the same issue exists when building with GCC 8.3.0 on Arch Linux. The same fix also works. I made my own program using libstlink and it exhibits the same behavior when reading flash size for the STM32L431. |
Thanks @bmarvo for investigating this more, good it has the same behaviour on two independent systems and configurations. Have you tried updating the firmware of the programmer to the latest? It is also common programmers itself can have bugs programmed too :=D |
@xor-gate I updated my programmers to the latest firmware (which stsw-link007 says is V2.J34.S7) and I'm still getting 0 for flash size without the delay. |
@xor-gate i had the same question.And i build the st-flash with a version of v1.5.1-28-gd040db5 in ubuntu 16.04 and gcc 5.4.0 20160609. further information:
|
The proposed fix has not made it into the code yet. Two questions from my side:
|
@Nightwalker-87 There is some strange behavior. Most likely it is related with a reset and may be fixed by #1071 |
Assumed to be closed by #1071. |
st-info
Flash size for STM32L431 reads 0.
Output:
I did some digging and found that I was able to get the flash size to read correctly every time by adding a delay before the read in common.c :
With the delay:
The delay is 10 milliseconds, but I just arbitrarily chose it.
I should also note that all other parameters (sram size, chip id, etc.) seem to read just fine as is.
The text was updated successfully, but these errors were encountered: