Skip to content

Conversation

dpgeorge
Copy link
Member

@dpgeorge dpgeorge commented May 19, 2021

In this PR:

  • Add soft_timer_reinsert() helper function.
  • Change from systick to soft-timer for BT scheduling. Instead of using systick the BT subsystem is now scheduled using a soft timer. This means it is scheduled only when it is enabled.
  • Provide an efficient, custom BTstack runloop. It reschedules the BT HCI poll soft timer so that it is called exactly when the next timer expires.

TODO:

  • more testing with combinations of NimBLE, BTstack, sync/non-sync BLE events, and WB55 boards

@dpgeorge dpgeorge force-pushed the stm32-btstack-runloop branch 2 times, most recently from a012613 to 05a78eb Compare May 20, 2021 02:29
@dpgeorge dpgeorge force-pushed the stm32-btstack-runloop branch 2 times, most recently from d874890 to 1ca851b Compare June 22, 2021 02:38
dpgeorge added 4 commits June 23, 2021 13:14
And call mp_pairheap_init_node() in soft_timer_static_init() so that
reinsert can be called after static_init.

Signed-off-by: Damien George <damien@micropython.org>
Instead of using systick the BT subsystem is now scheduled using a soft
timer.  This means it is scheduled only when it is enabled.

Signed-off-by: Damien George <damien@micropython.org>
It reschedules the BT HCI poll soft timer so that it is called exactly when
the next timer expires.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the stm32-btstack-runloop branch from 1ca851b to 0fc0f75 Compare June 23, 2021 03:32
@dpgeorge dpgeorge merged commit 0fc0f75 into micropython:master Jun 23, 2021
@dpgeorge dpgeorge deleted the stm32-btstack-runloop branch June 23, 2021 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant