-
Notifications
You must be signed in to change notification settings - Fork 3k
Remove wait in MBED_11 test (mbed 2) #5842
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 did it become unstable? How wait(1) affects the rest of the code? |
|
I checked different values passed to the wait function: |
@mprse Can you check this test, and confirm that wait should be fine to have (in mbed 2 context, this is a blocking call) |
MBED_11 test log I have with wait(1.0): IAR
GCC_ARM
ARM
|
This test is for mbed 2, no rtos involved. Printf in ISR is bad practice, therefore if we can rewrite Leaving wait() there, we read time almost constantly from the ticker. There is an interrupt happening regularly. I suspect reading is causing a problem here. The test without wait() would be fine, but there should be also wait (or at least constantly reading time, to test how ticker is handling reading/interrupt handling) ? What are the failures? |
As suggested I have replaced the I use a NUCLEO_L476RG board but this issue has been seen on all of our boards.
Edit: I tested again with wait(0.5) and still FAIL... |
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 that, in no RTOS (OS2), wait function should not be called
@jeromecoutant Wait should not matter and should be functional though, thus I suspect removing it we are hiding a potential bug in a target's ticker code (read the time and execute a ticker interrupt) |
For information, issue is not related to STM32 only: | FAIL | K64F | ARM | MBED_11 | Ticker Int | 3.38 | 15 | 0/1 | With patch: | OK | K64F | ARM | MBED_11 | Ticker Int | 11.38 | 15 | 1/1 | |
I noticed the above exchange Serial still does not fix the problem. I reproduced this issue locally. Fix it, as above mentioned, use RawSerial from interrupt handler callback.
Tested with K64F and GCC - OK Can you confirm? |
@bcostm Can you test my proposal? |
Yes I'm going to. I jumped on the UART IRQ issue and didn't have time to test your proposal yet. |
I confirm that the use of RawSerial fixes the problem. I have tested it with ARM, IAR and GCC several times. I have also changed the delay in the while loop and it is pass all the time. 👍 How do we proceed now ? I think I should close this PR and I (or someone else) should create another one to change the RawSerial. |
thanks ! |
I close it and I'll open a new one. |
Description
Remove the wait loop present in the main function for the MBED_11 test for mbed 2
Status
READY
Migrations
NO
ST_INTERNAL_REF 39289