-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Bluetooth: Controller: nrf54lx: Fix address resolution wait #100214
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2723,6 +2723,23 @@ void radio_ar_status_reset(void) | |||||||||||||||||
| hal_radio_nrf_ppi_channels_disable(BIT(HAL_TRIGGER_AAR_PPI)); | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| static void ar_end_wait(void) | ||||||||||||||||||
| { | ||||||||||||||||||
| /* An arbitrary iteration which seems sufficient testing on target with one IRK to resolve. | ||||||||||||||||||
| * We should ideally be not be waiting anyway, and in theory be resolved before we are here. | ||||||||||||||||||
| */ | ||||||||||||||||||
| uint32_t countdown = 200U; | ||||||||||||||||||
|
||||||||||||||||||
|
|
||||||||||||||||||
| while ((NRF_AAR->EVENTS_END == 0U) && (countdown != 0U)) { | ||||||||||||||||||
| countdown--; | ||||||||||||||||||
|
|
||||||||||||||||||
| #if !defined(CONFIG_SOC_SERIES_NRF54LX) | ||||||||||||||||||
| /* We do not sleep on target SoC. */ | ||||||||||||||||||
| cpu_sleep(); | ||||||||||||||||||
| #endif /* !CONFIG_SOC_SERIES_NRF54LX */ | ||||||||||||||||||
|
Comment on lines
+2736
to
+2739
|
||||||||||||||||||
| #if !defined(CONFIG_SOC_SERIES_NRF54LX) | |
| /* We do not sleep on target SoC. */ | |
| cpu_sleep(); | |
| #endif /* !CONFIG_SOC_SERIES_NRF54LX */ | |
| #if !defined(CONFIG_SOC_COMPATIBLE_NRF54LX) | |
| /* We do not sleep on target SoC. */ | |
| cpu_sleep(); | |
| #endif /* !CONFIG_SOC_COMPATIBLE_NRF54LX */ |
Copilot
AI
Nov 28, 2025
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.
Missing error handling or status return when the countdown expires. If NRF_AAR->EVENTS_END remains 0 after the countdown completes, the calling code has no way to detect this timeout condition. This could mask hardware issues or unexpected delays.
Consider:
- Returning a status code from
ar_end_wait()to indicate success/timeout - Adding an assertion or error log when the timeout occurs
- Documenting the expected behavior when timeout happens
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.
Grammatical error: "be not be waiting" should be "not be waiting".