Skip to content

soc: arm: nordic: provide custom busy_wait implementations #11627

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

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

pabigot
Copy link
Collaborator

@pabigot pabigot commented Nov 23, 2018

Implementation taken from Nordic nrfx version 1.3.1 soc/nrfx_coredep.h,
modified to remove material from other series and to conform to Zephyr
coding standards.

Note that unlike standard k_busy_wait this is susceptible to
longer-than-intended delays due to the impact of interrupt handling.

Fixes #11626

Signed-off-by: Peter A. Bigot [email protected]

@pabigot pabigot requested a review from ioannisg as a code owner November 23, 2018 17:05
@zephyrbot
Copy link
Collaborator

zephyrbot commented Nov 23, 2018

All checks are passing now.

Review history of this comment for details about previous failed status.
Note that some checks might have not completed yet.

@pabigot pabigot force-pushed the issue/11626 branch 2 times, most recently from f898e57 to 7cfacc9 Compare November 23, 2018 17:34
@codecov-io
Copy link

codecov-io commented Nov 23, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@dc7e8a9). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #11627   +/-   ##
=========================================
  Coverage          ?   48.23%           
=========================================
  Files             ?      279           
  Lines             ?    43291           
  Branches          ?    10359           
=========================================
  Hits              ?    20881           
  Misses            ?    18270           
  Partials          ?     4140

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc7e8a9...3baa155. Read the comment docs.

@carlescufi
Copy link
Member

Thanks for this PR!
Since nrfx is part of Zephyr, is there a chance you could use the copy that already exists instead of copying it into soc.c?

@pabigot
Copy link
Collaborator Author

pabigot commented Nov 23, 2018

No; it comes from the soc subdirectory which isn't part of Zephyr.

@anangl
Copy link
Member

anangl commented Nov 26, 2018

Since nrfx is part of Zephyr, is there a chance you could use the copy that already exists instead of copying it into soc.c?

No; it comes from the soc subdirectory which isn't part of Zephyr.

We should make it part of Zephyr then.
The file (soc/nrfx_coredep.h) was not yet imported to Zephyr because so far there was no such need. Apparently, now such a need arose. I created a corresponding PR with this import, see #11644.

Copy link
Member

@anangl anangl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added z_arch_busy_wait functions should call nrfx_coredep_delay_us (once it is imported to Zephyr) instead of copying its content.

Implementation taken from Nordic nrfx version 1.3.1 soc/nrfx_coredep.h,
modified to remove material from other series and to conform to Zephyr
coding standards.

Note that unlike standard k_busy_wait this is susceptible to
longer-than-intended delays due to the impact of interrupt handling.

Fixes zephyrproject-rtos#11626

Signed-off-by: Peter A. Bigot <[email protected]>
@pabigot
Copy link
Collaborator Author

pabigot commented Nov 26, 2018

@anangl Requested modifications have been made.

Copy link
Member

@anangl anangl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for providing this PR and fixing the issue!

@carlescufi carlescufi merged commit d4b4b99 into zephyrproject-rtos:master Nov 26, 2018
@pabigot pabigot deleted the issue/11626 branch November 26, 2018 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants