meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sw:zephyr:hciuart [2025/04/15 12:21] – niziak | sw:zephyr:hciuart [2025/05/03 20:56] (current) – niziak | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== hciuart ====== | ====== hciuart ====== | ||
+ | |||
+ | ===== ASSERTION FAIL lll_peripheral.c: | ||
+ | |||
+ | < | ||
+ | rtt:~$ ASSERTION FAIL [0] @ WEST_TOPDIR/ | ||
+ | rtt: | ||
+ | rtt:~$ [00: | ||
+ | rtt:~$ [00: | ||
+ | rtt:~$ [00: | ||
+ | rtt:~$ [00: | ||
+ | rtt:~$ [00: | ||
+ | rtt:~$ [00: | ||
+ | |||
+ | rtt:~$ [00: | ||
+ | rtt:~$ [00: | ||
+ | rtt: | ||
+ | rtt:~$ *** Booting Zephyr OS build v4.1.0 *** | ||
+ | rtt:~$ [00: | ||
+ | </ | ||
+ | |||
+ | <file c zephyr/ | ||
+ | #define EVENT_OVERHEAD_PREEMPT_US | ||
+ | #define EVENT_OVERHEAD_PREEMPT_MIN_US 0 | ||
+ | |||
+ | #if defined(CONFIG_BT_CTLR_XTAL_ADVANCED) && (EVENT_OVERHEAD_PREEMPT_US <= EVENT_OVERHEAD_PREEMPT_MIN_US) | ||
+ | uint32_t overhead; | ||
+ | |||
+ | overhead = lll_preempt_calc(ull, | ||
+ | /* check if preempt to start has changed */ | ||
+ | if (overhead) { | ||
+ | LL_ASSERT_OVERHEAD(overhead); | ||
+ | |||
+ | radio_isr_set(lll_isr_abort, | ||
+ | radio_disable(); | ||
+ | |||
+ | return -ECANCELED; | ||
+ | } | ||
+ | #endif /* CONFIG_BT_CTLR_XTAL_ADVANCED */ | ||
+ | |||
+ | </ | ||
+ | |||
+ | <file c zephyr/ | ||
+ | #if defined(CONFIG_BT_CTLR_ASSERT_OVERHEAD_START) | ||
+ | #define LL_ASSERT_OVERHEAD(overhead) \ | ||
+ | LL_ASSERT_MSG(false, | ||
+ | __func__, HAL_TICKER_TICKS_TO_US(overhead)); | ||
+ | #else /* !CONFIG_BT_CTLR_ASSERT_OVERHEAD_START */ | ||
+ | #define LL_ASSERT_OVERHEAD(overhead) ARG_UNUSED(overhead) | ||
+ | #endif /* !CONFIG_BT_CTLR_ASSERT_OVERHEAD_START */ | ||
+ | </ | ||
+ | |||
+ | <file kconfig zephyr/ | ||
+ | config BT_CTLR_ASSERT_OVERHEAD_START | ||
+ | bool " | ||
+ | default y | ||
+ | help | ||
+ | Assert on increased Radio Event Prepare callback latencies due to | ||
+ | CPU usage overheads in the Controller implementation. | ||
+ | |||
+ | Disabling this option permits the Controller to gracefully skip radio | ||
+ | events that are delayed due to CPU usage latencies; as long as the | ||
+ | radio event skips are not for every consecutive radio event interval, | ||
+ | otherwise leading to remote supervision timeout and possible missing | ||
+ | local disconnect events. | ||
+ | </ | ||
+ | |||
+ | Similar reports: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | Workaround / fixes: | ||
+ | * reduce CPU usage: | ||
+ | * disable packet hexdump to RTT | ||
+ | * disable BT debug logs | ||
+ | * lower all NRF peripherial IRQ prio to 5 (override.dtsi) | ||
+ | * set radio IRQ priority to 0 (dts) | ||
+ | |||
+ | |||
+ | ===== Out-of-order packet arrived ===== | ||
+ | |||
+ | < | ||
+ | hci0: Too short H5 packet | ||
+ | hci0: Out-of-order packet arrived | ||
+ | </ | ||
===== configuration ===== | ===== configuration ===== | ||
Line 12: | Line 98: | ||
* **CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255** | * **CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255** | ||
* This value does not include the HCI Event header. The minimum size is set based on the Advertising Report. Setting the buffer size different than BT_BUF_EVT_RX_SIZE can save memory. | * This value does not include the HCI Event header. The minimum size is set based on the Advertising Report. Setting the buffer size different than BT_BUF_EVT_RX_SIZE can save memory. | ||
- | * **CONFIG_BT_MAX_CONN=16** | + | * **CONFIG_BT_MAX_CONN=16** |
* **CONFIG_BT_CTLR_DTM_HCI=y** | * **CONFIG_BT_CTLR_DTM_HCI=y** | ||
Line 19: | Line 105: | ||
* **CONFIG_BT_LL_SW_SPLIT=y** Use Zephyr software Bluetooth LE Link Layer ULL LLL split implementation. | * **CONFIG_BT_LL_SW_SPLIT=y** Use Zephyr software Bluetooth LE Link Layer ULL LLL split implementation. | ||
* **CONFIG_BT_LLL_VENDOR_NORDIC=y** Use Nordic Lower Link Layer implementation. | * **CONFIG_BT_LLL_VENDOR_NORDIC=y** Use Nordic Lower Link Layer implementation. | ||
- | * CONFIG_BT_HCI_ACL_FLOW_CONTROL=y Enable support for throttling ACL buffers from the controller to the host. | + | |
* This is particularly useful when the host and controller are on separate cores since it ensures that we do not run out of incoming ACL buffers. | * This is particularly useful when the host and controller are on separate cores since it ensures that we do not run out of incoming ACL buffers. | ||
* **CONFIG_BT_BUF_ACL_TX_COUNT=7** Number of outgoing ACL data buffers | * **CONFIG_BT_BUF_ACL_TX_COUNT=7** Number of outgoing ACL data buffers |