Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions drivers/bluetooth/hci/hci_stm32wba.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ static K_SEM_DEFINE(hci_sem, 1, 1);
CFG_BLE_NUM_LINK) \
+ CFG_BLE_MBLOCK_COUNT_MARGIN)

#define BLE_DYN_ALLOC_SIZE \
(BLE_TOTAL_BUFFER_SIZE(CFG_BLE_NUM_LINK, MBLOCK_COUNT))
#define BLE_DYN_ALLOC_SIZE (BLE_TOTAL_BUFFER_SIZE(CFG_BLE_NUM_LINK, \
MBLOCK_COUNT, \
(CFG_BLE_EATT_BEARER_PER_LINK * CFG_BLE_NUM_LINK)))

/* GATT buffer size (in bytes)*/
#define BLE_GATT_BUF_SIZE \
Expand Down Expand Up @@ -376,7 +377,7 @@ uint8_t BLECB_Indication(const uint8_t *data, uint16_t length,

k_sem_take(&hci_sem, K_FOREVER);

err = receive_data(dev, data, (size_t)length - 1,
err = receive_data(dev, data, (size_t)length,
ext_data, (size_t)ext_length);

k_sem_give(&hci_sem);
Expand Down
17 changes: 15 additions & 2 deletions drivers/ieee802154/ieee802154_stm32wba.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,19 @@ static int stm32wba_802154_driver_init(const struct device *dev)
k_fifo_init(&stm32wba_802154_data.rx_fifo);
k_sem_init(&stm32wba_802154_data.tx_wait, 0, 1);
k_sem_init(&stm32wba_802154_data.cca_wait, 0, 1);

#if defined(CONFIG_NET_L2_OPENTHREAD)
stm32wba_802154_ral_set_config_lib_params(1, 0);
#else
stm32wba_802154_ral_set_config_lib_params(0, 1);
#endif
stm32wba_802154_ral_init();
stm32wba_802154_ral_promiscuous_set(false);

#if !defined(CONFIG_NET_L2_CUSTOM_IEEE802154_STM32WBA) && !defined(CONFIG_NET_L2_OPENTHREAD)
stm32wba_802154_data.rx_on_when_idle = true;
#else
stm32wba_802154_data.rx_on_when_idle = false;
#endif
stm32wba_802154_ral_set_continuous_reception(stm32wba_802154_data.rx_on_when_idle);

k_thread_create(&stm32wba_802154_data.rx_thread, stm32wba_802154_data.rx_stack,
CONFIG_IEEE802154_STM32WBA_RX_STACK_SIZE,
Expand Down Expand Up @@ -851,6 +859,11 @@ static int stm32wba_802154_configure(const struct device *dev,
stm32wba_802154_data.event_handler = config->event_handler;
break;

case IEEE802154_CONFIG_RX_ON_WHEN_IDLE:
stm32wba_802154_data.rx_on_when_idle = config->rx_on_when_idle;
stm32wba_802154_ral_set_continuous_reception(config->rx_on_when_idle);
break;

default:
#if defined(CONFIG_NET_L2_CUSTOM_IEEE802154)
ret = stm32wba_802154_configure_extended(
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ manifest:
groups:
- hal
- name: hal_stm32
revision: b6f03b6efd92da4564b38df8cb54d7dad5f37163
revision: pull/315/head
path: modules/hal/stm32
groups:
- hal
Expand Down
Loading