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 #23805.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak authored and nashif committed Nov 17, 2020
1 parent d30ccfa commit b226e09
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 b226e09

Please sign in to comment.