Skip to content

Commit 4b905a3

Browse files
ppryga-nordicnordicjm
authored andcommitted
[nrf fromtree] drivers: hci: ipc: Make IPC endpoint bound timeout configurable
The HCI IPC endpoint bound timeout value was hardcoded and set to 1000 ms. This value may be differ between platforms, for exampel due to extended boot time. The default value used was a bit short for multicore SoCs that usually may wait for some other service reposnes for similar time. That may lead to timeout error while other end of an endpoint was slightly late. Change the default duration to 2000 ms to give more room for possible delays. Signed-off-by: Piotr Pryga <[email protected]> (cherry picked from commit ceb4298) Signed-off-by: Piotr Pryga <[email protected]>
1 parent 71f3da0 commit 4b905a3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

drivers/bluetooth/hci/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ config BT_HCI_IPC_SEND_RETRY_DELAY_US
5858
When a single tick (CONFIG_SYS_CLOCK_TICKS_PER_SEC) is bigger then
5959
the retry delay the k_busy_wait function is used. Set with care.
6060

61+
config BT_HCI_IPC_ENDPOINT_BOUND_TIMEOUT_MS
62+
int "HCI IPC binding timeout value in milliseconds"
63+
depends on BT_HCI_IPC
64+
default 2000
65+
help
66+
Timeout value that HCI will wait for an IPC endpoint to be bound,
67+
in milliseconds.
68+
6169
config BT_SPI
6270
bool
6371
select SPI

drivers/bluetooth/hci/ipc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(bt_hci_driver);
2020

2121
#define DT_DRV_COMPAT zephyr_bt_hci_ipc
2222

23-
#define IPC_BOUND_TIMEOUT_IN_MS K_MSEC(1000)
23+
#define IPC_BOUND_TIMEOUT_IN_MS K_MSEC(CONFIG_BT_HCI_IPC_ENDPOINT_BOUND_TIMEOUT_MS)
2424

2525
/* The retry of ipc_service_send function requires a small (tens of us) delay.
2626
* In order to ensure proper delay k_usleep is used when the system clock is

0 commit comments

Comments
 (0)