Skip to content

Conversation

@vtardy-st
Copy link
Contributor

Integration of the BLE-802.15.4 concurrent mode on stm32wba based on CubeWBA release 1.7.0

@vtardy-st vtardy-st marked this pull request as draft October 17, 2025 09:33
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 131fbdb to 7cb891e Compare October 17, 2025 10:02
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch 2 times, most recently from 628d59a to f48981b Compare November 4, 2025 11:29
@vtardy-st vtardy-st marked this pull request as ready for review November 4, 2025 13:00
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from f48981b to e29c333 Compare November 10, 2025 15:20
@asm5878 asm5878 self-requested a review November 12, 2025 07:30
Comment on lines 142 to 145

* Discard "static" implementation of ll_sys_bg_temperature_measurement_init to allow specific zephyr implementation
Impacted file: ll_sys_if.c
ll_sys.h
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems no real change here, we could revert ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has been reverted

@asm5878
Copy link
Collaborator

asm5878 commented Nov 12, 2025

Hello @mathieuchopstm and @etienne-lms. Could you please have a look ?

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from e29c333 to 8f70ccc Compare November 12, 2025 09:25
Copy link
Collaborator

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some refinement needed but seems overall OK

Comment on lines 401 to 413
#ifndef __ZEPHYR__
#define RADIO_SW_LOW_INTR_PRIO (15) /* 2.4GHz RADIO low ISR priority */
#else
#define RADIO_SW_LOW_INTR_PRIO (14) /* 2.4GHz RADIO low ISR priority */
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interrupt priority should come from DT anyways so I'm a bit surprised this is needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This interrupt priority constant is used in the link_layer_register_isr() function defined in zephyr\soc\st\stm32\stm32wbax\hci_if\linklayer_plat_adapt.c
If change should be done, it will be done in another PR

Comment on lines 68 to 74
#ifndef MAX
#define MAX( x, y ) (((x)>(y))?(x):(y))
#endif

#ifndef MIN
#define MIN( x, y ) (((x)<(y))?(x):(y))
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this header is visible from the Zephyr side, please use an approach similar to VCNano8000e stack instead: add private compile definition for the library only and gate these behind the private definition

zephyr_library()
zephyr_library_compile_definitions(H1_INTERNAL)

#ifdef H1_INTERNAL
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation is herited from CubeMx

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 8f70ccc to c059c4c Compare November 12, 2025 15:02

BPKA_error = 0;

break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferably with default case in switch/case instructions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is heritated from CubeMx. Do you think this change is required ?

@mathieuchopstm
Copy link
Collaborator

I can't mark conversations are resolved so I added 🚀 reaction to my own "resolved" messages instead.

@erwango
Copy link
Member

erwango commented Nov 18, 2025

@vtardy-st Please rebase

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from ac58b83 to 7229677 Compare November 18, 2025 12:59
…ries

Add WBA6_LinkLayer_BLE_Basic_15_4_lib_Zephyr.a and
WBA6_LinkLayer_BLE_Full_15_4_lib_Zephyr.a

Signed-off-by: Vincent Tardy <[email protected]>
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 7229677 to d271137 Compare November 25, 2025 15:31
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combination of:

  • files duplicated depending on the use case (see comment)
  • functions adapted in place instead of in zephyr as it should actually be done (see comment)

makes the libraries more and more complex to review and maintain.
I don't think this is the right direction and approach should be reviewed.

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 69d663c to d9dbc78 Compare November 26, 2025 13:43
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. This is going in the good direction. I guess we can fix the remaining issue of Zephyr adaptation done in this repo instead of zephyr/ in a next repo.

Looking to https://github.com/vtardy-st/hal_stm32/blob/stm32wba_1_7_0_ble_802154_concurrent/lib/stm32wba/README.rst, there is indentation issues to fix to have the file readable, it would be nice to fix this (as an additional commit for issues that are not coming from current PR)

Otherwise LGTM

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from d9dbc78 to f7b46f3 Compare November 27, 2025 12:57
Copy link
Collaborator

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor nits + #319 (comment) left to address.

I think these are non-blocking though.

Comment on lines +77 to +86
#ifndef __ZEPHYR__
uint32_t linklayer_slp_clk_src = LL_RCC_RADIOSLEEPSOURCE_NONE;

#ifdef __ZEPHYR__
LINKLAYER_PLAT_EnableBackupDomainAccess();
/* Get the Link Layer sleep timer clock source */
linklayer_slp_clk_src = LL_RCC_RADIO_GetSleepTimerClockSource();
if(linklayer_slp_clk_src == LL_RCC_RADIOSLEEPSOURCE_NONE)
{
/* If there is no clock source defined, should be selected before */
assert_param(0);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be tabs indentations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation type is this file is herited from STM32Cube

Comment on lines +96 to +97
/* Enable AHB5ENR peripheral clock (bus CLK) */
__HAL_RCC_RADIO_CLK_ENABLE();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep tabs as indentation

Suggested change
/* Enable AHB5ENR peripheral clock (bus CLK) */
__HAL_RCC_RADIO_CLK_ENABLE();
/* Enable AHB5ENR peripheral clock (bus CLK) */
__HAL_RCC_RADIO_CLK_ENABLE();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation type is this file is herited from STM32Cube

Add support of ble-ieee 802.15.4 concurrent mode

Signed-off-by: Vincent Tardy <[email protected]>
Porting of modes ble, ieee 802.15.4 and concurrent  are refactorised
in one unique RF_Integration folder supporting the 3 different
mode configurations.

Signed-off-by: Vincent Tardy <[email protected]>
Rework the README.rst file to fix indentation issues.

Signed-off-by: Vincent Tardy <[email protected]>
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from f41c870 to 5c66606 Compare November 28, 2025 14:14
@erwango erwango merged commit 50fcec6 into zephyrproject-rtos:main Nov 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants