-
Notifications
You must be signed in to change notification settings - Fork 3k
Increase stm32 timeout for spi transfers #4305
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
Conversation
Why not to use HAL_MAX_DELAY ? I would say it should be better than anything less than that. As we could see 10 might work for some, might not for others. As this is a limit of API that we use there (timeout is required, or is it? cant be set to 0?), then we shall use the max value possible? (I havent looked at internals of that function how this timeout is used, I just noticed that max delay defined and used in some places). |
@0xc0170 if using HAL_MAX_DELAY then there will be no timeout at all. |
I would agree with @0xc0170. With the current mbed HAL API there isn't a good way to convey timeout errors or to request one specifically. |
013357b
to
2f0cb16
Compare
Default timeout of 10ms was reported as an issue in ARMmbed#4300 There seems to be conditions or use cases where the system is loaded with higher priority tasks so that SPI transfer would be delayed more than 10ms. Recommendation from MBED team is to not implement any timeout at all as there is no defined API in MBED to inform application of error cases.
2f0cb16
to
7d17532
Compare
One could argue that MBED API could be enhanced ... |
I absolutely agree on that point! 😄 |
Thanks @LMESTM . We will consider this feedback for future improvements LGTM |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Description
Default timeout of 10ms was reported in #4300
There seems to be conditions or use cases where the system is loaded with
higher priority tasks so that SPI transfer would be delayed more than 10ms.
Status
This PR is sent because of request for a quick fix and this should unblock the situation, nevertheless I am not sure that the problem is entirely understood.
Steps to test or reproduce
How to reproduce the issue was not explained in the ticket.
The patch was not tested and needs to be tested by reporters of the issue #4300