-
Notifications
You must be signed in to change notification settings - Fork 3k
rtl8195am : fix greentea test fails (test_timeout & test_timerevent) #6522
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
rtl8195am : fix greentea test fails (test_timeout & test_timerevent) #6522
Conversation
Two greentea tests have the same issues. --Test-timeout, case ”Zero delay (attach)" and case” Zero delay (attach_us)” This issue is metioned in issue ARMmbed#6410 . --Test-timerevent, case "Test insert_absolute zero" and case "Test insert_absolute timestamp from the past”. RTL8195AM has a hardware limitation whitch is 31.5 us per tick for us_ticker. When execute these tests, it is necessary to wait at least two whole tick, 62us.
@M-ichae-l Thank you for looking into the issue and the technical explanation. We'll run morph test a couple of times since the issue is intermittent. /morph build |
Build : SUCCESSBuild number : 1635 Triggering tests/morph test |
Test : FAILUREBuild number : 1422 |
Exporter Build : SUCCESSBuild number : 1265 |
@M-ichae-l Thanks for the fix, I got one concern with the fix - tests should not contain ifdef targets (some code is not run for some), can this fix be made more generic? It can be applied to any other targets? If the ifdef is removed, will be test still valid and should pass for any hw ticker? @fkjagodzinski Can you please review? |
Hi, @0xc0170 |
If that is needed , should be done for all targets. Firstly, why is this actually needed ? Can't this be handled in the target implementation (the test stays as it is, target HAL for ticker needs an update?) ? Generally, test is generic, no "ifdef targets". The problem often is somewhere else than in the test if this is needed |
I suppose the mbed-os/targets/TARGET_NORDIC/TARGET_NRF5/us_ticker.c Lines 281 to 287 in c8bd08f
|
@M-ichae-l Did @fkjagodzinski answer it ? Can you update the tickers implementation? |
I have tried the |
What peripheral is used there? No other peripheral is available that would do the trick? where is this 31.5 us coming from? Can you describe the problem in detail. We shall find another solution to the problem, wait() does not solve it as it is presented here. |
Hi, @0xc0170 |
@M-ichae-l Now that #6536 is in, how does it affect this PR? |
Closing since #6536 appears to have solved the problem in a generic way and no response has been given in this PR. |
Description
Two greentea tests have the same issues.
This issue is metioned in issue Zero delay (attach) test fails for REALTEK_RTL8195AM #6410 .
RTL8195AM has a hardware limitation which is 30.5 us per tick for us_ticker. When execute these tests, it is necessary to wait at least two whole tick, 62 us.
Both of the tests, are using
Semaphore to release() attach callback with 0 delay
andwait() with 0 delay
, then compare thesem_slots
. However, when apply theattach callback
, the ticker is being used (https://docs.mbed.com/docs/mbed-os-api-reference/en/latest/APIs/tasks/Ticker/) and this is linked to the ticker hardware limitation.Pull request type
[X] Fix