Skip to content

Commit

Permalink
Bluetooth: controller: Fix ticker ticks_current value
Browse files Browse the repository at this point in the history
Update the ticks_current value on last stopped ticker
instance, so that when a new ticker instance is started
the anchor ticks calculation uses the correct current tick
with respect to supplied anchor ticks.

Fixes zephyrproject-rtos#23805.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak committed Sep 23, 2020
1 parent b7d23ce commit 1139137
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions subsys/bluetooth/controller/ticker/ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,7 @@ static inline void ticker_job_compare_update(struct ticker_instance *instance,
if (instance->ticker_id_head == TICKER_NULL) {
if (cntr_stop() == 0) {
instance->ticks_slot_previous = 0U;
instance->ticks_current = cntr_cnt_get();
}

return;
Expand Down

0 comments on commit 1139137

Please sign in to comment.