nRF9151 + XIAO BLE board — HCI UART connection error (Controller unresponsive, opcode 0x0C03 timeout)

Hi Nordic team,

I’m trying to use my nRF9151 DK as a Bluetooth Host (Zephyr) connected over UART (H:4) to an external Seeed XIAO BLE board (acting as the Controller).
My goal is to use the nRF9151 as the Bluetooth Host while the XIAO provides the HCI interface.

hci_uart with no flow-control has been successfully installed in xiao board with the output:  

SEGGER J-Link V8.72 - Real time terminal output
SEGGER J-Link V8.0, SN=-1
Process: JLink.exe
*** Booting nRF Connect SDK v3.0.2-89ba1294ac9b ***
*** Using Zephyr OS v4.0.99-f791c49f492c ***
[00:00:00.001,831] <err> hci_uart: Failed to enable USB
[00:00:00.002,044] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
89 9a 50 8a 95 01 9c 58 fc 39 d2 c1 10 04 ee 02 |..P....X .9......
64 ce 25 be |d.%.
[00:00:00.002,502] <inf> bt_hci_raw: Bluetooth enabled in RAW mode
Thread analyze:
HCI uart TX : STACK: unused 1352 usage 184 / 1536 (11 %); CPU: 1 %
: Total CPU cycles used: 1
thread_analyzer : STACK: unused 560 usage 464 / 1024 (45 %); CPU: 16 %
: Total CPU cycles used: 15
usbd_workq : STACK: unused 832 usage 192 / 1024 (18 %); CPU: 0 %
: Total CPU cycles used: 0
sysworkq : STACK: unused 320 usage 192 / 512 (37 %); CPU: 0 %
: Total CPU cycles used: 1
MPSL Work : STACK: unused 832 usage 192 / 1024 (18 %); CPU: 0 %
: Total CPU cycles used: 1
usbworkq : STACK: unused 832 usage 192 / 1024 (18 %); CPU: 0 %
: Total CPU cycles used: 0
logging : STACK: unused 976 usage 48 / 1024 (4 %); CPU: 0 %
: Total CPU cycles used: 0
idle : STACK: unused 272 usage 48 / 320 (15 %); CPU: 0 %
: Total CPU cycles used: 0
main : STACK: unused 1432 usage 616 / 2048 (30 %); CPU: 50 %
: Total CPU cycles used: 74
ISR0 : STACK: unused 1120 usage 928 / 2048 (45 %)

On nrf9151dk side, currently this code has been used:  

For CMakeLists.txt:  

# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(blinky)

target_sources(app PRIVATE src/main.c)
 
Proj.conf has content:  
CONFIG_BT=y
CONFIG_BT_HCI=y
CONFIG_BT_HCI_RAW=n

# Disable local BT controller (using external Xiao)
CONFIG_BT_CTLR=n
# Option 1: Try enabling BT peripheral (might enable bt_enable)
CONFIG_BT_PERIPHERAL=y

# Option 2: Enable BT libraries explicitly
CONFIG_BT_BROADCASTER=y
CONFIG_BT_OBSERVER=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_LOG=y
CONFIG_BT_HCI_CORE_LOG_LEVEL_DBG=y

# Device name
CONFIG_BT_DEVICE_NAME="nRF9151_Host"
nrf9151dk_nrf9151_ns.overlay file has:  
/ {
    chosen {
        zephyr,bt-hci = &bt_hci_uart;
    };
};

&uart2 {
    status = "okay";
    current-speed = <1000000>; // Match the Xiao board's HCI UART baudrate
    // hw-flow-control;
    pinctrl-0 = <&uart2_default>;
    pinctrl-1 = <&uart2_sleep>;
    pinctrl-names = "default", "sleep";
    bt_hci_uart: bt_hci_uart {
            compatible = "zephyr,bt-hci-uart";
            status = "okay";
        };
};

&pinctrl {
    uart2_default: uart2_default {
        group1 {
            psels = <NRF_PSEL(UART_TX, 0, 6)>,
                    <NRF_PSEL(UART_RX, 0, 7)>;
                    // <NRF_PSEL(UART_RTS, 0, 2)>,
                    // <NRF_PSEL(UART_CTS, 0, 3)>;
        };
    };

    uart2_sleep: uart2_sleep {
        group1 {
            psels = <NRF_PSEL(UART_TX, 0, 6)>,
                    <NRF_PSEL(UART_RX, 0, 7)>;
                    // <NRF_PSEL(UART_RTS, 0, 2)>,
                    // <NRF_PSEL(UART_CTS, 0, 3)>;
        };
    };
};
main.c:
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/sys/printk.h>
#include <zephyr/bluetooth/hci.h>

void main(void)
{
    int err = bt_enable(NULL);
    if (err) {
        printk("Bluetooth init failed (err %d)\n", err);
        return;
    }
    printk("Bluetooth initialized\n");
    // Add your application logic here (e.g., scanning, connecting, etc.)
}
Right now connection is:  
  • nRF9151 P0.06 → XIAO RX P1.12
  • nRF9151 P0.07 → XIAO TX P1.11
  • GND common
  • (no RTS/CTS for now)

After all this setup , I'm getting:  

*** Booting nRF Connect SDK v3.0.2-89ba1294ac9b ***
*** Using Zephyr OS v4.0.99-f791c49f492c ***
[00:00:00.298,583] <dbg> bt_hci_core: bt_hci_cmd_create: opcode 0x0c03 param_len 0
[00:00:00.298,614] <dbg> bt_hci_core: bt_hci_cmd_create: buf 0x20011070
[00:00:00.298,614] <dbg> bt_hci_core: bt_hci_cmd_send_sync: buf 0x20011070 opcode 0x0c03 len 3
[00:00:00.298,645] <dbg> bt_hci_core: bt_tx_irq_raise: kick TX
[00:00:00.298,675] <dbg> bt_hci_core: tx_processor: TX process start
[00:00:00.298,675] <dbg> bt_hci_core: hci_core_send_cmd: fetch cmd
[00:00:00.298,706] <dbg> bt_hci_core: hci_core_send_cmd: Sending command 0x0c03 (buf 0x20011070) to driver
[00:00:00.298,706] <dbg> bt_hci_core: bt_send: buf 0x20011070 len 3 type 1
[00:00:00.298,767] <dbg> bt_hci_core: bt_tx_irq_raise: kick TX
[00:00:00.298,797] <dbg> bt_hci_core: tx_processor: TX process start
ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:438
Controller unresponsive, command opcode 0x0c03 timeout with err -11
[00:00:10.299,011] <err> os: r0/a1: 0x00000003 r1/a2: 0x00000000 r2/a3: 0x00000002
[00:00:10.299,041] <err> os: r3/a4: 0x00000003 r12/ip: 0x00000010 r14/lr: 0x0000bf13
[00:00:10.299,041] <err> os: xpsr: 0x01000000
[00:00:10.299,041] <err> os: Faulting instruction address (r15/pc): 0x0000bf22
[00:00:10.299,102] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
[00:00:10.299,133] <err> os: Current thread: 0x2000d468 (unknown)
[00:00:10.358,337] <err> os: Halting system

Parents Reply Children
No Data
Related