Skip to content

Commit 89bf343

Browse files
committed
lib/stm32: update stm32wba to cube version V1.7.0
Update Cube version for STM32WBAxx series on https://github.com/STMicroelectronics from version v1.6.0 to version v1.7.0 Signed-off-by: Alessandro Manganaro <[email protected]>
1 parent b365675 commit 89bf343

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1992
-777
lines changed

lib/stm32wba/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ if(CONFIG_IEEE802154_STM32WBA)
3030
zephyr_sources(Common/WPAN/Modules/BasicAES/baes_ccm.c)
3131
zephyr_sources(Common/WPAN/Modules/BasicAES/baes_cmac.c)
3232
zephyr_sources(Common/WPAN/Modules/BasicAES/baes_ecb.c)
33+
zephyr_sources(Common/WPAN/Interfaces/hw_aes.c)
3334
endif()
3435

3536
set(STM32WBA_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../zephyr/blobs/stm32wba/lib)
@@ -86,7 +87,12 @@ endif()
8687

8788
# Selecting the proper version of link layer lib
8889
if(CONFIG_BT_STM32WBA)
89-
# Checking all the soc variants and not simply relying on board name
90+
if(BLE_LIB_TYPE STREQUAL "BLE_LIB_BASIC")
91+
zephyr_include_directories(STM32_WPAN/link_layer/ll_cmd_lib/config/ble_basic)
92+
elseif(BLE_LIB_TYPE STREQUAL "BLE_LIB_FULL")
93+
zephyr_include_directories(STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full)
94+
endif()
95+
# Checking all the soc variants and not simply relying on board name
9096
if(CONFIG_SOC_STM32WBA65XX)
9197
message(STATUS "STM32WBA6 link layer lib selected")
9298
if (BLE_LIB_TYPE STREQUAL "BLE_LIB_BASIC")

lib/stm32wba/Common/WPAN/Interfaces/hw.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#define HW_H__
2121

2222
#include "stm32wbaxx.h"
23+
#include "app_conf.h"
2324

2425
/* ---------------------------------------------------------------------------
2526
* General
@@ -360,7 +361,7 @@ extern void HW_PKA_P256_ReadEccScalarMul( uint32_t* p_x,
360361
* Thus, the function HW_RNG_Process() must be called regularly in background
361362
* loop to generate a pool of random numbers. The function HW_RNG_Get() reads
362363
* the random numbers from the pool.
363-
* The size of the pool must be configured with CFG_HW_RNG_POOL_SIZE.
364+
* The size of the pool must be configured with HW_RNG_POOL_SIZE.
364365
*/
365366

366367
/* Error codes definition for HW_RNG return values */
@@ -371,6 +372,11 @@ enum
371372
HW_RNG_UFLOW_ERROR = CFG_HW_ERROR_OFFSET + 0x103,
372373
};
373374

375+
/* RNG pool size */
376+
#define HW_RNG_POOL_SIZE (CFG_HW_RNG_POOL_SIZE)
377+
/* Default threshold to refill RNG pool */
378+
#define HW_RNG_POOL_DEFAULT_THRESHOLD (12)
379+
374380
/* RNG_KERNEL_CLK_ON
375381
*
376382
* Enable RNG kernel clock.
@@ -441,6 +447,20 @@ extern void HW_RNG_DisableClock( uint8_t user_mask );
441447

442448
extern void HWCB_RNG_Process( void );
443449

450+
/*
451+
* HW_RNG_Init
452+
*
453+
* This function initializes RNG (clock, configuration ...)
454+
*/
455+
extern void HW_RNG_Init(void);
456+
457+
/*
458+
* HW_RNG_Init
459+
*
460+
* Sets RNG pool threshold (for refill)
461+
*/
462+
extern void HW_RNG_SetPoolThreshold(uint8_t threshold);
463+
444464
/* ---------------------------------------------------------------------------
445465
* GPIO
446466
* ---------------------------------------------------------------------------

lib/stm32wba/Common/WPAN/Modules/BasicAES/baes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
******************************************************************************
3-
* @file baes.h
3+
* @file baes.h
44
* @author MCD Application Team
55
* @brief This file contains the interface of the basic AES software module.
66
******************************************************************************

lib/stm32wba/Common/WPAN/Modules/RTDebug/RTDebug.h

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -28,48 +28,46 @@
2828
/** and global signal table GPIO manipulation **/
2929
/**************************************************************/
3030

