Skip to content

Commit a475cf1

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 1d1c5eb commit a475cf1

Some content is hidden

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

52 files changed

+1699
-761
lines changed

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/ll_sys_if.c

Lines changed: 14 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,18 @@
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"
29+
#include "stm32_rtos.h"
2530
#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__*/
31+
3132
/* Private defines -----------------------------------------------------------*/
3233
/* Radio event scheduling method - must be set at 1 */
3334
#define USE_RADIO_LOW_ISR (1)
@@ -53,7 +54,6 @@
5354
/* USER CODE END PV */
5455

5556
/* Global variables ----------------------------------------------------------*/
56-
5757
/* USER CODE BEGIN GV */
5858

5959
/* USER CODE END GV */
@@ -211,4 +211,8 @@ void ll_sys_sleep_clock_source_selection(void)
211211
ll_intf_cmn_le_select_slp_clk_src((uint8_t)linklayer_slp_clk_src, &freq_value);
212212
}
213213

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

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: 13 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
@@ -103,12 +103,12 @@ Description:
103103
Projects/NUCLEO-WBA65RI/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c
104104
Projects/NUCLEO-WBA65RI/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c
105105
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
106+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/System/Config/Debug_GPIO/debug_config.h
107+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/System/Config/Log/log_module_conf.h
108+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/power_table.c
109+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/linklayer_plat.c
110+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/ll_sys_if.c
111+
Projects/NUCLEO-WBA65RI/Applications/Zigbee/Zigbee_OnOff_Client_SED/STM32_WPAN/Target/ll_sys_if.h
112112
Utilities/trace/adv_trace/stm32_adv_trace.h
113113
Utilities/misc/stm32_mem.h
114114
Utilities/tim_serv/stm32_timer.h
@@ -122,7 +122,7 @@ URL:
122122
https://github.com/STMicroelectronics/STM32CubeWBA
123123

124124
Commit:
125-
e7d27c496416aae8f4ba8b3e84f963f0c5a0b69f
125+
f5b281ba4ca4d00aba59215728265f1d2cc80715
126126

127127
Maintained-by:
128128
External
@@ -136,9 +136,10 @@ License Link:
136136
opensource.org/license/mit
137137

138138
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
139+
140+
* Discard "static" implementation of ll_sys_bg_temperature_measurement_init to allow specific zephyr implementation
141+
Impacted file: ll_sys_if.c
142+
ll_sys.h
142143

143144
* Enabled extended advertising in CFG_BLE_OPTIONS:
144145
Impacted file: app_conf.h
@@ -153,7 +154,6 @@ Patch List:
153154
Impacted files: stm_list.h
154155
main.h
155156
app_conf.h
156-
scm.c
157157
ll_intf_cmn.h
158158
ll_sys_if.c
159159
linklayer_plat.c
@@ -170,8 +170,7 @@ Patch List:
170170
Impacted files: ll_sys_if.c
171171

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

176175
* Changes from official delivery:
177176
- dos2unix applied

0 commit comments

Comments
 (0)