Bluetooth: controller: Fix for scanner Rx window hang
With the fix in commit 3c23c6f53d
("Bluetooth: controller:
Fix assert due to stale tick count") it is required that a
skipping event shall abort the previous role in order to
enable the ticker_job to resume and reschedule next ticker
expiry.
In the scan_adv sample, with continuous scanning, an
advertiser would pre-empt it, but if the advertiser skipped
its event without aborting the scanner, the scanner is hung
with its rx window without a timeout, and HCI command to
stop the advertiser will wait forever to complete.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
80a796b493
commit
b5235207d3
1 changed files with 6 additions and 0 deletions
|
@ -4358,6 +4358,12 @@ static u32_t event_common_prepare(u32_t ticks_at_expire,
|
|||
/* Check for stale ticks_at_expire */
|
||||
if (ticker_ticks_diff_get(ticker_ticks_now_get(), ticks_at_expire) >
|
||||
TICKER_US_TO_TICKS(RADIO_TICKER_START_PART_US)) {
|
||||
/* Abort any running role, as it probably is the cause for
|
||||
* stale ticks_at_expire.
|
||||
*/
|
||||
event_stop(0, 0, 0, (void *)STATE_ABORT);
|
||||
|
||||
/* TODO: How much consecutive skips is tolerable? */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue