nimble/ll: Allow to tune time needed for scheduling next conn event

This works by allowing to shorten connection event end time by specified
number of us. This value should be tuned only after measuring performance
as depends on various factors like build optimisation, cache, clock
speed etc.
This commit is contained in:
Szymon Janc
2023-01-06 15:08:06 +01:00
parent df80b4c954
commit b90c5ecafb
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -939,6 +939,8 @@ ble_ll_conn_get_next_sched_time(struct ble_ll_conn_sm *connsm)
rem_us = connsm->anchor_point_usecs;
ble_ll_tmr_add_u(&ce_end, &rem_us, connsm->conn_itvl_usecs);
ce_end -= ble_ll_tmr_u2t_up(MYNEWT_VAL(BLE_LL_CONN_EVENT_END_MARGIN));
if (ble_ll_sched_next_time(&next_sched_time)) {
if (LL_TMR_LT(next_sched_time, ce_end)) {
ce_end = next_sched_time;
+9
View File
@@ -537,6 +537,15 @@ syscfg.defs:
range: 1..257
value: 32
BLE_LL_CONN_EVENT_END_MARGIN:
description: >
Extra time needed for scheduling next connection event. Setting this
value results in ending connection event sooner (in microseconds)
which gives more time to schedule next event. This value should be
tuned only after measuring performance as depends on various factors
like build optimisation, cache, clock speed etc.
value: 0
BLE_LL_STACK_SIZE:
description: >
This is the stack size for LL task.