Skip to content
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

Merged
merged 1 commit into from Mar 14, 2019

Conversation

Projects
None yet
7 participants
@mikisch81
Copy link
Contributor

commented Feb 28, 2019

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 using wait_ns() which does software-loop based delays.

  • only last commit is relevant, other commits are from #9812.

Fixes #9853

Depends on #9812

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@kjbracey-arm

Release Notes

Some targets have no usticker. Fallback to use busy loop wait_ns() for cases like this.

@mikisch81

This comment has been minimized.

Copy link
Contributor Author

commented Feb 28, 2019

@ciarmcom ciarmcom requested review from kjbracey-arm, Ronny-Liu and ARMmbed/mbed-os-maintainers Feb 28, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Feb 28, 2019

@deepikabhavnani

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2019

@mikisch81 - Please note #9812 is not verified for Cortex-M33 devices and #9853 issue is for Cortex-M33 devices

#9812 (comment)

@kjbracey-arm
Copy link
Contributor

left a comment

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...

@mikisch81

This comment has been minimized.

Copy link
Contributor Author

commented Mar 1, 2019

@kjbracey-arm do you have a cm33 device to test it?
I can try and run the tests on the Musca_a1.
@jeromecoutant can you test it on the L5 port?

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

do you have a cm33 device to test it?

No.

@mikisch81

This comment has been minimized.

Copy link
Contributor Author

commented Mar 1, 2019

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...

The greentea tests are running in the non-secure part which has usticker.

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

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.

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

You probably need to rebase this now that the wait_ns PR is in - the commits are still showing up here.

@0xc0170 0xc0170 force-pushed the kfnta:wait_us_no_usticker branch to 276ef91 Mar 1, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

Rebased

@0xc0170

0xc0170 approved these changes Mar 1, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

Anyone from @ARMmbed/mbed-os-core for review?

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Mar 8, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

Set to needs: CI to execute tests (will come most likely after reviews)

@deepikabhavnani
Copy link
Contributor

left a comment

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

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Mar 9, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr added ready for merge and removed needs: CI labels Mar 13, 2019

@0xc0170 0xc0170 merged commit 943254c into ARMmbed:master Mar 14, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(-52 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9163 cycles
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.