Draft
Clean up MRAM no-latency unit test after race mitigation redesign#23
Conversation
nrf54h20 cpurad bt_ll_sw_split support. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
FICR compile error fixed ECB compile error fixed SWI compile error fixed draft modification for radio Update radio.c due to miss some device check Signed-off-by: Jui-Chou Chung <jui-chou.chung@nordicsemi.no> Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added initial implementation for nrf54hx LF clock control. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added initial implementation for nrf54hx GRTC use for Radio. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added initial implementation for nrf54hx HF clock control. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added initial implementation for nrf54hx MRAM no latency control. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added implementation to mitigate nrf54hx MRAM no latency control race. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
nRF54H20 cpuapp peripheral_hr quirks. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
nRF54H20 cpuapp hci_usb quirks. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
nRF54H20 cpurad hci_ipc quirks for ISO support Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
nRF54H20 cpurad hci_usb quirks for ISO support Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add comprehensive unit test at tests/bluetooth/controller/radio_nrf54hx_mram/ that validates the reference-counting behavior of MRAM no-latency requests and releases through radio_reset() and radio_stop() operations. Test cases include: - n requests and n releases result in OFF state - (n+1) requests and n releases result in ON state - Interleaved reset/stop operations - Single radio event cycle - Single reset without stop - Zero requests callback - Multiple callbacks maintaining state The test uses stub implementations for mram_no_latency_request() and mram_no_latency_cancel_or_release() to track pending_requests counter, and mram_no_latency_callback() to resolve the async state. Co-authored-by: cvinayak <6350656+cvinayak@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add unit test for MRAM no-latency state management
tests: Add unit test for nRF54H20 MRAM no-latency state management
Feb 8, 2026
…ol race Added implementation to mitigate nrf54hx MRAM no latency control race. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
3c1eab9 to
0ff3170
Compare
cvinayak
added a commit
that referenced
this pull request
Feb 9, 2026
cvinayak
added a commit
that referenced
this pull request
Feb 9, 2026
520deb1 to
33ce3e3
Compare
…ol race Added implementation to mitigate nrf54hx MRAM no latency control race. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
…header - Remove #if 0 dead code block from mram_no_latency_callback() - Add missing <zephyr/sys/atomic.h> include for atomic operations - Keep the improved implementation that handles multiple requests/cancels Co-authored-by: cvinayak <6350656+cvinayak@users.noreply.github.com>
Document the sophisticated race condition mitigation design: - Atomic reference counting strategy (mram_refcnt) - Request/release tracking mechanism (start_req/stop_req) - Race condition scenarios and handling - Callback behavior and state resolution logic This explains how multiple radio_reset/radio_stop calls are handled before async callback generates, preventing race conditions. Co-authored-by: cvinayak <6350656+cvinayak@users.noreply.github.com>
Copilot
AI
changed the title
tests: Add unit test for nRF54H20 MRAM no-latency state management
Clean up MRAM no-latency unit test after race mitigation redesign
Feb 11, 2026
0e0746d to
15252bd
Compare
2582a3b to
29f739a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The unit test was updated to validate a redesigned MRAM no-latency management that handles multiple
radio_reset()/radio_stop()calls before async callback completion. This PR cleans up the implementation.Changes
#if 0block containing superseded callback implementation<zephyr/sys/atomic.h>for atomic operations (atomic_inc,atomic_dec,atomic_get)Design Summary
The implementation prevents race conditions through:
mram_refcnt): Only first reset requests MRAM no-latency, only last stop releasesstart_req/stop_req): Volatile counters accumulate operations between callbacksreset → stop(pending) → callback → releasereset → stop → reset → callback → state_retainedThis mirrors the actual
hal_radio_reset()/hal_radio_stop()implementation for nRF54H20 cpurad Bluetooth Controller support.Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.