31-
#define GENERIC_DEBUG_GPIO_SET(signal, table) do { \
32-
uint32_t debug_table_idx = 0; \
33-
if(signal >= sizeof(table)) \
34-
{ \
35-
return; \
36-
} \
37-
debug_table_idx = table[signal]; \
38-
if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \
39-
{ \
40-
HAL_GPIO_WritePin(general_debug_table[debug_table_idx].GPIO_port, \
41-
general_debug_table[debug_table_idx].GPIO_pin, \
42-
GPIO_PIN_SET); \
43-
} \
31+
#define GENERIC_DEBUG_GPIO_SET(signal, table) do { \
32+
uint32_t debug_table_idx = 0; \
33+
if(signal >= sizeof(table)) \
34+
{ \
35+
return; \
36+
} \
37+
debug_table_idx = table[signal]; \
38+
if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \
39+
{ \
40+
LL_GPIO_SetOutputPin(general_debug_table[debug_table_idx].GPIO_port, \
41+
general_debug_table[debug_table_idx].GPIO_pin); \
42+
} \
4443
} while(0)
4544

46-
#define GENERIC_DEBUG_GPIO_RESET(signal, table) do { \
47-
uint32_t debug_table_idx = 0; \
48-
if(signal >= sizeof(table)) \
49-
{ \
50-
return; \
51-
} \
52-
debug_table_idx = table[signal]; \
53-
if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \
54-
{ \
55-
HAL_GPIO_WritePin(general_debug_table[debug_table_idx].GPIO_port, \
56-
general_debug_table[debug_table_idx].GPIO_pin, \
57-
GPIO_PIN_RESET); \
58-
} \
45+
#define GENERIC_DEBUG_GPIO_RESET(signal, table) do { \
46+
uint32_t debug_table_idx = 0; \
47+
if(signal >= sizeof(table)) \
48+
{ \
49+
return; \
50+
} \
51+
debug_table_idx = table[signal]; \
52+
if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \
53+
{ \
54+
LL_GPIO_ResetOutputPin(general_debug_table[debug_table_idx].GPIO_port, \
55+
general_debug_table[debug_table_idx].GPIO_pin); \
56+
} \
5957
} while(0)
6058

61-
#define GENERIC_DEBUG_GPIO_TOGGLE(signal, table) do { \
62-
uint32_t debug_table_idx = 0; \
63-
if(signal >= sizeof(table)) \
64-
{ \
65-
return; \
66-
} \
67-
debug_table_idx = table[signal]; \
68-
if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \
69-
{ \
70-
HAL_GPIO_TogglePin(general_debug_table[debug_table_idx].GPIO_port, \
71-
general_debug_table[debug_table_idx].GPIO_pin); \
72-
} \
59+
#define GENERIC_DEBUG_GPIO_TOGGLE(signal, table) do { \
60+
uint32_t debug_table_idx = 0; \
61+
if(signal >= sizeof(table)) \
62+
{ \
63+
return; \
64+
} \
65+
debug_table_idx = table[signal]; \
66+
if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \
67+
{ \
68+
LL_GPIO_TogglePin(general_debug_table[debug_table_idx].GPIO_port, \
69+
general_debug_table[debug_table_idx].GPIO_pin); \
70+
} \
7371
} while(0)
7472

7573
#endif /* CFG_RT_DEBUG_GPIO_MODULE */

