-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Bluetooth: Controller: Separate Tx/Rx frame spacing #79113
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
Bluetooth: Controller: Separate Tx/Rx frame spacing #79113
Conversation
|
@Thalley any idea what happened in the bsim nrf5340 testing of unicast client in this PR? |
Looks like one device gets a segmentation fault which triggers a CIS disconnect. The client, attempting to send, does not get the callback that the stream is stopped until after a few TX attempts it seems |
ok... it does not say which, app core or net core crashes... will try running at desk to determine the cause. |
The segmentation fault is due to having @Thalley The audio samples will need to be ported to gracefully handle |
Huh, weird, thought I had fixed all the |
d19fabd to
f49c8c9
Compare
subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c
Outdated
Show resolved
Hide resolved
subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c
Outdated
Show resolved
Hide resolved
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.
Is 0 right here? Shouldn't it be 1?
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.
0 is valid value and here it represents a 500 us unit. A minimum meaningful 1 byte data PDU (120us), hence 394 (120 + 120 + 154 tIFS) could in theory be a connection interval, hence not ruling out 500 us unit.
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.
Hmm, 0 means 500us sounds weird to me :D If ms isn't possible to use, then perhaps these macros should be in us instead? It sounds weird that an interval of 0 is not in fact 0.
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.
Hmm, this looks kind of odd. I guess it makes sense to send a notification every 1ms when testing with 1ms conn interval, but why are we sending every 1 second if not? What if the interval is 10ms, shouldn't we send every 10ms then? What if the connection interval is 4 seconds?
Shouldn't we just ignore the Kconfig values and just always sleep for the current connection interval?
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.
The original (probably the very first) bsim test simulated a peripheral HR service where the notification were 1 second apart. Do not want to change the existing test behavior in this PR.
Only the verification that the number of notifications received in the 3 seconds of simulation has been updated.
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.
Do not want to change the existing test behavior in this PR.
We can create a PR modifying the behavior to use the connection interval first, and then you wouldn't need this change at all ;)
b594237 to
8c6b473
Compare
6dad110 to
e7aebe2
Compare
Minor updates and correction to code comments. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Add defines for radio timer capture and compare indices used in the nRF Radio HAL implementation. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Add radio timer ISR usage support. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Introduce deferred ACL Tx packet transmission setup by radio, so that an enqueued ACL Data packet can be transmitted with the shortest latency. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Added test to verify deferred ACL Tx transmission setup, such that GATT discovery completes with least latency and GATT notifications can be received earliest after connection establishment. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Separate Tx/Rx frame spacing. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 ms connection interval support. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Test 1ms connection interval support. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
e7aebe2 to
a279993
Compare
Thalley
left a comment
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.
As usual, my reviews for the controller does not verify the correctness of the implementation as I don't know all the details, but CI is passing and the changes look OK to me
| /* Event interframe timings */ | ||
| #define EVENT_IFS_US 150 | ||
| /* Event interframe timings, default */ | ||
| #define EVENT_IFS_DEFAULT_US EVENT_IFS_US | ||
| /* Standard allows 2 us timing uncertainty inside the event */ | ||
| #define EVENT_IFS_MAX_US (EVENT_IFS_US + EVENT_CLOCK_JITTER_US) |
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.
What's the purpose of the duplicated #define?
If we intend to keep it, should that be used for EVENT_IFS_MAX_US since that refers to a "standard"?
Will these 2 ever be different?
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.
Looks like there is inconsistent use of EVENT_IFS_US, EVENT_IFS_MAX_US, + 4, - 4andEVENT_CLOCK_JITTER_US` .... this needs clean, but out side the scope of this PR.
Separate Tx/Rx frame spacing.
Blocked by defines in #79584