-
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
Flash_loader: increase wait rounds for slow boards #1085
Conversation
I'll probably not change this unless there has been widespread testing with various other board types and / or programmers. |
I am a bit confused. It seems that this particular commit does not change the wait time ideally, without considering the operating system scheduler and the function call cost which may cause the sleep time to be longer than expected. Anyway, since there are some boards that may be affected by this timing issue, I think increasing this period is fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seeseemelk I think it's better to rewrite this part to use time_ms(). This will make possible to set the timeout in ms.
stlink/src/stlink-lib/helper.h
Line 4 in 4bfaab0
unsigned time_ms(); |
@Ant-ON Sounds like a good idea to me. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on the idea to rewrite this part in order to have to have a flexible solution.
@slyshykO: What's your opinion on this? |
I am Ok with increasing wait time. |
@seeseemelk: Are you going to address the proposal from @Ant-ON ? |
I'm afraid I don't really have the time to focus on this at the moment, especially given that we are switching from ST-Links to J-Links. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to let this pass, but shall there be any regression bug reports, that point back to this, we should not continue to tune this setting frequently.
Certain systems can take a while to boot and flash (because of a slow power supply or because the core is running at a lower clock speed).
Commit b8813fa broke st-link for several of our boards. Increasing the
WAIT_ROUNDS
define by a little fixes the issues.This was tested on a custom board with an STM32L471 and a custom board with an STM32L496.