doc/connectivity/bluetooth/bluetooth-ctlr-arch.rst
.. _bluetooth-ctlr-arch:
LE Controller #############
Overview
.. image:: img/ctlr_overview.png
#. HCI
#. HAL
#. Ticker
#. LL_SW
#. Util
Architecture
.. image:: img/ctlr_exec_overview.png
.. image:: img/ctlr_arch_overview.png
Scheduling
.. image:: img/ctlr_sched.png
.. image:: img/ctlr_sched_ticker.png
.. image:: img/ctlr_sched_ull_lll.png
.. image:: img/ctlr_sched_variant.png
.. image:: img/ctlr_sched_ull_lll_timing.png
Event Handling
.. image:: img/ctlr_sched_event_handling.png
.. image:: img/ctlr_sched_msc_close_events.png
.. image:: img/ctlr_sched_msc_event_abort.png
.. image:: img/ctlr_sched_msc_event_cancel.png
.. image:: img/ctlr_sched_msc_event_preempt.png
Data Flow
.. image:: img/ctlr_dataflow_tx.png
.. image:: img/ctlr_dataflow_rx.png
Execution Priorities
.. image:: img/ctlr_exec_prio.png
Event handle (0, 1) < Event preparation (2, 3) < Event/Rx done (4) < Tx request (5) < Role management (6) < Host (7).
LLL is vendor ISR, ULL is Mayfly ISR concept, Host is kernel thread.
Link Layer Control Procedures
Following is a brief fly in on the main concepts in the implementation of control procedures handling in ULL.
HCI/LLCP API
lll_prepare context to drive ull_cp_run()
rx_demux context to drive ull_cp_tx_ack() and ull_cp_rx()
struct llcp_struct
struct proc_ctx
struct llcp_mem_pool
Miscellaneous pdu gymnastics
ull_llcp_local.c
ull_llcp_remote.c
ull_llcp_common/conn_upd/phy/enc/cc/chmu.c
Procedure collision handling
Termination handling
New remote procedure handling
Miscellaneous minors
Individual ZTEST unit test for each procedure
Rx node handling is mocked
Emulated versions of rx_demux/prepare context used in unit tests - testing ONLY procedure PDU flow
Lower Link Layer
.. image:: img/ctlr_exec_lll.png
.. image:: img/ctlr_exec_lll_resume_top.png
.. image:: img/ctlr_exec_lll_resume_bottom.png
Bare metal utilities
.. image:: img/ctlr_mfifo_memq.png
.. image:: img/ctlr_mayfly.png
Legacy Controller
.. image:: img/ctlr_legacy.png
Bluetooth Low Energy Controller - Vendor Specific Details
The Nordic Semiconductor Bluetooth Low Energy Controller implementation requires the following hardware peripherals.
.. list-table:: SoC Peripheral Use :header-rows: 1 :widths: 15 15 15 10 50
.. [a] Real Time Counter (RTC) .. [b] Programmable Peripheral Interconnect (PPI) .. [c] Distributed Programmable Peripheral Interconnect (DPPI) .. [d] Software Interrupt (SWI) .. [e] Random Number Generator (RNG) .. [f] AES Electronic Codebook Mode Encryption (ECB) .. [g] Cipher Block Chaining (CBC) - Message Authentication Code with Counter Mode encryption (CCM) .. [h] Accelerated Address Resolver (AAR) .. [i] General Purpose Input Output (GPIO) .. [j] GPIO tasks and events (GPIOTE) .. [k] Temperature sensor (TEMP) .. [l] Universal Asynchronous Receiver Transmitter (UART) .. [m] Interprocess Communication peripheral (IPC)
.. [0] :kconfig:option:CONFIG_BT_CTLR_TIFS_HW =n
.. [1] :kconfig:option:CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER =y
.. [2] When not using pre-defined PPI channels
.. [3] For software-based tIFS switching
.. [4] Drivers that use nRFx interfaces
.. [5] For nRF53x Series