lib/stm32wba/Common/WPAN/Modules/RTDebug/debug_signals.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,10 @@ typedef enum {
811811
RT_DEBUG_LLHWC_GET_CH_IDX_ALGO_2,
812812
#endif /* USE_RT_DEBUG_LLHWC_GET_CH_IDX_ALGO_2 */
813813

814+
#if (USE_RT_DEBUG_BACK_FROM_DEEP_SLEEP == 1)
815+
RT_DEBUG_BACK_FROM_DEEP_SLEEP,
816+
#endif /* USE_RT_DEBUG_BACK_FROM_DEEP_SLEEP */
817+
814818
#include "app_debug_signal_def.h"
815819

816820
RT_DEBUG_SIGNALS_TOTAL_NUM

lib/stm32wba/Common/WPAN/Modules/RTDebug/local_debug_tables.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,12 @@ static const rt_debug_signal_t linklayer_debug_table[] = {
11491149
#else
11501150
[DBG_IO_LLHWC_GET_CH_IDX_ALGO_2] = RT_DEBUG_SIGNAL_UNUSED,
11511151
#endif /* USE_RT_DEBUG_LLHWC_GET_CH_IDX_ALGO_2 */
1152+
1153+
#if (USE_RT_DEBUG_BACK_FROM_DEEP_SLEEP == 1)
1154+
[DBG_IO_BACK_FROM_DEEP_SLEEP] = RT_DEBUG_BACK_FROM_DEEP_SLEEP,
1155+
#else
1156+
[DBG_IO_BACK_FROM_DEEP_SLEEP] = RT_DEBUG_SIGNAL_UNUSED,
1157+
#endif /* USE_RT_DEBUG_BACK_FROM_DEEP_SLEEP */
11521158
};
11531159

11541160
#endif /* CFG_RT_DEBUG_GPIO_MODULE */

lib/stm32wba/IEEE802154/STM32_WPAN/Target/linklayer_plat.c

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -498,37 +498,40 @@ void LINKLAYER_PLAT_RequestTemperature(void)
498498
{
499499

500500
}
501-
#ifndef __ZEPHYR__
501+
502502
/**
503-
* @brief Enable RTOS context switch.
503+
* @brief PHY Start calibration.
504504
* @param None
505505
* @retval None
506506
*/
507-
void LINKLAYER_PLAT_EnableOSContextSwitch(void)
507+
void LINKLAYER_PLAT_PhyStartClbr(void)
508508
{
509-
/* USER CODE BEGIN LINKLAYER_PLAT_EnableOSContextSwitch_0 */
509+
/* USER CODE BEGIN LINKLAYER_PLAT_PhyStartClbr_0 */
510+
511+
/* USER CODE END LINKLAYER_PLAT_PhyStartClbr_0 */
510512

511-
/* USER CODE END LINKLAYER_PLAT_EnableOSContextSwitch_0 */
512-
/* USER CODE BEGIN LINKLAYER_PLAT_EnableOSContextSwitch_1 */
513+
/* USER CODE BEGIN LINKLAYER_PLAT_PhyStartClbr_1 */
513514

514-
/* USER CODE END LINKLAYER_PLAT_EnableOSContextSwitch_1 */
515+
/* USER CODE END LINKLAYER_PLAT_PhyStartClbr_1 */
515516
}
516517

517518
/**
518-
* @brief Disable RTOS context switch.
519+
* @brief PHY Stop calibration.
519520
* @param None
520521
* @retval None
521522
*/
522-
void LINKLAYER_PLAT_DisableOSContextSwitch(void)
523+
void LINKLAYER_PLAT_PhyStopClbr(void)
523524
{
524-
/* USER CODE BEGIN LINKLAYER_PLAT_DisableOSContextSwitch_0 */
525+
/* USER CODE BEGIN LINKLAYER_PLAT_PhyStopClbr_0 */
525526

526-
/* USER CODE END LINKLAYER_PLAT_DisableOSContextSwitch_0 */
527-
/* USER CODE BEGIN LINKLAYER_PLAT_DisableOSContextSwitch_1 */
527+
/* USER CODE END LINKLAYER_PLAT_PhyStopClbr_0 */
528528

529-
/* USER CODE END LINKLAYER_PLAT_DisableOSContextSwitch_1 */
529+
/* USER CODE BEGIN LINKLAYER_PLAT_PhyStopClbr_1 */
530+
531+
/* USER CODE END LINKLAYER_PLAT_PhyStopClbr_1 */
530532
}
531533

534+
#ifndef __ZEPHYR__
532535
/**
533536
* @brief Notify the upper layer that new Link Layer timings have been applied.
534537
* @param evnt_timing[in]: Evnt_timing_t pointer to structure contains drift time , execution time and scheduling time

lib/stm32wba/IEEE802154/STM32_WPAN/Target/ll_sys_if.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
******************************************************************************
88
* @attention
99
*
10-
* Copyright (c) 2022 STMicroelectronics.
10+
* Copyright (c) 2025 STMicroelectronics.
1111
* All rights reserved.
1212
*
1313
* This software is licensed under terms that can be found in the LICENSE file
@@ -17,17 +17,17 @@
1717
******************************************************************************
1818
*/
1919
/* USER CODE END Header */
20-
#include <zephyr/logging/log.h>
21-
#include "ll_intf.h"
20+
21+
#include "main.h"
22+
#include "app_common.h"
23+
#include "app_conf.h"
24+
#include "log_module.h"
2225
#include "ll_intf_cmn.h"
2326
#include "ll_sys.h"
2427
#include "ll_sys_if.h"
28+
#include "platform.h"
2529
#include "utilities_common.h"
26-
#ifndef __ZEPHYR__
27-
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
28-
#include "temp_measurement.h"
29-
#endif /* (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1) */
30-
#endif /*__ZEPHYR__*/
30+
3131
/* Private defines -----------------------------------------------------------*/
3232
/* Radio event scheduling method - must be set at 1 */
3333
#define USE_RADIO_LOW_ISR (1)
@@ -53,7 +53,6 @@
5353
/* USER CODE END PV */
5454

5555
/* Global variables ----------------------------------------------------------*/
56-
5756
/* USER CODE BEGIN GV */
5857

5958
/* USER CODE END GV */
@@ -211,4 +210,8 @@ void ll_sys_sleep_clock_source_selection(void)
211210
ll_intf_cmn_le_select_slp_clk_src((uint8_t)linklayer_slp_clk_src, &freq_value);
212211
}
213212

214-
213+
void ll_sys_set_rtl_polling_time(uint8_t rtl_polling_time)
214+
{
215+
/* first parameter otInstance *aInstance is unused */
216+
radio_set_rtl_polling_time(NULL, rtl_polling_time);
217+
}

lib/stm32wba/IEEE802154/STM32_WPAN/Target/ll_sys_if.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
******************************************************************************
88
* @attention
99
*
10-
* Copyright (c) 2022 STMicroelectronics.
10+
* Copyright (c) 2025 STMicroelectronics.
1111
* All rights reserved.
1212
*
1313
* This software is licensed under terms that can be found in the LICENSE file
@@ -39,7 +39,6 @@ extern "C" {
3939
/* USER CODE END ET */
4040

4141
/* Exported constants --------------------------------------------------------*/
42-
4342
/* USER CODE BEGIN EC */
4443

4544
/* USER CODE END EC */
@@ -55,9 +54,7 @@ extern "C" {
5554
/* USER CODE END EM */
5655

5756
/* Exported functions prototypes ---------------------------------------------*/
58-
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
59-
void ll_sys_bg_temperature_measurement(void);
60-
#endif /* USE_TEMPERATURE_BASED_RADIO_CALIBRATION */
57+
void ll_sys_set_rtl_polling_time(uint8_t rtl_polling_time);
6158
/* USER CODE BEGIN EFP */
6259

6360
/* USER CODE END EFP */

lib/stm32wba/README.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Origin:
66
https://github.com/STMicroelectronics/STM32CubeWBA
77

88
Status:
9-
version v1.6.0
9+
version v1.7.0
1010

1111
Purpose:
1212
This library is used on STM32WBA series to port BLE and IEEE802154 controller libraries in
@@ -48,6 +48,7 @@ Description:
4848
Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/ot_inc/toolchain.h
4949
Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/ot_inc/types.h
5050
Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full/ll_fw_config.h
51+
Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_basic/ll_fw_config.h
5152
Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/config/ieee_15_4_basic/ll_fw_config.h
5253
Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/config/thread/ll_fw_config.h
5354
Middlewares/ST/STM32_WPAN/link_layer/ll_sys/inc/linklayer_plat.h
@@ -103,12 +104,12 @@ Description:
103104
Projects/NUCLEO-WBA65RI/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c
104105
Projects/NUCLEO-WBA65RI/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c
105106
Projects/NUCLEO-WBA65RI/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.h
106-
Projects/NUCLEO-WBA65RI/Applications/BLE/Zigbee_OnOff_Client_SED/System/Config/Debug_GPIO/debug_config.h
107-
Projects/NUCLEO-WBA65RI/Applications/BLE/Zigbee_OnOff_Client_SED/System/Config/Log/log_module_conf.h
108-
Projects/NUCLEO-WBA65RI/Applications/BLE/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/power_table.c
109-
Projects/NUCLEO-WBA65RI/Applications/BLE/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/linklayer_plat.c
110-
Projects/NUCLEO-WBA65RI/Applications/BLE/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/ll_sys_if.c
111-
Projects/NUCLEO-WBA65RI/Applications/BLE/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/ll_sys_if.h
107+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/System/Config/Debug_GPIO/debug_config.h
108+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/System/Config/Log/log_module_conf.h
109+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/power_table.c
110+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/linklayer_plat.c
111+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/ll_sys_if.c
112+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/ll_sys_if.h
112113
Utilities/trace/adv_trace/stm32_adv_trace.h
113114
Utilities/misc/stm32_mem.h
114115
Utilities/tim_serv/stm32_timer.h
@@ -122,7 +123,7 @@ URL:
122123
https://github.com/STMicroelectronics/STM32CubeWBA
123124

124125
Commit:
125-
e7d27c496416aae8f4ba8b3e84f963f0c5a0b69f
126+
f5b281ba4ca4d00aba59215728265f1d2cc80715
126127

127128
Maintained-by:
128129
External
@@ -136,9 +137,10 @@ License Link:
136137
opensource.org/license/mit
137138

138139
Patch List:
139-
* Discard "static" implementation of ll_sys_bg_temperature_measurement_init to allow specific zephyr implementation
140-
Impacted file: ll_sys_if.c
141-
ll_sys.h
140+
141+
* Discard "static" implementation of ll_sys_bg_temperature_measurement_init to allow specific zephyr implementation
142+
Impacted file: ll_sys_if.c
143+
ll_sys.h
142144

143145
* Enabled extended advertising in CFG_BLE_OPTIONS:
144146
Impacted file: app_conf.h
@@ -153,7 +155,6 @@ Patch List:
153155
Impacted files: stm_list.h
154156
main.h
155157
app_conf.h
156-
scm.c
157158
ll_intf_cmn.h
158159
ll_sys_if.c
159160
linklayer_plat.c
@@ -170,8 +171,7 @@ Patch List:
170171
Impacted files: ll_sys_if.c
171172

172173
* SCM_HSE_WaitUntilReady Cube mechanism not used
173-
Impacted files: scm.c
174-
linklayer_plat.c
174+
Impacted files: linklayer_plat.c
175175

176176
* Changes from official delivery:
177177
- dos2unix applied

0 commit comments

Comments
 (0)