Skip to content

Commit 7a593ed

Browse files
HoZHelcfriedt
authored andcommitted
drivers: bluetooth: hci: Fix the issue about the TRNG peripheral instance
Fix the issue regarding passing the TRNG peripheral instance to the driver. Increase the SYSTEM_WORKQUEUE_STACK_SIZE when CONFIG_BT is set. According to the log of thread analyzer for beacon sample, 1048 bytes are needed. So, it's been increased to a safer value. Signed-off-by: Ali Hozhabri <[email protected]>
1 parent 57ebf79 commit 7a593ed

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/bluetooth/hci/hci_stm32wb0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static int ble_pm_action(const struct device *dev,
343343

344344
static void rng_get_random(void *num, size_t size)
345345
{
346-
const struct device *dev = DEVICE_DT_GET(DT_DRV_INST(0));
346+
const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_entropy));
347347
int res;
348348

349349
/* try to allocate from pool */

soc/st/stm32/stm32wb0x/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ endif # STM32WB0_RADIO_TIMER
2020

2121
if BT
2222

23+
configdefault SYSTEM_WORKQUEUE_STACK_SIZE
24+
default 1152
25+
2326
config BT_AUTO_PHY_UPDATE
2427
default n
2528

0 commit comments

Comments
 (0)