-
Notifications
You must be signed in to change notification settings - Fork 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
CY8CPROTO_062_4343W target failed on greentea watchdog test #11909
Comments
Internal Jira reference: https://jira.arm.com/browse/MBOTRIAGE-2371 |
We're able to reproduce this issue now. It looks like the cause is that the default test spec (if no mbed_app.json and nothing provided to mbed test --test-spec) uses a baudrate of 9600. We weren't seeing this initially as our CI provides an mbed_app.json that specifies 115200 as the baudrate. Can you confirm on your end that the tests will pass if the baudrate is set to 115200? |
@dustin-crossman , yes oddly all tests passed in 115200 baudrate I can reproduce that locally. |
We're not sure yet but we are looking into it. One interesting result we did see was in the tests-mbed_drivers-watchdog_reset in the test_simple_reset case. If the following lines
are changed to
the test will pass at 9600 baud. Perhaps all the data on the UART is not getting flushed out in time and that prevents the watchdog reset? |
@jamesbeyond I believe I've resolved these failures. I noticed while watching tests run locally that the test runner was sometimes not receiving messages that the test should have sent before resetting due to the watchdog (e.g the reset notification message in mbed_drivers-watchdog_reset). It appears that the tests are simply not waiting long enough at 9600 baud for everything in the UART FIFO to be read out. The tests define a SERIAL_FLUSH_TIME_MS value but the comment above it indicates that the value is calculated assuming a 16-byte Tx FIFO. The CY8CPROTO_062_4343W board has a 128-byte Tx FIFO so my fix was to simply increase the SERIAL_FLUSH_TIME_MS to 200 ms (from 20) and add a wait_ms to the end of the send_reset_notification functions in mbed_drivers-watchdog_reset and mbed_hal-watchdog_reset. Here is the minimal changes required: dustin-crossman@53ad5b3 Do this approach sound like a reasonable approach to fix the watchdog tests? Also the SERIAL_FLUSH_TIME_MS comment mentions that there is currently no mbed API to check if hardware buffers are empty. Do you know if there is any progress on that front? It seems like it would help a lot to prevent similar bugs on other hardware/tests. |
@jamesbeyond Have you looked at these possible fixes? |
Seems like this might have fallen off the radar with the holidays and everything. Has anyone taken a look at this? |
Hi @dustin-crossman , sorry for the delay, we'll try your fix, see if it fixed the watchdog issue |
@dustin-crossman, thanks for the patch and a detailed explanation. 👍 I consider this approach to be correct since we do not have the new serial API yet. @jamesbeyond, I'll prepare a fix for all tests that use |
Great news! Thanks! |
Description of defect
In mbed OS CI we currently keep getting watchdog greentea test failures on CY8CPROTO_062_4343W target with watchdog tests.
as earlier mentioned in #11792 with @dustin-crossman, we keep seeing watchdog test failing on this target, and the issue can be reproduced locally. so raise this issue to track the progress.
Not sure if any special HW settings/modifications are required to enable the watchdog feature?
Target(s) affected by this defect ?
CY8CPROTO_062_4343W
Toolchain(s) (name and version) displaying this defect ?
ARMC6/GCC_ARM
What version of Mbed-os are you using (tag or sha) ?
latest master
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
mbed-cli
andgreentea
How is this defect reproduced ?
run command:
and result on our side:
mbedgt: test suite report:
mbedgt: test suite results: 4 TIMEOUT / 1 OK
mbedgt: test case report:
mbedgt: test case results: 12 OK / 4 ERROR / 8 SKIPPED
mbedgt: completed in 390.01 sec
mbedgt: exited with code 4
The text was updated successfully, but these errors were encountered: