Skip to content

Commit 04fbb2b

Browse files
committed
drivers: ieee802154: STM32WBA cube fw 1.7.0 updates
Changes required to update STM32WBA ieee802154 driver according STM32WBA Cube FW 1.7.0 version. Signed-off-by: Alessandro Manganaro <[email protected]>
1 parent c977fe4 commit 04fbb2b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

drivers/ieee802154/ieee802154_stm32wba.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,11 +650,19 @@ static int stm32wba_802154_driver_init(const struct device *dev)
650650
k_fifo_init(&stm32wba_802154_data.rx_fifo);
651651
k_sem_init(&stm32wba_802154_data.tx_wait, 0, 1);
652652
k_sem_init(&stm32wba_802154_data.cca_wait, 0, 1);
653-
653+
#if defined(CONFIG_NET_L2_OPENTHREAD)
654+
stm32wba_802154_ral_set_config_lib_params(1, 0);
655+
#else
656+
stm32wba_802154_ral_set_config_lib_params(0, 1);
657+
#endif
654658
stm32wba_802154_ral_init();
655659
stm32wba_802154_ral_promiscuous_set(false);
656-
660+
#if !defined(CONFIG_NET_L2_CUSTOM_IEEE802154_STM32WBA) && !defined(CONFIG_NET_L2_OPENTHREAD)
657661
stm32wba_802154_data.rx_on_when_idle = true;
662+
#else
663+
stm32wba_802154_data.rx_on_when_idle = false;
664+
#endif
665+
stm32wba_802154_ral_set_continuous_reception(stm32wba_802154_data.rx_on_when_idle);
658666

659667
k_thread_create(&stm32wba_802154_data.rx_thread, stm32wba_802154_data.rx_stack,
660668
CONFIG_IEEE802154_STM32WBA_RX_STACK_SIZE,
@@ -851,6 +859,11 @@ static int stm32wba_802154_configure(const struct device *dev,
851859
stm32wba_802154_data.event_handler = config->event_handler;
852860
break;
853861

862+
case IEEE802154_CONFIG_RX_ON_WHEN_IDLE:
863+
stm32wba_802154_data.rx_on_when_idle = config->rx_on_when_idle;
864+
stm32wba_802154_ral_set_continuous_reception(config->rx_on_when_idle);
865+
break;
866+
854867
default:
855868
#if defined(CONFIG_NET_L2_CUSTOM_IEEE802154)
856869
ret = stm32wba_802154_configure_extended(

0 commit comments

Comments
 (0)