-
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
wait_us without usticker #9896
wait_us without usticker #9896
Conversation
@mikisch81, thank you for your changes. |
@mikisch81 - Please note #9812 is not verified for Cortex-M33 devices and #9853 issue is for Cortex-M33 devices |
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.
If you are actually working on an M33, it would be awesome if you could confirm the timing.
I was about to suggest using the wait_ns
test, but I now realise that it actually also assumes that you have USTICKER
- it tests against us_ticker unconditionally and against lp_ticker if available.
Might have to use a stopwatch...
@kjbracey-arm do you have a cm33 device to test it? |
No. |
The greentea tests are running in the non-secure part which has usticker. |
Okay, tolerances are set very high (45%) on the test as checked in - to allow for flash wait states etc, so a "pass" isn't tight enough to show whether the scaling number is definitely correct. If you just reduce those numbers right down to a couple of percent, you should be able to confirm how tight it is - tell if the 5 cycles is correct. |
You probably need to rebase this now that the |
Rebased |
Anyone from @ARMmbed/mbed-os-core for review? |
Set to needs: CI to execute tests (will come most likely after reviews) |
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.
Change looks good, only concern was for M33 which is fixed in LPC PR.
Not sure if this needs rebase
We might need to document somewhere that this change is only for secure side and US_TICKER is still needed for all targets
CI started |
Test run: SUCCESSSummary: 13 of 13 test jobs passed |
Description
Some targets (Mainly PSA secure targets running TF-M) have no usticker.
In order to support
wait_us()
in these targets (mbed_die()
uses it for example),wait_us()
is implemented usingwait_ns()
which does software-loop based delays.Fixes #9853
Depends on #9812
Pull request type
Reviewers
@kjbracey-arm
Release Notes
Some targets have no usticker. Fallback to use busy loop
wait_ns()
for cases like this.