-
Notifications
You must be signed in to change notification settings - Fork 3k
realtek rtl8195am SLEEP features implementation and lib updates #7715
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
realtek rtl8195am SLEEP features implementation and lib updates #7715
Conversation
1, lib updates. Sync with the latest rtl8195am SDK 2, Add sleep features. Add "sleep_ex_api.h", "sleep.c" and "sleep_api.c" 3, edit api files to fit new lib 4, Add license for bootloader 5, replace "us_ticker.c" with "us_ticker_api.c". To correct the return of "us_ticker_read(void)" and pass the "sleep_usticker_test" 6, rebase to resolve the conflits
Why the commit |
Can we split them as you have done them ? The description lists the changes accordingly (I would assume you worked from 1st to 2nd, etc.) so should also commits (it is very hard to review 80 file changes within one commit when they are squashed like this) Thanks for rebasing |
Let me edit the description and point out the file I have changed for each commit. Except for the first |
There are ways. You can Answer like here should help https://stackoverflow.com/questions/6217156/break-a-previous-commit-into-multiple-commits If you need help, I can create a branch and split them as I understand the changes from the review |
@0xc0170 |
@M-ichae-l I pulled the changes locally, I understand the first commit better now. Looks fine as it is In the future, updating libs and adding new functionality is better to be separated (own commit) |
@M-ichae-l Are the .a lib files a part of the SDK update? |
@cmonr |
/morph build |
Build : SUCCESSBuild number : 2758 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2387 |
Test : FAILUREBuild number : 2484 |
@M-ichae-l Looks like this still needs some work. Also, I corrected your PR description with the proper PR type formatting. |
@cmonr |
Build using Then run tests. This should produce the same binaries than this job here once you compile do |
@M-ichae-l To elaborate on what @0xc0170 mentioned, CI builds and runs tests seperately. That is to say, when we do a Morph Build, all examples, and tests for all targets in CI, for all compilers are built. When that succeeds, the success comment triggers a Morph Test which pulls the compiled binaries, unarchives them, and flashes and runs them. To compile with all of the flags, and be a bit closer to how CI runs the tests, first do a |
@cmonr
Could I know what are these macros used for? Are they affect the test hal_sleep? |
Line 38 in 56dd4bf
Please set -DMBED_CPU_STATS_ENABLED and see if that is causing failures? |
Please note the change in test case to accommodate sleep stats timing. https://github.com/ARMmbed/mbed-os/blob/master/TESTS/mbed_hal/sleep/main.cpp#L58 Would like to know delta measurements for Realtek. |
@deepikabhavnani @cmonr |
@c1728p9 - Enabling cpu stats, adds call to @M-ichae-l - Is low power ticker supported in
I am not sure why wakeup time is different in case stats are not enabled? |
@deepikabhavnani that seems to point to a problem. The function get_lp_ticker_data should not block. |
@deepikabhavnani |
I have finished the lp_ticker and us_ticker feature and tested. The test is under |
@M-ichae-l - Sorry for the delayed response. If lpticker is not enabled, stats are not enabled and calls to read data are empty. mbed-os/hal/mbed_sleep_manager.c Line 43 in 4005887
Also, I do see additional 10 ms for deepsleep mode. https://github.com/ARMmbed/mbed-os/blob/master/TESTS/mbed_hal/sleep/main.cpp#L65 Is there a chance that device enters deepsleep in sleep mode? Wake time of sleep mode should be less. |
1, update "sleep_api.c", "lp_ticker_api.c" and "us_ticker_api.c" 2, add "LPTICKER", "USTICKER" and "MBED_TICKLESS" in "targets.json"
@deepikabhavnani I have committed an updated version of |
@mprse @bulislaw @c1728p9 - tests-mbed_hal-sleep test fail as time to come out of deepsleep is long. Shall we update the test for special case of RTL8195AM or we have any other suggestions? |
Sleep should wake up the CPU in 10us according to the sleep specification. Relaxing this requirement to +1000us for the RTL8195AM is a problem as users can no longer rely on sleep executing quickly and low interrupt latency. @M-ichae-l have you investigated why the function |
I agree with Russ we have introduced the specification for a reason - we had issues with boards behaving differently. Relaxing set requirements would put as in the same situation we worked hard to get out from. |
@M-ichae-l Can you fix the sleep functionality? |
@0xc0170 @deepikabhavnani @c1728p9 @bulislaw Therefore, |
Updates of "sleep_api.c", "us_tucker_api.c" and "lp_ticker_api.c"
@M-ichae-l It looks like this is in need of a rebase. @0xc0170 @deepikabhavnani @c1728p9 @bulislaw any other comments? |
@M-ichae-l As this PR was reworked (should only contain sleep now, as the update lib and MCU_ addition was merged), shall we close this PR and a new one will be created - to start with a clean table in this case ? Another option is just close this one in the meantime, reopen with rebase/cleanup - only sleep implementiton addition |
@0xc0170 |
Description
1, lib updates. Sync with the latest rtl8195am SDK
2, Add sleep features. Add
"sleep_ex_api.h"
,"sleep.c"
and"sleep_api.c"
.3, edit api files to fit new lib and feature. Edit
"targets.json"
4, Add license under bootloader folder. Add
"LICENSE"
5, rebase to resolve the conflits from #7638
Pull request type