Skip to content

Commit ceb4298

Browse files
ppryga-nordickartben
authored andcommitted
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 <piotr.pryga@nordicsemi.no>
1 parent b33b82a commit ceb4298

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
@@ -24,7 +24,7 @@ BUILD_ASSERT(!IS_ENABLED(CONFIG_BT_CONN) || IS_ENABLED(CONFIG_BT_HCI_ACL_FLOW_CO
2424

2525
#define DT_DRV_COMPAT zephyr_bt_hci_ipc
2626

27-
#define IPC_BOUND_TIMEOUT_IN_MS K_MSEC(1000)
27+
#define IPC_BOUND_TIMEOUT_IN_MS K_MSEC(CONFIG_BT_HCI_IPC_ENDPOINT_BOUND_TIMEOUT_MS)
2828

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

0 commit comments

Comments
 (0)