Bluetooth: Controller: Reduce successive ticker_job() on Extended Scan
Reduce number of successive calls to ticker_job() by disabling mayflies in the ULL_HIGH priority, enqueue ticker_yield_abs() and ticker_start() before re-enabling so that single ticker_job() handles both yield and start. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
c1042dff40
commit
02b1c76820
1 changed files with 14 additions and 0 deletions
|
@ -682,6 +682,13 @@ void ull_scan_aux_setup(memq_link_t *link, struct node_rx_hdr *rx)
|
|||
|
||||
ticks_aux_offset = HAL_TICKER_US_TO_TICKS(aux_offset_us);
|
||||
|
||||
#if (CONFIG_BT_CTLR_ULL_HIGH_PRIO == CONFIG_BT_CTLR_ULL_LOW_PRIO)
|
||||
/* disable ticker job, in order to chain yield and start to reduce
|
||||
* CPU use by reducing successive calls to ticker_job().
|
||||
*/
|
||||
mayfly_enable(TICKER_USER_ID_ULL_HIGH, TICKER_USER_ID_ULL_LOW, 0);
|
||||
#endif
|
||||
|
||||
/* Yield the primary scan window or auxiliary or periodic sync event
|
||||
* in ticker.
|
||||
*/
|
||||
|
@ -714,6 +721,13 @@ void ull_scan_aux_setup(memq_link_t *link, struct node_rx_hdr *rx)
|
|||
((ticker_status == TICKER_STATUS_FAILURE) &&
|
||||
IS_ENABLED(CONFIG_BT_TICKER_LOW_LAT)));
|
||||
|
||||
#if (CONFIG_BT_CTLR_ULL_HIGH_PRIO == CONFIG_BT_CTLR_ULL_LOW_PRIO)
|
||||
/* enable ticker job, queued ticker operation will be handled
|
||||
* thereafter.
|
||||
*/
|
||||
mayfly_enable(TICKER_USER_ID_ULL_HIGH, TICKER_USER_ID_ULL_LOW, 1);
|
||||
#endif
|
||||
|
||||
return;
|
||||
|
||||
ull_scan_aux_rx_flush:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue