Skip to content

Conversation

@lemrey
Copy link
Contributor

@lemrey lemrey commented Jan 8, 2026

Use k_cpu_idle() instead of the WFE, SEV, WFE pattern.

k_cpu_idle() uses WFI underneath which is simpler than WFE and should be good enough for our purposes since we are only using one core and nothing is sending events using SEV.

Although k_cpu_idle() masks all interrupts using PRIMASK, it has minimal and predictable latency before re-enabling them, so it should not affect SoftDevice operation.

Use k_cpu_idle() instead of the WFE, SEV, WFE pattern.

k_cpu_idle() uses WFI underneath which is simpler than WFE and should be
good enough for our purposes since we are using only one core and
nothing is sending events using SEV.

Although k_cpu_idle() masks all interrupts using PRIMASK,
it has a predictable latency before re-enabling them, so it should
not affect SoftDevice operation.

Signed-off-by: Emanuele Di Santo <[email protected]>
@lemrey lemrey requested review from a team and rghaddab as code owners January 8, 2026 13:50
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 8, 2026
@eivindj-nordic
Copy link
Contributor

I was expecting a manifest update with these changes? Or was that only for sleep?

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

You can find the documentation preview for this PR here.

@lemrey
Copy link
Contributor Author

lemrey commented Jan 8, 2026

I was expecting a manifest update with these changes? Or was that only for sleep?

That only affects k_sleep()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants