lib/stm32: update stm32wba to cube version V1.5.0
Update Cube version for STM32WBAxx series
on https://github.com/STMicroelectronics
from version v1.4.1
to version v1.5.0
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
diff --git a/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_common.h b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_common.h
index 4d3f2f4..c548da1 100644
--- a/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_common.h
+++ b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_common.h
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <inttypes.h>
#include "app_conf.h"
#include "hw.h"
diff --git a/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_conf.h b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_conf.h
index 93c4a54..c737b7f 100644
--- a/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_conf.h
+++ b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_conf.h
@@ -65,12 +65,12 @@
#define CFG_BLE_OPTIONS (0 | \
0 | \
0 | \
- BLE_OPTIONS_EXTENDED_ADV | \
+ BLE_OPTIONS_EXTENDED_ADV | \
+ 0 | \
+ BLE_OPTIONS_GATT_CACHING | \
0 | \
0 | \
- 0 | \
- 0 | \
- 0)
+ BLE_OPTIONS_ENHANCED_ATT)
/**
* Maximum number of simultaneous connections and advertising that the device will support.
@@ -196,9 +196,6 @@
/******************************************************************************
* RTC
******************************************************************************/
-#define RTC_N_PREDIV_S (10)
-#define RTC_PREDIV_S ((1<<RTC_N_PREDIV_S)-1)
-#define RTC_PREDIV_A ((1<<(15-RTC_N_PREDIV_S))-1)
/* USER CODE BEGIN RTC */
@@ -221,6 +218,8 @@
*/
#define CFG_LOG_SUPPORTED (0U)
+/* Usart used by LOG */
+
/* Configure Log display settings */
#define CFG_LOG_INSERT_COLOR_INSIDE_THE_TRACE (0U)
#define CFG_LOG_INSERT_TIME_STAMP_INSIDE_THE_TRACE (0U)
@@ -241,7 +240,7 @@
* Configure Log level for Application
******************************************************************************/
#define APPLI_CONFIG_LOG_LEVEL LOG_VERBOSE_INFO
-
+#define APPLI_CONFIG_LOG_REGION (LOG_REGION_ALL_REGIONS)
/* USER CODE BEGIN Log_level */
/* USER CODE END Log_level */
@@ -320,7 +319,7 @@
* NVM configuration
******************************************************************************/
-#define CFG_SNVMA_START_SECTOR_ID (FLASH_PAGE_NB - 2u)
+#define CFG_SNVMA_START_SECTOR_ID ((FLASH_SIZE / FLASH_PAGE_SIZE) - 2u)
#define CFG_SNVMA_START_ADDRESS (FLASH_BASE + (FLASH_PAGE_SIZE * (CFG_SNVMA_START_SECTOR_ID)))
@@ -347,20 +346,20 @@
* - 2 : Debugger available in low power mode.
*
******************************************************************************/
-#define CFG_DEBUGGER_LEVEL (2)
+#define CFG_DEBUGGER_LEVEL (2)
/******************************************************************************
* RealTime GPIO debug module configuration
******************************************************************************/
-#define CFG_RT_DEBUG_GPIO_MODULE (0)
-#define CFG_RT_DEBUG_DTB (0)
+#define CFG_RT_DEBUG_GPIO_MODULE (0)
+#define CFG_RT_DEBUG_DTB (0)
/******************************************************************************
* System Clock Manager module configuration
******************************************************************************/
-#define CFG_SCM_SUPPORTED (1)
+#define CFG_SCM_SUPPORTED (1)
/******************************************************************************
* HW RADIO configuration
@@ -391,9 +390,14 @@
/* RF TX power table ID selection:
* 0 -> RF TX output level from -20 dBm to +10 dBm
* 1 -> RF TX output level from -20 dBm to +3 dBm
+ * 2 -> RF TX output level at +20 dBm with an external PA
*/
#define CFG_RF_TX_POWER_TABLE_ID (0)
+#define CFG_EXTERNAL_PA_ENABLE (0)
+
+#define CFG_BLE_AOA_AOD_ENABLE (0)
+
/* Custom LSE sleep clock accuracy to use if both conditions are met:
* - LSE is selected as Link Layer sleep clock source
* - the LSE used is different from the default one.
@@ -425,8 +429,8 @@
#define CFG_AMM_VIRTUAL_STACK_BLE_BUFFER_SIZE (400U) /* words (32 bits) */
#define CFG_AMM_VIRTUAL_APP_BLE (2U)
#define CFG_AMM_VIRTUAL_APP_BLE_BUFFER_SIZE (200U) /* words (32 bits) */
-#define CFG_AMM_POOL_SIZE DIVC(CFG_MM_POOL_SIZE, sizeof (uint32_t)) \
- + (AMM_VIRTUAL_INFO_ELEMENT_SIZE * CFG_AMM_VIRTUAL_MEMORY_NUMBER)
+#define CFG_AMM_POOL_SIZE ( DIVC(CFG_MM_POOL_SIZE, sizeof (uint32_t)) \
+ + (AMM_VIRTUAL_INFO_ELEMENT_SIZE * CFG_AMM_VIRTUAL_MEMORY_NUMBER) )
/* USER CODE BEGIN MEMORY_MANAGER_Configuration */
diff --git a/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_entry.h b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_entry.h
deleted file mode 100644
index 91bc9c6..0000000
--- a/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_entry.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file app_entry.h
- * @author MCD Application Team
- * @brief Interface to the application
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef APP_ENTRY_H
-#define APP_ENTRY_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-
-/* Private includes ----------------------------------------------------------*/
-#include "app_common.h"
-/* USER CODE BEGIN Includes */
-
-/* USER CODE END Includes */
-
-/* Exported types ------------------------------------------------------------*/
-/* USER CODE BEGIN ET */
-
-/* USER CODE END ET */
-
-/* Exported constants --------------------------------------------------------*/
-#define WPAN_SUCCESS 0u
-
-/******************************************************************************
- * Information Table
- *
- * Version
- * [0:3] = Build - 0: Untracked - 15:Released - x: Tracked version
- * [4:7] = branch - 0: Mass Market - x: ...
- * [8:15] = Subversion
- * [16:23] = Version minor
- * [24:31] = Version major
- *
- ******************************************************************************/
-#define CFG_FW_BUILD (0)
-#define CFG_FW_BRANCH (0)
-#define CFG_FW_SUBVERSION (0)
-#define CFG_FW_MINOR_VERSION (4)
-#define CFG_FW_MAJOR_VERSION (1)
-
-/* USER CODE BEGIN EC */
-
-/* USER CODE END EC */
-
-/* Exported variables --------------------------------------------------------*/
-/* USER CODE BEGIN EV */
-
-/* USER CODE END EV */
-
-/* Exported macros ------------------------------------------------------------*/
-/* USER CODE BEGIN EM */
-
-/* USER CODE END EM */
-
-/* Exported functions prototypes ---------------------------------------------*/
-void MX_APPE_Config(void);
-uint32_t MX_APPE_Init(void *p_param);
-void MX_APPE_Process(void);
-
-/* USER CODE BEGIN EFP */
-#if (CFG_BUTTON_SUPPORTED == 1)
-uint8_t APPE_ButtonIsLongPressed(uint16_t btnIdx);
-void APPE_Button1Action(void);
-void APPE_Button2Action(void);
-void APPE_Button3Action(void);
-#endif
-
-/* USER CODE END EFP */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*APP_ENTRY_H */
diff --git a/lib/stm32wba/BLE_TransparentMode/Core/Inc/main.h b/lib/stm32wba/BLE_TransparentMode/Core/Inc/main.h
index ed15373..ce6bbfa 100644
--- a/lib/stm32wba/BLE_TransparentMode/Core/Inc/main.h
+++ b/lib/stm32wba/BLE_TransparentMode/Core/Inc/main.h
@@ -29,9 +29,20 @@
/* Includes ------------------------------------------------------------------*/
#include "stm32wbaxx_hal.h"
#include "app_conf.h"
-/* #include "app_entry.h" */
#include "app_common.h"
-/* #include "app_debug.h" */
+
+#include "stm32wbaxx_ll_icache.h"
+#include "stm32wbaxx_ll_tim.h"
+#include "stm32wbaxx_ll_bus.h"
+#include "stm32wbaxx_ll_cortex.h"
+#include "stm32wbaxx_ll_rcc.h"
+#include "stm32wbaxx_ll_system.h"
+#include "stm32wbaxx_ll_utils.h"
+#include "stm32wbaxx_ll_pwr.h"
+#include "stm32wbaxx_ll_gpio.h"
+#include "stm32wbaxx_ll_dma.h"
+
+#include "stm32wbaxx_ll_exti.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
diff --git a/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c
index 138487b..b7a1a5b 100644
--- a/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c
+++ b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c
@@ -1,11 +1,21 @@
-/*
- * Copyright (c) 2023 STMicroelectronics
- *
- * SPDX-License-Identifier: Apache-2.0
- */
-
-
-
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file linklayer_plat.c
+ * @author MCD Application Team
+ * @brief Source file for the linklayer plateform adaptation layer
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
/* USER CODE END Header */
#ifndef __ZEPHYR__
@@ -27,6 +37,8 @@
#endif /* (CFG_LPM_LEVEL != 0) */
/* USER CODE BEGIN Includes */
+/* USER CODE END Includes */
+
#else
#include "scm.h"
#endif
@@ -105,6 +117,44 @@
}
/**
+ * @brief Notify the Link Layer platform layer the system will enter in WFI
+ * and AHB5 clock may be turned of regarding the 2.4Ghz radio state.
+ * @param None
+ * @retval None
+ */
+void LINKLAYER_PLAT_NotifyWFIEnter(void)
+{
+ /* Check if Radio state will allow the AHB5 clock to be cut */
+
+ /* AHB5 clock will be cut in the following cases:
+ * - 2.4GHz radio is not in ACTIVE mode (in SLEEP or DEEPSLEEP mode).
+ * - RADIOSMEN and STRADIOCLKON bits are at 0.
+ */
+ if((LL_PWR_GetRadioMode() != LL_PWR_RADIO_ACTIVE_MODE) ||
+ ((__HAL_RCC_RADIO_IS_CLK_SLEEP_ENABLED() == 0) && (LL_RCC_RADIO_IsEnabledSleepTimerClock() == 0)))
+ {
+ AHB5_SwitchedOff = 1;
+ }
+}
+
+/**
+ * @brief Notify the Link Layer platform layer the system exited WFI and AHB5
+ * clock may be resynchronized as is may have been turned of during
+ * low power mode entry.
+ * @param None
+ * @retval None
+ */
+void LINKLAYER_PLAT_NotifyWFIExit(void)
+{
+ /* Check if AHB5 clock has been turned of and needs resynchronisation */
+ if (AHB5_SwitchedOff)
+ {
+ /* Read sleep register as earlier as possible */
+ radio_sleep_timer_val = ll_intf_cmn_get_slptmr_value();
+ }
+}
+
+/**
* @brief Active wait on bus clock readiness.
* @param None
* @retval None
@@ -273,9 +323,9 @@
{
/* When specific counter for link layer high ISR reaches 0, interrupt is enabled */
HAL_NVIC_EnableIRQ(RADIO_INTR_NUM);
- /* USER CODE BEGIN LINKLAYER_PLAT_EnableSpecificIRQ_1*/
+ /* USER CODE BEGIN LINKLAYER_PLAT_EnableSpecificIRQ_1 */
- /* USER CODE END LINKLAYER_PLAT_EnableSpecificIRQ_1*/
+ /* USER CODE END LINKLAYER_PLAT_EnableSpecificIRQ_1 */
}
}
@@ -318,9 +368,9 @@
prio_high_isr_counter++;
if(prio_high_isr_counter == 1)
{
- /* USER CODE BEGIN LINKLAYER_PLAT_DisableSpecificIRQ_1*/
+ /* USER CODE BEGIN LINKLAYER_PLAT_DisableSpecificIRQ_1 */
- /* USER CODE END LINKLAYER_PLAT_DisableSpecificIRQ_1*/
+ /* USER CODE END LINKLAYER_PLAT_DisableSpecificIRQ_1 */
/* When specific counter for link layer high ISR value is 1, interrupt is disabled */
HAL_NVIC_DisableIRQ(RADIO_INTR_NUM);
}
@@ -358,15 +408,15 @@
*/
void LINKLAYER_PLAT_EnableRadioIT(void)
{
- /* USER CODE BEGIN LINKLAYER_PLAT_EnableRadioIT_1*/
+ /* USER CODE BEGIN LINKLAYER_PLAT_EnableRadioIT_1 */
- /* USER CODE END LINKLAYER_PLAT_EnableRadioIT_1*/
+ /* USER CODE END LINKLAYER_PLAT_EnableRadioIT_1 */
HAL_NVIC_EnableIRQ((IRQn_Type) RADIO_INTR_NUM);
- /* USER CODE BEGIN LINKLAYER_PLAT_EnableRadioIT_2*/
+ /* USER CODE BEGIN LINKLAYER_PLAT_EnableRadioIT_2 */
- /* USER CODE END LINKLAYER_PLAT_EnableRadioIT_2*/
+ /* USER CODE END LINKLAYER_PLAT_EnableRadioIT_2 */
}
/**
@@ -376,15 +426,15 @@
*/
void LINKLAYER_PLAT_DisableRadioIT(void)
{
- /* USER CODE BEGIN LINKLAYER_PLAT_DisableRadioIT_1*/
+ /* USER CODE BEGIN LINKLAYER_PLAT_DisableRadioIT_1 */
- /* USER CODE END LINKLAYER_PLAT_DisableRadioIT_1*/
+ /* USER CODE END LINKLAYER_PLAT_DisableRadioIT_1 */
HAL_NVIC_DisableIRQ((IRQn_Type) RADIO_INTR_NUM);
- /* USER CODE BEGIN LINKLAYER_PLAT_DisableRadioIT_2*/
+ /* USER CODE BEGIN LINKLAYER_PLAT_DisableRadioIT_2 */
- /* USER CODE END LINKLAYER_PLAT_DisableRadioIT_2*/
+ /* USER CODE END LINKLAYER_PLAT_DisableRadioIT_2 */
}
#ifndef __ZEPHYR__
@@ -473,6 +523,12 @@
*/
void LINKLAYER_PLAT_EnableOSContextSwitch(void)
{
+ /* USER CODE BEGIN LINKLAYER_PLAT_EnableOSContextSwitch_0 */
+
+ /* USER CODE END LINKLAYER_PLAT_EnableOSContextSwitch_0 */
+ /* USER CODE BEGIN LINKLAYER_PLAT_EnableOSContextSwitch_1 */
+
+ /* USER CODE END LINKLAYER_PLAT_EnableOSContextSwitch_1 */
}
/**
@@ -482,6 +538,12 @@
*/
void LINKLAYER_PLAT_DisableOSContextSwitch(void)
{
+ /* USER CODE BEGIN LINKLAYER_PLAT_DisableOSContextSwitch_0 */
+
+ /* USER CODE END LINKLAYER_PLAT_DisableOSContextSwitch_0 */
+ /* USER CODE BEGIN LINKLAYER_PLAT_DisableOSContextSwitch_1 */
+
+ /* USER CODE END LINKLAYER_PLAT_DisableOSContextSwitch_1 */
}
/**
@@ -515,50 +577,7 @@
{
return LL_FLASH_GetUDN();
}
-
-/* USER CODE BEGIN LINKLAYER_PLAT 0 */
-
-/* Radio bus clock control variables */
-uint8_t AHB5_SwitchedOff = 0;
-uint32_t radio_sleep_timer_val = 0;
#endif
-
-/**
- * @brief Notify the Link Layer platform layer the system will enter in WFI
- * and AHB5 clock may be turned of regarding the 2.4Ghz radio state.
- * @param None
- * @retval None
- */
-void LINKLAYER_PLAT_NotifyWFIEnter(void)
-{
- /* Check if Radio state will allow the AHB5 clock to be cut */
-
- /* AHB5 clock will be cut in the following cases:
- * - 2.4GHz radio is not in ACTIVE mode (in SLEEP or DEEPSLEEP mode).
- * - RADIOSMEN and STRADIOCLKON bits are at 0.
- */
- if((LL_PWR_GetRadioMode() != LL_PWR_RADIO_ACTIVE_MODE) ||
- ((__HAL_RCC_RADIO_IS_CLK_SLEEP_ENABLED() == 0) && (LL_RCC_RADIO_IsEnabledSleepTimerClock() == 0)))
- {
- AHB5_SwitchedOff = 1;
- }
-}
-
-/**
- * @brief Notify the Link Layer platform layer the system exited WFI and AHB5
- * clock may be resynchronized as is may have been turned of during
- * low power mode entry.
- * @param None
- * @retval None
- */
-void LINKLAYER_PLAT_NotifyWFIExit(void)
-{
- /* Check if AHB5 clock has been turned of and needs resynchronisation */
- if (AHB5_SwitchedOff)
- {
- /* Read sleep register as earlier as possible */
- radio_sleep_timer_val = ll_intf_cmn_get_slptmr_value();
- }
-}
+/* USER CODE BEGIN LINKLAYER_PLAT 0 */
/* USER CODE END LINKLAYER_PLAT 0 */
diff --git a/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c
index 317cd0a..0ba4ff6 100644
--- a/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c
+++ b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c
@@ -1,18 +1,85 @@
-/*
- * Copyright (c) 2023 STMicroelectronics
- *
- * SPDX-License-Identifier: Apache-2.0
- */
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file ll_sys_if.c
+ * @author MCD Application Team
+ * @brief Source file for initiating system
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
#include <zephyr/logging/log.h>
#include "ll_intf.h"
#include "ll_intf_cmn.h"
#include "utilities_common.h"
+#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
+#include "temp_measurement.h"
+#endif /* (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1) */
+/* Private defines -----------------------------------------------------------*/
+
+/* USER CODE BEGIN PD */
+
+/* USER CODE END PD */
+
+/* Private macros ------------------------------------------------------------*/
+/* USER CODE BEGIN PM */
+
+/* USER CODE END PM */
+
+/* Private constants ---------------------------------------------------------*/
+/* USER CODE BEGIN PC */
+
+/* USER CODE END PC */
+
+/* Private variables ---------------------------------------------------------*/
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Global variables ----------------------------------------------------------*/
+
+/* USER CODE BEGIN GV */
+
+/* USER CODE END GV */
+
+/* Private functions prototypes-----------------------------------------------*/
+#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
+static void ll_sys_bg_temperature_measurement_init(void);
+#endif /* USE_TEMPERATURE_BASED_RADIO_CALIBRATION */
static void ll_sys_sleep_clock_source_selection(void);
-
+#if (CFG_RADIO_LSE_SLEEP_TIMER_CUSTOM_SCA_RANGE == 0)
+static uint8_t ll_sys_BLE_sleep_clock_accuracy_selection(void);
+#endif /* CFG_RADIO_LSE_SLEEP_TIMER_CUSTOM_SCA_RANGE */
void ll_sys_reset(void);
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/* External variables --------------------------------------------------------*/
+
+/* USER CODE BEGIN EV */
+
+/* USER CODE END EV */
+
#ifndef __ZEPHYR__
+/* Functions Definition ------------------------------------------------------*/
+
+/**
+ * @brief Link Layer background process initialization
+ * @param None
+ * @retval None
+ */
void ll_sys_bg_process_init(void)
{
/* Register Link Layer task */
@@ -30,19 +97,63 @@
}
#endif
+/**
+ * @brief Link Layer configuration phase before application startup.
+ * @param None
+ * @retval None
+ */
void ll_sys_config_params(void)
{
- ll_intf_config_ll_ctx_params(USE_RADIO_LOW_ISR, NEXT_EVENT_SCHEDULING_FROM_ISR);
+/* USER CODE BEGIN ll_sys_config_params_0 */
+
+/* USER CODE END ll_sys_config_params_0 */
+
+ /* Configure link layer behavior for low ISR use and next event scheduling method:
+ * - SW low ISR is used.
+ * - Next event is scheduled from ISR.
+ */
+ ll_intf_cmn_config_ll_ctx_params(USE_RADIO_LOW_ISR, NEXT_EVENT_SCHEDULING_FROM_ISR);
+
+#ifndef __ZEPHYR__
+/* USER CODE BEGIN ll_sys_config_params_1 */
+
+/* USER CODE END ll_sys_config_params_1 */
+
+#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
+ /* Initialize link layer temperature measurement background task */
+ ll_sys_bg_temperature_measurement_init();
+
+ /* Link layer IP uses temperature based calibration instead of periodic one */
+ ll_intf_cmn_set_temperature_sensor_state();
+#endif /* USE_TEMPERATURE_BASED_RADIO_CALIBRATION */
+
+ /* Link Layer power table */
+ ll_intf_cmn_select_tx_power_table(CFG_RF_TX_POWER_TABLE_ID);
+#endif
+/* USER CODE BEGIN ll_sys_config_params_2 */
+
+/* USER CODE END ll_sys_config_params_2 */
}
#ifndef __ZEPHYR__
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
+
+/**
+ * @brief Link Layer temperature request background process initialization
+ * @param None
+ * @retval None
+ */
void ll_sys_bg_temperature_measurement_init(void)
{
/* Register Temperature Measurement task */
UTIL_SEQ_RegTask(1U << CFG_TASK_TEMP_MEAS, UTIL_SEQ_RFU, TEMPMEAS_RequestTemperatureMeasurement);
}
+/**
+ * @brief Request backroud task processing for temperature measurement
+ * @param None
+ * @retval None
+ */
void ll_sys_bg_temperature_measurement(void)
{
static uint8_t initial_temperature_acquisition = 0;
@@ -119,6 +230,9 @@
void ll_sys_reset(void)
{
+/* USER CODE BEGIN ll_sys_reset_0 */
+
+/* USER CODE END ll_sys_reset_0 */
#if (CFG_RADIO_LSE_SLEEP_TIMER_CUSTOM_SCA_RANGE == 0)
uint8_t bsca = 0;
#endif /* CFG_RADIO_LSE_SLEEP_TIMER_CUSTOM_SCA_RANGE */
@@ -135,4 +249,8 @@
ll_intf_le_set_sleep_clock_accuracy(bsca);
}
#endif /* CFG_RADIO_LSE_SLEEP_TIMER_CUSTOM_SCA_RANGE */
+
+/* USER CODE BEGIN ll_sys_reset_1 */
+
+/* USER CODE END ll_sys_reset_1 */
}
diff --git a/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/power_table.c b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/power_table.c
index 3741b02..d0a37ae 100644
--- a/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/power_table.c
+++ b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/power_table.c
@@ -98,6 +98,40 @@
{0x02, 0x19, 0x01, 3}, /* Actual_Power = 2.6 dBm */
};
+const power_table_entry ll_tx_power_table_external_PA[] = {
+ {0x02, 0x14, 0x00, -20}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -19}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -18}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -17}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -16}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -15}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -14}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -13}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -12}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -11}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -10}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -9}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -8}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -7}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -6}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -5}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -4}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -3}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -2}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, -1}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 0}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 1}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 2}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 3}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 4}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 5}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 6}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 7}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 8}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 9}, /* Actual_Power = 20 dBm */
+ {0x02, 0x14, 0x00, 10}, /* Actual_Power = 20 dBm */
+};
+
/* USER CODE BEGIN ll_tx_power_table */
/* USER CODE END ll_tx_power_table */
@@ -106,6 +140,7 @@
const power_table_id_t ll_tx_power_tables[] = {
{ll_tx_power_table_max_power, sizeof(ll_tx_power_table_max_power)/sizeof(ll_tx_power_table_max_power[0]), VDD_LDO_VALUE_MAX_POWER, VDD_LDO_VALUE_2_ID_0, 0},
{ll_tx_power_table_low_power, sizeof(ll_tx_power_table_low_power)/sizeof(ll_tx_power_table_low_power[0]), VDD_LDO_VALUE_LOW_POWER, VDD_LDO_VALUE_2_ID_0, 1},
+ {ll_tx_power_table_external_PA, sizeof(ll_tx_power_table_external_PA)/sizeof(ll_tx_power_table_external_PA[0]), VDD_LDO_VALUE_LOW_POWER, VDD_LDO_VALUE_2_ID_0, 2},
/* USER CODE BEGIN ll_tx_power_tables */
/* USER CODE END ll_tx_power_tables */
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/app_debug.h b/lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/app_debug.h
deleted file mode 100644
index 9b8c28b..0000000
--- a/lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/app_debug.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file app_debug.h
- * @author MCD Application Team
- * @brief Real Time Debug module application APIs and signal table
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-#ifndef APP_DEBUG_H
-#define APP_DEBUG_H
-
-#include "RTDebug.h"
-
-/***************************************************/
-/** Specific application debug signals definition **/
-/***************************************************/
-typedef enum {
- APP_APPE_INIT,
-} app_debug_signal_t;
-
-#if(CFG_RT_DEBUG_GPIO_MODULE == 1)
-
-/************************************/
-/** Application local signal table **/
-/************************************/
-static const rt_debug_signal_t app_debug_table[] = {
-#if (USE_RT_DEBUG_APP_APPE_INIT == 1)
- [APP_APPE_INIT] = RT_DEBUG_APP_APPE_INIT,
-#else
- [APP_APPE_INIT] = RT_DEBUG_SIGNAL_UNUSED,
-#endif /* USE_RT_DEBUG_APP_APPE_INIT */
-};
-
-#endif /* CFG_RT_DEBUG_GPIO_MODULE */
-
-/**************************************/
-/** Application debug API definition **/
-/**************************************/
-void APP_DEBUG_SIGNAL_SET(app_debug_signal_t signal);
-void APP_DEBUG_SIGNAL_RESET(app_debug_signal_t signal);
-void APP_DEBUG_SIGNAL_TOGGLE(app_debug_signal_t signal);
-
-/*******************************/
-/** Debug GPIO Initialization **/
-/*******************************/
-void RT_DEBUG_GPIO_Init(void);
-
-#endif /* APP_DEBUG_H */
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/debug_config.h b/lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/debug_config.h
index 55bbd89..d212bc9 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/debug_config.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/debug_config.h
@@ -20,6 +20,10 @@
#ifndef DEBUG_CONFIG_H
#define DEBUG_CONFIG_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "app_conf.h"
#if(CFG_RT_DEBUG_GPIO_MODULE == 1)
@@ -1521,4 +1525,8 @@
#endif /* CFG_RT_DEBUG_GPIO_MODULE */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* DEBUG_CONFIG_H */
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.c b/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.c
index 3fde2be..5ccfa53 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.c
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
@@ -21,7 +21,6 @@
/* Includes ------------------------------------------------------------------*/
#include <stdio.h> /* vsnprintf */
-#include "app_conf.h"
#include "log_module.h"
#include "stm32_adv_trace.h"
#include "utilities_conf.h"
@@ -38,7 +37,7 @@
/* Private define ------------------------------------------------------------*/
/* Definition of 'End Of Line' */
-#define ENDOFLINE_SIZE 0x01u
+#define ENDOFLINE_SIZE (0x01u)
#define ENDOFLINE_CHAR '\n'
/* USER CODE BEGIN PD */
@@ -54,8 +53,9 @@
const Log_Module_t LOG_MODULE_DEFAULT_CONFIGURATION =
{
.verbose_level = LOG_VERBOSE_ERROR,
- .region = LOG_REGION_ALL_REGIONS
+ .region_mask = (LOG_REGION_ALL_REGIONS)
};
+
const Log_Verbose_Level_t LOG_VERBOSE_DEFAULT = LOG_VERBOSE_ERROR;
const Log_Region_t LOG_REGION_MASK_DEFAULT = LOG_REGION_ALL_REGIONS;
const Log_Color_t LOG_COLOR_DEFAULT_CONFIGURATION[] =
@@ -68,225 +68,202 @@
LOG_COLOR_CODE_GREEN, // For Region Zigbee
LOG_COLOR_CODE_GREEN, // For Region Thread
LOG_COLOR_CODE_DEFAULT, // For Region RTOS
-};
+ /* USER CODE BEGIN LOG_COLOR_DEFAULT_CONFIGURATION */
+ /* USER CODE END LOG_COLOR_DEFAULT_CONFIGURATION */
+};
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private variables ---------------------------------------------------------*/
-uint32_t lLogCurrentRegionMask;
-Log_Verbose_Level_t eLogCurrentVerboseLevel;
-Log_Color_t eLogCurrentColorList[32];
-CallBack_TimeStamp * pLogTimeStampFunc;
-
+static uint32_t current_region_mask;
+static Log_Verbose_Level_t current_verbose_level;
+static Log_Color_t current_color_list[32];
+CallBack_TimeStamp * log_timestamp_function;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
-static uint32_t Get_Region_Mask(Log_Region_t region);
+static uint32_t Get_Region_Mask(Log_Region_t Region);
+#if (LOG_INSERT_COLOR_INSIDE_THE_TRACE != 0)
+static uint16_t RegionToColor(char * TextBuffer, uint16_t SizeMax, Log_Region_t Region);
+#endif /* LOG_INSERT_COLOR_INSIDE_THE_TRACE != 0 */
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Functions Definition ------------------------------------------------------*/
-
-#if ( LOG_INSERT_COLOR_INSIDE_THE_TRACE != 0 )
-
+#if (LOG_INSERT_COLOR_INSIDE_THE_TRACE != 0)
/**
* @brief Add the color (in function of Region) on the start of Log sentence.
*
- * @param szBuffer Pointer on Log buffer
- * @param eRegion Region of Log (listed in Log_Region_t)
+ * @param TextBuffer Pointer on the log buffer
+ * @param SizeMax The maximum number of bytes that will be written to the buffer.
+ * @param Region Region of the log to apply its corresponding color.
*
* @return Length of the new Log.
*/
-static uint16_t RegionToColor( char * szBuffer, uint16_t iSizeMax, Log_Region_t eRegion )
+static uint16_t RegionToColor(char * TextBuffer, uint16_t SizeMax, Log_Region_t Region)
{
- uint16_t iLength = 0;
- Log_Color_t eColor;
- static Log_Color_t ePreviousColor = LOG_COLOR_NONE;
+ uint16_t text_length = 0;
+ Log_Color_t color;
+ static Log_Color_t previous_color = LOG_COLOR_NONE;
- if ( eRegion != LOG_MODULE_ALL_REGION_MASK )
+ if (Region != LOG_MODULE_ALL_REGION_MASK)
{
- eColor = eLogCurrentColorList[eRegion];
+ color = current_color_list[Region];
}
else
{
- eColor = LOG_COLOR_CODE_DEFAULT;
+ color = LOG_COLOR_CODE_DEFAULT;
}
/* Insert Color code only if previous is not the same */
- if ( eColor != ePreviousColor )
+ if (color != previous_color)
{
- if ( eColor == LOG_COLOR_CODE_DEFAULT )
- { snprintf( szBuffer, iSizeMax, "\x1b[0m" ); }
+ if (color == LOG_COLOR_CODE_DEFAULT)
+ {
+ snprintf(TextBuffer, SizeMax, "\x1b[0m");
+ }
else
- { snprintf( szBuffer, iSizeMax, "\x1b[0;%02dm", eColor ); }
+ {
+ snprintf(TextBuffer, SizeMax, "\x1b[0;%02dm", color);
+ }
- ePreviousColor = eColor;
- iLength = strlen( szBuffer );
+ previous_color = color;
+ text_length = strlen(TextBuffer);
}
- return( iLength );
+ return text_length;
}
+#endif /* LOG_INSERT_COLOR_INSIDE_THE_TRACE != 0 */
-#endif /* LOG_INSERT_COLOR_INSIDE_THE_TRACE */
-
-/**
- *
- */
-void Log_Module_PrintWithArg( Log_Verbose_Level_t eVerboseLevel, Log_Region_t eRegion, const char * pText, va_list args )
+void Log_Module_PrintWithArg(Log_Verbose_Level_t VerboseLevel, Log_Region_t Region, const char * Text, va_list Args)
{
- uint16_t iTempSize, iBuffSize = 0u;
- char szFullText[UTIL_ADV_TRACE_TMP_BUF_SIZE + 1u];
+ uint16_t tmp_size = 0;
+ uint16_t buffer_size = 0;
+ char full_text[UTIL_ADV_TRACE_TMP_BUF_SIZE + 1u];
- /**
- * This user section can be used to insert a guard clauses design pattern
- * if you want to modify how is handled the verbose.
- * E.g. By sewwlecting ERROR, you only want ERROR logs and not ERROR + INFO logs.
- *
- * Example of how to do it :
- *
- * // If the log Level isn't matching the configured one, then we don't log,
- * // excepted for LOG_VERBOSE_ALL_LOGS where we log in all cases.
- * uint8_t current_verbose = UTIL_ADV_TRACE_GetVerboseLevel();
- * if ((log_configuration.verbose_level != current_verbose) && (current_verbose != (uint8_t)LOG_VERBOSE_ALL_LOGS)) { return; }
- */
/* USER CODE BEGIN Log_Module_PrintWithArg_1 */
/* USER CODE END Log_Module_PrintWithArg_1 */
- /* Check verbose level */
- if ( eVerboseLevel > eLogCurrentVerboseLevel )
+ /* If the verbose level of the given log is not enabled, then we do not print the log */
+ if (VerboseLevel > current_verbose_level)
{
return;
}
- /* Check Region */
- if ( ( Get_Region_Mask( eRegion ) & lLogCurrentRegionMask ) == 0u )
+ /* If the region for the given log is not enabled, then we do not print the log */
+ if ((Get_Region_Mask(Region) & current_region_mask) == 0u)
{
return;
}
-#if ( LOG_INSERT_COLOR_INSIDE_THE_TRACE != 0 )
- /* Add Color in function of Region */
- iTempSize = RegionToColor( &szFullText[iBuffSize], ( UTIL_ADV_TRACE_TMP_BUF_SIZE - iBuffSize ), eRegion );
- iBuffSize += iTempSize;
-#endif /* LOG_INSERT_COLOR_INSIDE_THE_TRACE */
+#if (LOG_INSERT_COLOR_INSIDE_THE_TRACE != 0)
+ /* Add to full_text the color matching the region */
+ tmp_size = RegionToColor(&full_text[buffer_size], (UTIL_ADV_TRACE_TMP_BUF_SIZE - buffer_size), Region);
+ buffer_size += tmp_size;
+#endif /* LOG_INSERT_COLOR_INSIDE_THE_TRACE != 0 */
-#if ( LOG_INSERT_TIME_STAMP_INSIDE_THE_TRACE != 0 )
- if ( pLogTimeStampFunc != NULL )
+#if (LOG_INSERT_TIME_STAMP_INSIDE_THE_TRACE != 0)
+ if (log_timestamp_function != NULL)
{
- iTempSize = UTIL_ADV_TRACE_TMP_BUF_SIZE - iBuffSize;
- pLogTimeStampFunc( &szFullText[iBuffSize], iTempSize, &iTempSize );
- iBuffSize += iTempSize;
+ tmp_size = UTIL_ADV_TRACE_TMP_BUF_SIZE - buffer_size;
+ log_timestamp_function(&full_text[buffer_size], tmp_size, &tmp_size);
+ buffer_size += tmp_size;
}
-#endif /* LOG_INSERT_TIME_STAMP_INSIDE_THE_TRACE */
+#endif /* LOG_INSERT_TIME_STAMP_INSIDE_THE_TRACE != 0 */
/* Copy the data */
- iTempSize = (uint16_t)vsnprintf( &szFullText[iBuffSize], ( UTIL_ADV_TRACE_TMP_BUF_SIZE - iBuffSize ), pText, args );
- iBuffSize += iTempSize;
+ tmp_size = (uint16_t)vsnprintf(&full_text[buffer_size], (UTIL_ADV_TRACE_TMP_BUF_SIZE - buffer_size), Text, Args);
+ buffer_size += tmp_size;
/* USER CODE BEGIN Log_Module_PrintWithArg_2 */
/* USER CODE END Log_Module_PrintWithArg_2 */
-#if ( LOG_INSERT_EOL_INSIDE_THE_TRACE != 0 )
+#if (LOG_INSERT_EOL_INSIDE_THE_TRACE != 0)
/* Add End Of Line if needed */
- if ( iBuffSize > 1 )
+ if (buffer_size > 1)
{
- if ( ( szFullText[iBuffSize - 1] != ENDOFLINE_CHAR ) && ( szFullText[iBuffSize - 2] != ENDOFLINE_CHAR ) )
+ if ((full_text[buffer_size - 1] != ENDOFLINE_CHAR) && (full_text[buffer_size - 2] != ENDOFLINE_CHAR))
{
- szFullText[iBuffSize++] = ENDOFLINE_CHAR;
- szFullText[iBuffSize] = 0;
+ full_text[buffer_size++] = ENDOFLINE_CHAR;
+ full_text[buffer_size] = 0;
}
}
-#endif /* LOG_INSERT_EOL_INSIDE_THE_TRACE */
+#endif /* LOG_INSERT_EOL_INSIDE_THE_TRACE != 0 */
+
+ /* USER CODE BEGIN Log_Module_PrintWithArg_3 */
+
+ /* USER CODE END Log_Module_PrintWithArg_3 */
/* Send full_text to ADV Traces */
- UTIL_ADV_TRACE_Send( (const uint8_t *)szFullText, iBuffSize );
+ UTIL_ADV_TRACE_Send((const uint8_t *)full_text, buffer_size);
}
-/**
- *
- */
-void Log_Module_Print( Log_Verbose_Level_t eVerboseLevel, Log_Region_t eRegion, const char * pText, ...)
+void Log_Module_Print(Log_Verbose_Level_t VerboseLevel, Log_Region_t Region, const char * Text, ...)
{
#if (CFG_LOG_SUPPORTED != 0)
- va_list variadic_args;
+ va_list variadic_args;
- va_start( variadic_args, pText );
- Log_Module_PrintWithArg( eVerboseLevel, eRegion, pText, variadic_args );
- va_end( variadic_args );
+ va_start(variadic_args, Text);
+ Log_Module_PrintWithArg(VerboseLevel, Region, Text, variadic_args);
+ va_end(variadic_args);
#else /* (CFG_LOG_SUPPORTED != 0) */
- UNUSED(eVerboseLevel);
- UNUSED(eRegion);
- UNUSED(pText);
+ UNUSED(VerboseLevel);
+ UNUSED(Region);
+ UNUSED(Text);
#endif /* (CFG_LOG_SUPPORTED != 0) */
}
-/**
- *
- */
-void Log_Module_Init(Log_Module_t log_configuration)
+void Log_Module_Init(Log_Module_t LogConfiguration)
{
UTIL_ADV_TRACE_Init();
- memcpy( &eLogCurrentColorList, &LOG_COLOR_DEFAULT_CONFIGURATION, sizeof(LOG_COLOR_DEFAULT_CONFIGURATION) );
- Log_Module_Set_Verbose_Level(log_configuration.verbose_level);
- Log_Module_Set_Region(log_configuration.region);
- pLogTimeStampFunc = NULL;
+ memcpy(¤t_color_list, &LOG_COLOR_DEFAULT_CONFIGURATION, sizeof(LOG_COLOR_DEFAULT_CONFIGURATION));
+ Log_Module_Set_Verbose_Level(LogConfiguration.verbose_level);
+ Log_Module_Set_Multiple_Regions(LogConfiguration.region_mask);
+ log_timestamp_function = NULL;
}
-/**
- *
- */
void Log_Module_DeInit(void)
{
UTIL_ADV_TRACE_DeInit();
}
-/**
- *
- */
-void Log_Module_Set_Verbose_Level(Log_Verbose_Level_t new_verbose_level)
+void Log_Module_Set_Verbose_Level(Log_Verbose_Level_t NewVerboseLevel)
{
- eLogCurrentVerboseLevel = new_verbose_level;
+ current_verbose_level = NewVerboseLevel;
}
-/**
- *
- */
-void Log_Module_Set_Region(Log_Region_t new_region)
+void Log_Module_Set_Region(Log_Region_t NewRegion)
{
- lLogCurrentRegionMask = Get_Region_Mask(new_region);
+ current_region_mask = Get_Region_Mask(NewRegion);
}
-/**
- *
- */
-void Log_Module_Add_Region(Log_Region_t new_region)
+void Log_Module_Add_Region(Log_Region_t NewRegion)
{
- lLogCurrentRegionMask |= Get_Region_Mask(new_region);
+ current_region_mask |= Get_Region_Mask(NewRegion);
}
-/**
- *
- */
+void Log_Module_Remove_Region(Log_Region_t Region)
+{
+ current_region_mask &= ~Get_Region_Mask(Region);
+}
+
void Log_Module_Enable_All_Regions(void)
{
Log_Module_Set_Region(LOG_REGION_ALL_REGIONS);
}
-/**
- *
- */
-static uint32_t Get_Region_Mask(Log_Region_t region)
+static uint32_t Get_Region_Mask(Log_Region_t Region)
{
- if (region == LOG_REGION_ALL_REGIONS)
+ if (Region == LOG_REGION_ALL_REGIONS)
{
/* Return the full mask */
return ((uint32_t)LOG_MODULE_ALL_REGION_MASK);
@@ -294,27 +271,26 @@
else
{
/* Return the bit matching the region */
- return ((uint32_t)(1U << ((uint32_t)region - 1U)));
+ return ((uint32_t)(1U << ((uint32_t)Region)));
}
}
-/**
- *
- */
-void Log_Module_Set_Color(Log_Region_t eRegion, Log_Color_t eNewColor )
+void Log_Module_Set_Multiple_Regions(uint32_t NewRegionMask)
{
- if ( eRegion != LOG_MODULE_ALL_REGION_MASK )
+ current_region_mask = NewRegionMask;
+}
+
+void Log_Module_Set_Color(Log_Region_t Region, Log_Color_t Color)
+{
+ if ( Region != LOG_MODULE_ALL_REGION_MASK )
{
- eLogCurrentColorList[eRegion] = eNewColor;
+ current_color_list[Region] = Color;
}
}
-/**
- *
- */
-void Log_Module_RegisterTimeStampFunction( CallBack_TimeStamp * pCallbackFunc )
+void Log_Module_RegisterTimeStampFunction(CallBack_TimeStamp * TimeStampFunction)
{
- pLogTimeStampFunc = pCallbackFunc;
+ log_timestamp_function = TimeStampFunction;
}
/* USER CODE BEGIN 0 */
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.h b/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.h
index 9dfb0a7..9b5d864 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
@@ -30,139 +30,37 @@
#include <stdarg.h>
#include <stdint.h>
#include <stdbool.h>
-#include "app_conf.h"
+#include "log_module_conf.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
-/* Module configuration ------------------------------------------------------*/
-/**
- * @brief When this define is set to 0, there is no time stamp insertion inside
- * the trace data. When set to 1, there is.
- */
-#define LOG_INSERT_TIME_STAMP_INSIDE_THE_TRACE CFG_LOG_INSERT_TIME_STAMP_INSIDE_THE_TRACE
-
-/**
- * @brief When this define is set to 1, a color in function or region is inserted on
- * the trace data. When set to 0, color is always the same.
- */
-#define LOG_INSERT_COLOR_INSIDE_THE_TRACE CFG_LOG_INSERT_COLOR_INSIDE_THE_TRACE
-
-/**
- * @brief When this define is set to 1, a End Of File is inserted at the end of
- * the trace data. When set to 0, not EOF is inserted.
- */
-#define LOG_INSERT_EOL_INSIDE_THE_TRACE CFG_LOG_INSERT_EOL_INSIDE_THE_TRACE
-
-/* USER CODE BEGIN Module configuration */
-
-/* USER CODE END Module configuration */
-
-/* Private defines -----------------------------------------------------------*/
-/* These defines are related to the UTIL_ADV_TRACE. Do not modify them please. */
-#define LOG_MODULE_MIN_VERBOSE_LEVEL (0)
-#define LOG_MODULE_MAX_VERBOSE_LEVEL (0xFFFFFFFF)
-#define LOG_MODULE_MIN_REGION_VALUE (0)
-#define LOG_MODULE_ALL_REGION_MASK (0xFFFFFFFF)
-
-/* USER CODE BEGIN Private defines */
-
-/* USER CODE END Private defines */
-
/* Exported types ------------------------------------------------------------*/
/* Log module types */
/**
- * @brief Customizable enum describing the verbose levels used by the log module.
- * The levels include the lower levels in the logs.
- * E.g. LOG_VERBOSE_ERROR means LOG_VERBOSE_ERROR logs will be printed,
- * as well as LOG_VERBOSE_INFO, but not the others with higher values.
- * The min and max ranges are defined by LOG_MODULE_MIN_VERBOSE_LEVEL
- * and LOG_MODULE_MAX_VERBOSE_LEVEL.
- * The user can add its own levels but must NOT add a value to the said
- * levels. Verbose levels are handled by ADV Trace.
- */
-typedef enum
-{
- LOG_VERBOSE_INFO = LOG_MODULE_MIN_VERBOSE_LEVEL,
- /* USER CODE BEGIN Log_Verbose_Level_t_0 */
-
- /* USER CODE END Log_Verbose_Level_t_0 */
- LOG_VERBOSE_ERROR,
- /* USER CODE BEGIN Log_Verbose_Level_t_1 */
-
- /* USER CODE END Log_Verbose_Level_t_1 */
- LOG_VERBOSE_WARNING,
- /* USER CODE BEGIN Log_Verbose_Level_t_2 */
-
- /* USER CODE END Log_Verbose_Level_t_2 */
- LOG_VERBOSE_DEBUG,
- /* USER CODE BEGIN Log_Verbose_Level_t_3 */
-
- /* USER CODE END Log_Verbose_Level_t_3 */
- LOG_VERBOSE_ALL_LOGS = LOG_MODULE_MAX_VERBOSE_LEVEL,
-} Log_Verbose_Level_t;
-
-/**
- * @brief Customizable enum describing the regions used by the log module.
- * Regions are used to separate the logs into different places.
- * Let's say you have a Task 1 and a Task 2. Both of them have Info and
- * Debug logs. By using them as such, i.e. with the same regions, you'll
- * print the logs of the 2 tasks as long as the verbose is Info or Debug.
- * If you create a region for Task 1 and another for Task 2, you can
- * split the logs between them, and, if needed, only print the Debug
- * logs for Task 1 only (i.e. Task 1 logs for Info and Debug).
- * Behind the scenes is a mask into which each region is a bit.
- * The user can add its own regions but must NOT add a value to them.
- * The log module handles the mask on its own.
- */
-typedef enum
-{
- LOG_REGION_BLE = LOG_MODULE_MIN_REGION_VALUE,
- LOG_REGION_SYSTEM,
- LOG_REGION_APP,
- LOG_REGION_LINKLAYER,
- LOG_REGION_MAC,
- LOG_REGION_ZIGBEE,
- LOG_REGION_THREAD,
- LOG_REGION_RTOS,
- /* USER CODE BEGIN Log_Region_t */
-
- /* USER CODE END Log_Region_t */
- LOG_REGION_ALL_REGIONS = LOG_MODULE_ALL_REGION_MASK,
-} Log_Region_t;
-
-typedef enum
-{
- LOG_COLOR_NONE = 0, // Initialization.
- LOG_COLOR_CODE_DEFAULT = 37, // White
- LOG_COLOR_CODE_RED = 91,
- LOG_COLOR_CODE_GREEN = 92,
- LOG_COLOR_CODE_YELLOW = 93,
- LOG_COLOR_CODE_CYAN = 96,
- /* USER CODE BEGIN Log_Color_t */
-
- /* USER CODE END Log_Color_t */
-} Log_Color_t;
-
-/**
* @brief Data type to initialize the module by calling Log_Module_Init.
+ * verbose_level : A value of type Log_Verbose_Level_t.
+ * region_mask : A mask based on Log_Region_t.
+ * You can directly assign it to LOG_REGION_ALL_REGIONS,
+ * or select only some regions :
+ * (1U << LOG_REGION_BLE | 1U << LOG_REGION_APP)
*/
typedef struct
{
- Log_Verbose_Level_t verbose_level;
- Log_Region_t region;
+ Log_Verbose_Level_t verbose_level;
+ uint32_t region_mask;
} Log_Module_t;
/**
- * @brief Callback function to insert Time Stamp.
+ * @brief Callback function to insert Time Stamp.
*
- * @param pData The location where insert the new TimeStamp
- * @param iSizeMax The maximum size for the TimeStamp insert.
- * @param piSize Pointer on the size of the TimeStamp insert.
+ * @param Data The data into which to insert the TimeStamp.
+ * @param SizeMax The maximum size for the TimeStamp insert.
+ * @param TimeStampSize Pointer to update with the size of the TimeStamp inserted into data.
*/
-typedef void CallBack_TimeStamp( char * pData, uint16_t iSizeMax, uint16_t * piSize );
+typedef void CallBack_TimeStamp(char * Data, uint16_t SizeMax, uint16_t * TimeStampSize);
/* USER CODE BEGIN ET */
@@ -179,6 +77,7 @@
/**
* @brief A const enum variable with the verbose level set to LOG_VERBOSE_ERROR.
* The levels include the lower levels in the logs.
+ *
* E.g. LOG_VERBOSE_ERROR means LOG_VERBOSE_ERROR logs will be printed,
* as well as LOG_VERBOSE_INFO, but not the others with higher values.
*/
@@ -197,13 +96,15 @@
/* Module API - Module configuration */
/**
* @brief Initialization of the log module.
- * @param The configuration of the log module, of type Log_Module_t.
+ *
+ * @param LogConfiguration The configuration of the log module, of type Log_Module_t.
* @return None.
*/
-void Log_Module_Init(Log_Module_t log_configuration);
+void Log_Module_Init(Log_Module_t LogConfiguration);
/**
* @brief DeInitialization of the log module.
+ *
* @param None.
* @return None.
*/
@@ -212,190 +113,106 @@
/**
* @brief Set the verbose level of the log.
* The levels include the lower levels in the logs.
+ *
* E.g. LOG_VERBOSE_ERROR means LOG_VERBOSE_ERROR logs will be printed,
* as well as LOG_VERBOSE_INFO, but not the others with higher values.
- * @param The new verbose level to be set, of type Log_Verbose_Level_t
+ *
+ * @param NewVerboseLevel The new verbose level to be set, of type Log_Verbose_Level_t
* @return None
*/
-void Log_Module_Set_Verbose_Level(Log_Verbose_Level_t new_verbose_level);
+void Log_Module_Set_Verbose_Level(Log_Verbose_Level_t NewVerboseLevel);
/**
- * @brief Replace the current region mask to use and set only the given region.
- * @param The new region to use, of type Log_Region_t.
+ * @brief Replace the current regions in use and only set the given region.
+ *
+ * @param NewRegion The new region to use, of type Log_Region_t.
* @return None.
*/
-void Log_Module_Set_Region(Log_Region_t new_region);
+void Log_Module_Set_Region(Log_Region_t NewRegion);
+
+/**
+ * @brief Replace the current regions in use and set one or several as replacement.
+ *
+ * @param NewRegionMask A mask, of type uint32_t, where each bit corresponds to a region.
+ * You can directly assign it to LOG_REGION_ALL_REGIONS to enable all of them,
+ * or select only some regions, e.g. (1U << LOG_REGION_BLE | 1U << LOG_REGION_APP)
+ * @return None.
+ */
+void Log_Module_Set_Multiple_Regions(uint32_t NewRegionMask);
/**
* @brief Add to the current region mask the given region.
- * @param The new region to use, alongside the others, of type Log_Region_t.
+ *
+ * @param NewRegion The new region to use, alongside the others, of type Log_Region_t.
* @return None.
*/
-void Log_Module_Add_Region(Log_Region_t new_region);
+void Log_Module_Add_Region(Log_Region_t NewRegion);
+
+/**
+ * @brief Remove from the current region mask the given region.
+ *
+ * @param Region The region to remove, of type Log_Region_t.
+ * @return None.
+ */
+void Log_Module_Remove_Region(Log_Region_t Region);
/**
* @brief Enable all the regions.
+ *
* @param None.
* @return None.
*/
void Log_Module_Enable_All_Regions(void);
/**
- * @brief Set/Replace the color for a region.
- * @param eRegion The region where apply the color, type Log_Region_t.
- * @param eNewColor The color to apply to selected region, type Log_Color_t.
+ * @brief Set the color for a region.
+ *
+ * @param Region The region where apply the color, type Log_Region_t.
+ * @param Color The color to apply to selected region, of type Log_Color_t.
* @return None.
*/
-void Log_Module_Set_Color(Log_Region_t eRegion, Log_Color_t eNewColor );
+void Log_Module_Set_Color(Log_Region_t Region, Log_Color_t Color);
/**
- * @brief Register a callback function to insert the 'TimeStamp' to the log.
+ * @brief Register a callback function to insert the TimeStamp into the data.
*
- * @param pCallbackFunc Callback function to insert Time Stamp.
- * This function is typedef void ( uint8_t * pData, uint16_t * piSize );
- * Where pData is the location where insert the new TimeStamp and piSize is the size of insert.
+ * @param TimeStampFunction Callback function to insert TimeStamp.
+ * This function is typedef void (char * data, uint16_t size_max, uint16_t * timestamp_size);
+ * Where data is the location where to insert the new TimeStamp, and timestamp_size is the size of this insertion.
* @return None.
*/
-void Log_Module_RegisterTimeStampFunction( CallBack_TimeStamp * pCallbackFunc );
+void Log_Module_RegisterTimeStampFunction(CallBack_TimeStamp * TimeStampFunction);
/* Module API - Wrapper function */
/**
- * @brief Underlying function of all the LOG macros.
+ * @brief Underlying function of all the LOG_xxx macros.
*
- * @param eVerboseLevel The level of verbose for this Log.
- * @param eRegion The stack where the log is issued
- * @param pText Pointer to the text to be printed.
- * @param Any other parameters to be printed with the text.
- * E.g. an int variable. as 3rd parameter, as long as %d is in text.
+ * @param VerboseLevel The level of verbose used for this Log, of type Log_Verbose_Level_t.
+ * @param Region The region set for this log, of type Log_Region_t.
+ * @param Text The text to be printed.
+ * @param ... Any other parameters to be printed with the text.
+ * E.g. an int variable. as 3rd parameter, as long as %d is in text.
*
* @return None.
*/
-void Log_Module_Print( Log_Verbose_Level_t eVerboseLevel, Log_Region_t eRegion, const char * pText, ...);
+void Log_Module_Print(Log_Verbose_Level_t VerboseLevel, Log_Region_t Region, const char * Text, ...);
/**
* @brief Function of log with already a arg list.
*
- * @param eVerboseLevel The level of verbose for this Log.
- * @param eRegion The stack where the log is issued
- * @param pText Pointer to the text to be printed.
- * @param args Arguments list.
+ * @param VerboseLevel The level of verbose used for this Log, of type Log_Verbose_Level_t.
+ * @param Region The region set for this log, of type Log_Region_t.
+ * @param Text The text to be printed
+ * @param Args Arguments list, of type va_list.
*
* @return None.
*/
-void Log_Module_PrintWithArg( Log_Verbose_Level_t eVerboseLevel, Log_Region_t eRegion, const char * pText, va_list args );
+void Log_Module_PrintWithArg(Log_Verbose_Level_t VerboseLevel, Log_Region_t Region, const char * Text, va_list Args);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
-/* Exported macro ------------------------------------------------------------*/
-/* Display 64 bits number for all compiler. */
-/* Example : LOG_INFO_APP( "New Device : " LOG_DISPLAY64() " installed in %d seconds", LOG_NUMBER64( dlDevice ), iTime ); */
-#define LOG_DISPLAY64() "0x%08X%08X"
-#define LOG_NUMBER64( number ) (uint32_t)( number >> 32u ), (uint32_t)( number )
-
-/* Module API - Log macros for each region */
-/* LOG_REGION_BLE */
-#if (CFG_LOG_SUPPORTED != 0)
-#define LOG_INFO_BLE(...) Log_Module_Print( LOG_VERBOSE_INFO, LOG_REGION_BLE, __VA_ARGS__)
-#define LOG_ERROR_BLE(...) Log_Module_Print( LOG_VERBOSE_ERROR, LOG_REGION_BLE, __VA_ARGS__)
-#define LOG_WARNING_BLE(...) Log_Module_Print( LOG_VERBOSE_WARNING, LOG_REGION_BLE, __VA_ARGS__)
-#define LOG_DEBUG_BLE(...) Log_Module_Print( LOG_VERBOSE_DEBUG, LOG_REGION_BLE, __VA_ARGS__)
-#else /* (CFG_LOG_SUPPORTED != 0) */
-#define LOG_INFO_BLE(...) do {} while(0)
-#define LOG_ERROR_BLE(...) do {} while(0)
-#define LOG_WARNING_BLE(...) do {} while(0)
-#define LOG_DEBUG_BLE(...) do {} while(0)
-#endif /* (CFG_LOG_SUPPORTED != 0) */
-
-/* USER CODE BEGIN LOG_REGION_BLE */
-/**
- * Add inside this user section your defines to match the new verbose levels you
- * created into Log_Verbose_Level_t.
- * Example :
- * #define LOG_CUSTOM_BLE(...) Log_Module_Print( LOG_VERBOSE_CUSTOM, LOG_REGION_BLE, __VA_ARGS__);
- *
- * You don't need to update all regions with your custom values.
- * Do it accordingly to your needs. E.g you might not need LOG_VERBOSE_CUSTOM
- * for a System region.
- */
-
-/* USER CODE END LOG_REGION_BLE */
-
-/* LOG_REGION_SYSTEM */
-#if (CFG_LOG_SUPPORTED != 0)
-#define LOG_INFO_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_INFO, LOG_REGION_SYSTEM, __VA_ARGS__)
-#define LOG_ERROR_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_ERROR, LOG_REGION_SYSTEM, __VA_ARGS__)
-#define LOG_WARNING_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_WARNING, LOG_REGION_SYSTEM, __VA_ARGS__)
-#define LOG_DEBUG_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_DEBUG, LOG_REGION_SYSTEM, __VA_ARGS__)
-#else /* (CFG_LOG_SUPPORTED != 0) */
-#define LOG_INFO_SYSTEM(...) do {} while(0)
-#define LOG_ERROR_SYSTEM(...) do {} while(0)
-#define LOG_WARNING_SYSTEM(...) do {} while(0)
-#define LOG_DEBUG_SYSTEM(...) do {} while(0)
-#endif /* (CFG_LOG_SUPPORTED != 0) */
-
-/* USER CODE BEGIN LOG_REGION_SYSTEM */
-/**
- * Add inside this user section your defines to match the new verbose levels you
- * created into Log_Verbose_Level_t.
- * Example :
- * #define LOG_CUSTOM_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_CUSTOM, LOG_REGION_SYSTEM, __VA_ARGS__);
- *
- * You don't need to update all regions with your custom values.
- * Do it accordingly to your needs. E.g you might not need LOG_VERBOSE_CUSTOM
- * for a System region.
- */
-
-/* USER CODE END LOG_REGION_SYSTEM */
-
-/* LOG_REGION_APP */
-#if (CFG_LOG_SUPPORTED != 0)
-#define LOG_INFO_APP(...) Log_Module_Print( LOG_VERBOSE_INFO, LOG_REGION_APP, __VA_ARGS__)
-#define LOG_ERROR_APP(...) Log_Module_Print( LOG_VERBOSE_ERROR, LOG_REGION_APP, __VA_ARGS__)
-#define LOG_WARNING_APP(...) Log_Module_Print( LOG_VERBOSE_WARNING, LOG_REGION_APP, __VA_ARGS__)
-#define LOG_DEBUG_APP(...) Log_Module_Print( LOG_VERBOSE_DEBUG, LOG_REGION_APP, __VA_ARGS__)
-#else /* (CFG_LOG_SUPPORTED != 0) */
-#define LOG_INFO_APP(...) do {} while(0)
-#define LOG_ERROR_APP(...) do {} while(0)
-#define LOG_WARNING_APP(...) do {} while(0)
-#define LOG_DEBUG_APP(...) do {} while(0)
-#endif /* (CFG_LOG_SUPPORTED != 0) */
-
-/* USER CODE BEGIN LOG_REGION_APP */
-/**
- * Add inside this user section your defines to match the new verbose levels you
- * created into Log_Verbose_Level_t.
- * Example :
- * #define LOG_CUSTOM_APP(...) Log_Module_Print( LOG_VERBOSE_CUSTOM, LOG_REGION_APP, __VA_ARGS__);
- *
- * You don't need to update all regions with your custom values.
- * Do it accordingly to your needs. E.g you might not need LOG_VERBOSE_CUSTOM
- * for a System region.
- */
-
-/* USER CODE END LOG_REGION_APP */
-
-/* USER CODE BEGIN APP_LOG_USER_DEFINES */
-/**
- * Add inside this user section your defines to match the new regions you
- * created into Log_Region_t.
- * Example :
- * #if (CFG_LOG_SUPPORTED != 0)
- * #define LOG_INFO_CUSTOM(...) Log_Module_Print( LOG_VERBOSE_INFO, LOG_REGION_CUSTOM, __VA_ARGS__)
- * #define LOG_ERROR_CUSTOM(...) Log_Module_Print( LOG_VERBOSE_ERROR, LOG_REGION_CUSTOM, __VA_ARGS__)
- * #define LOG_WARNING_CUSTOM(...) Log_Module_Print( LOG_VERBOSE_WARNING, LOG_REGION_CUSTOM, __VA_ARGS__)
- * #define LOG_DEBUG_CUSTOM(...) Log_Module_Print( LOG_VERBOSE_DEBUG, LOG_REGION_CUSTOM, __VA_ARGS__)
- * #else
- * #define LOG_INFO_CUSTOM(...) do {} while(0)
- * #define LOG_ERROR_CUSTOM(...) do {} while(0)
- * #define LOG_WARNING_CUSTOM(...) do {} while(0)
- * #define LOG_DEBUG_CUSTOM(...) do {} while(0)
- * #endif
- */
-
-/* USER CODE END APP_LOG_USER_DEFINES */
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module_conf.h b/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module_conf.h
new file mode 100644
index 0000000..997b8a7
--- /dev/null
+++ b/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module_conf.h
@@ -0,0 +1,294 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file log_module.h
+ * @author MCD Application Team
+ * @brief Header file of the log module.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2024 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef LOG_MODULE_CONF_H
+#define LOG_MODULE_CONF_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "app_conf.h"
+
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Module configuration ------------------------------------------------------*/
+/**
+ * @brief When this define is set to 0, there is no time stamp added to the trace data.
+ * When this define is set to 1, the time stamp is added to the trace data,
+ * according to the function registered with Log_Module_RegisterTimeStampFunction.
+ */
+#define LOG_INSERT_TIME_STAMP_INSIDE_THE_TRACE CFG_LOG_INSERT_TIME_STAMP_INSIDE_THE_TRACE
+
+/**
+ * @brief When this define is set to 0, the color of the trace data remains the same for all regions.
+ * When this define is set to 1, the color added to the trace data is based on LOG_COLOR_DEFAULT_CONFIGURATION.
+ */
+#define LOG_INSERT_COLOR_INSIDE_THE_TRACE CFG_LOG_INSERT_COLOR_INSIDE_THE_TRACE
+
+/**
+ * @brief When this define is set to 0, the trace data is not modified.
+ * When this define is set to 1, if there is no ENDOFLINE_CHAR as last
+ * character in the trace data, then one is added.
+ */
+#define LOG_INSERT_EOL_INSIDE_THE_TRACE CFG_LOG_INSERT_EOL_INSIDE_THE_TRACE
+
+/* USER CODE BEGIN Module configuration */
+
+/* USER CODE END Module configuration */
+
+/* Private defines -----------------------------------------------------------*/
+/* These defines are related to the UTIL_ADV_TRACE. Do not modify them please. */
+#define LOG_MODULE_MIN_VERBOSE_LEVEL (0)
+#define LOG_MODULE_MAX_VERBOSE_LEVEL (0xFFFFFFFF)
+#define LOG_MODULE_MIN_REGION_VALUE (0)
+#define LOG_MODULE_ALL_REGION_MASK (0xFFFFFFFF)
+
+/* USER CODE BEGIN PD */
+
+/* USER CODE END PD */
+
+/* Exported types ------------------------------------------------------------*/
+/* Log module types */
+/**
+ * @brief Customizable enum describing the verbose levels used by the log module.
+ * The levels include the lower levels in the logs.
+ *
+ * E.g. LOG_VERBOSE_ERROR means LOG_VERBOSE_ERROR logs will be printed,
+ * as well as LOG_VERBOSE_INFO, but not the others with higher values.
+ *
+ * The min and max ranges are defined by LOG_MODULE_MIN_VERBOSE_LEVEL
+ * and LOG_MODULE_MAX_VERBOSE_LEVEL.
+ *
+ * The user can add its own levels but must NOT add a value to the said
+ * levels. Verbose levels are handled by the UTIL_ADV_TRACE.
+ */
+typedef enum
+{
+ LOG_VERBOSE_INFO = LOG_MODULE_MIN_VERBOSE_LEVEL,
+ /* USER CODE BEGIN Log_Verbose_Level_t_0 */
+
+ /* USER CODE END Log_Verbose_Level_t_0 */
+ LOG_VERBOSE_ERROR,
+ /* USER CODE BEGIN Log_Verbose_Level_t_1 */
+
+ /* USER CODE END Log_Verbose_Level_t_1 */
+ LOG_VERBOSE_WARNING,
+ /* USER CODE BEGIN Log_Verbose_Level_t_2 */
+
+ /* USER CODE END Log_Verbose_Level_t_2 */
+ LOG_VERBOSE_DEBUG,
+ /* USER CODE BEGIN Log_Verbose_Level_t_3 */
+
+ /* USER CODE END Log_Verbose_Level_t_3 */
+ LOG_VERBOSE_ALL_LOGS = LOG_MODULE_MAX_VERBOSE_LEVEL,
+} Log_Verbose_Level_t;
+
+/**
+ * @brief Customizable enum describing the regions used by the log module.
+ * Regions are used to separate the logs into different places.
+ *
+ * Let's say you have a Task 1 and a Task 2.
+ * Both of them have Info and Debug logs.
+ *
+ * By using them as such, i.e. with the same regions, you'll
+ * print the logs of the 2 tasks as long as the verbose is Info or Debug.
+ *
+ * If you create a region for Task 1 and another for Task 2, you can
+ * split the logs between them, and, if needed, only print the Debug
+ * logs for Task 1 only (i.e. Task 1 logs for Info and Debug).
+ *
+ * Behind the scenes is a mask into which each region is a bit.
+ * The user can add its own regions but must NOT add a value to them.
+ * The log module handles the mask on its own.
+ */
+typedef enum
+{
+ LOG_REGION_BLE = LOG_MODULE_MIN_REGION_VALUE,
+ LOG_REGION_SYSTEM,
+ LOG_REGION_APP,
+ LOG_REGION_LINKLAYER,
+ LOG_REGION_MAC,
+ LOG_REGION_ZIGBEE,
+ LOG_REGION_THREAD,
+ LOG_REGION_RTOS,
+ /* USER CODE BEGIN Log_Region_t */
+
+ /* USER CODE END Log_Region_t */
+ LOG_REGION_ALL_REGIONS = LOG_MODULE_ALL_REGION_MASK,
+} Log_Region_t;
+
+typedef enum
+{
+ LOG_COLOR_NONE = 0, /* Initialization */
+ LOG_COLOR_CODE_DEFAULT = 37, /* White */
+ LOG_COLOR_CODE_RED = 91,
+ LOG_COLOR_CODE_GREEN = 92,
+ LOG_COLOR_CODE_YELLOW = 93,
+ LOG_COLOR_CODE_CYAN = 96,
+ /* USER CODE BEGIN Log_Color_t */
+
+ /* USER CODE END Log_Color_t */
+} Log_Color_t;
+
+/* USER CODE BEGIN ET */
+
+/* USER CODE END ET */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Display 64 bits number for all compiler. */
+/* Example : LOG_INFO_APP( "New Device : " LOG_DISPLAY64() " installed in %d seconds", LOG_NUMBER64( dlDevice ), iTime ); */
+#define LOG_DISPLAY64() "0x%08X%08X"
+#define LOG_NUMBER64( number ) (uint32_t)( number >> 32u ), (uint32_t)( number )
+
+/* Module API - Log macros for each region */
+/* LOG_REGION_BLE */
+#if (CFG_LOG_SUPPORTED != 0)
+#define LOG_INFO_BLE(...) Log_Module_Print( LOG_VERBOSE_INFO, LOG_REGION_BLE, __VA_ARGS__)
+#define LOG_ERROR_BLE(...) Log_Module_Print( LOG_VERBOSE_ERROR, LOG_REGION_BLE, __VA_ARGS__)
+#define LOG_WARNING_BLE(...) Log_Module_Print( LOG_VERBOSE_WARNING, LOG_REGION_BLE, __VA_ARGS__)
+#define LOG_DEBUG_BLE(...) Log_Module_Print( LOG_VERBOSE_DEBUG, LOG_REGION_BLE, __VA_ARGS__)
+#else /* (CFG_LOG_SUPPORTED != 0) */
+#define LOG_INFO_BLE(...) do {} while(0)
+#define LOG_ERROR_BLE(...) do {} while(0)
+#define LOG_WARNING_BLE(...) do {} while(0)
+#define LOG_DEBUG_BLE(...) do {} while(0)
+#endif /* (CFG_LOG_SUPPORTED != 0) */
+
+/* USER CODE BEGIN LOG_REGION_BLE */
+/**
+ * Add inside this user section your defines to match the new verbose levels you
+ * created into Log_Verbose_Level_t.
+ * Example :
+ * #define LOG_CUSTOM_BLE(...) Log_Module_Print( LOG_VERBOSE_CUSTOM, LOG_REGION_BLE, __VA_ARGS__);
+ *
+ * You don't need to update all regions with your custom values.
+ * Do it accordingly to your needs. E.g you might not need LOG_VERBOSE_CUSTOM for a System region.
+ */
+
+/* USER CODE END LOG_REGION_BLE */
+
+/* LOG_REGION_SYSTEM */
+#if (CFG_LOG_SUPPORTED != 0)
+#define LOG_INFO_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_INFO, LOG_REGION_SYSTEM, __VA_ARGS__)
+#define LOG_ERROR_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_ERROR, LOG_REGION_SYSTEM, __VA_ARGS__)
+#define LOG_WARNING_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_WARNING, LOG_REGION_SYSTEM, __VA_ARGS__)
+#define LOG_DEBUG_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_DEBUG, LOG_REGION_SYSTEM, __VA_ARGS__)
+#else /* (CFG_LOG_SUPPORTED != 0) */
+#define LOG_INFO_SYSTEM(...) do {} while(0)
+#define LOG_ERROR_SYSTEM(...) do {} while(0)
+#define LOG_WARNING_SYSTEM(...) do {} while(0)
+#define LOG_DEBUG_SYSTEM(...) do {} while(0)
+#endif /* (CFG_LOG_SUPPORTED != 0) */
+
+/* USER CODE BEGIN LOG_REGION_SYSTEM */
+/**
+ * Add inside this user section your defines to match the new verbose levels you
+ * created into Log_Verbose_Level_t.
+ * Example :
+ * #define LOG_CUSTOM_SYSTEM(...) Log_Module_Print( LOG_VERBOSE_CUSTOM, LOG_REGION_SYSTEM, __VA_ARGS__);
+ *
+ * You don't need to update all regions with your custom values.
+ * Do it accordingly to your needs. E.g you might not need LOG_VERBOSE_CUSTOM for a System region.
+ */
+
+/* USER CODE END LOG_REGION_SYSTEM */
+
+/* LOG_REGION_APP */
+#if (CFG_LOG_SUPPORTED != 0)
+#define LOG_INFO_APP(...) Log_Module_Print( LOG_VERBOSE_INFO, LOG_REGION_APP, __VA_ARGS__)
+#define LOG_ERROR_APP(...) Log_Module_Print( LOG_VERBOSE_ERROR, LOG_REGION_APP, __VA_ARGS__)
+#define LOG_WARNING_APP(...) Log_Module_Print( LOG_VERBOSE_WARNING, LOG_REGION_APP, __VA_ARGS__)
+#define LOG_DEBUG_APP(...) Log_Module_Print( LOG_VERBOSE_DEBUG, LOG_REGION_APP, __VA_ARGS__)
+#else /* (CFG_LOG_SUPPORTED != 0) */
+#define LOG_INFO_APP(...) do {} while(0)
+#define LOG_ERROR_APP(...) do {} while(0)
+#define LOG_WARNING_APP(...) do {} while(0)
+#define LOG_DEBUG_APP(...) do {} while(0)
+#endif /* (CFG_LOG_SUPPORTED != 0) */
+
+/* USER CODE BEGIN LOG_REGION_APP */
+/**
+ * Add inside this user section your defines to match the new verbose levels you
+ * created into Log_Verbose_Level_t.
+ * Example :
+ * #define LOG_CUSTOM_APP(...) Log_Module_Print( LOG_VERBOSE_CUSTOM, LOG_REGION_APP, __VA_ARGS__);
+ *
+ * You don't need to update all regions with your custom values.
+ * Do it accordingly to your needs. E.g you might not need LOG_VERBOSE_CUSTOM for a System region.
+ */
+
+/* USER CODE END LOG_REGION_APP */
+
+/* LOG_REGION_LINKLAYER */
+#if (CFG_LOG_SUPPORTED != 0)
+#define LOG_INFO_LINKLAYER(...) Log_Module_Print( LOG_VERBOSE_INFO, LOG_REGION_LINKLAYER, __VA_ARGS__)
+#define LOG_ERROR_LINKLAYER(...) Log_Module_Print( LOG_VERBOSE_ERROR, LOG_REGION_LINKLAYER, __VA_ARGS__)
+#define LOG_WARNING_LINKLAYER(...)Log_Module_Print( LOG_VERBOSE_WARNING, LOG_REGION_LINKLAYER, __VA_ARGS__)
+#define LOG_DEBUG_LINKLAYER(...) Log_Module_Print( LOG_VERBOSE_DEBUG, LOG_REGION_LINKLAYER, __VA_ARGS__)
+#else /* (CFG_LOG_SUPPORTED != 0) */
+#define LOG_INFO_LINKLAYER(...) do {} while(0)
+#define LOG_ERROR_LINKLAYER(...) do {} while(0)
+#define LOG_WARNING_LINKLAYER(...)do {} while(0)
+#define LOG_DEBUG_LINKLAYER(...) do {} while(0)
+#endif /* (CFG_LOG_SUPPORTED != 0) */
+
+/* USER CODE BEGIN LOG_REGION_LINKLAYER */
+/**
+ * Add inside this user section your defines to match the new verbose levels you
+ * created into Log_Verbose_Level_t.
+ * Example :
+ * #define LOG_CUSTOM_LINKLAYER(...) Log_Module_Print( LOG_VERBOSE_CUSTOM, LOG_REGION_LINKLAYER, __VA_ARGS__);
+ *
+ * You don't need to update all regions with your custom values.
+ * Do it accordingly to your needs. E.g you might not need LOG_VERBOSE_CUSTOM for a System region.
+ */
+
+/* USER CODE END LOG_REGION_LINKLAYER */
+
+/* USER CODE BEGIN APP_LOG_USER_DEFINES */
+/**
+ * Add inside this user section your defines to match the new regions you
+ * created into Log_Region_t.
+ * Example :
+#if (CFG_LOG_SUPPORTED != 0)
+#define LOG_INFO_CUSTOM(...) Log_Module_Print( LOG_VERBOSE_INFO, LOG_REGION_CUSTOM, __VA_ARGS__)
+#define LOG_ERROR_CUSTOM(...) Log_Module_Print( LOG_VERBOSE_ERROR, LOG_REGION_CUSTOM, __VA_ARGS__)
+#define LOG_WARNING_CUSTOM(...) Log_Module_Print( LOG_VERBOSE_WARNING, LOG_REGION_CUSTOM, __VA_ARGS__)
+#define LOG_DEBUG_CUSTOM(...) Log_Module_Print( LOG_VERBOSE_DEBUG, LOG_REGION_CUSTOM, __VA_ARGS__)
+#else
+#define LOG_INFO_CUSTOM(...) do {} while(0)
+#define LOG_ERROR_CUSTOM(...) do {} while(0)
+#define LOG_WARNING_CUSTOM(...) do {} while(0)
+#define LOG_DEBUG_CUSTOM(...) do {} while(0)
+#endif
+ */
+/* USER CODE END APP_LOG_USER_DEFINES */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LOG_MODULE_CONF_H */
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw.h b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw.h
index 76aaa83..905f103 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_aes.c b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_aes.c
index fef4fc1..9c3687f 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_aes.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_aes.c
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_if.h b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_if.h
index 5d9e268..671298d 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_if.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_if.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_pka.c b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_pka.c
index 395e1f2..0ea4982 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_pka.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_pka.c
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/pka_p256.c b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_pka_p256.c
similarity index 96%
rename from lib/stm32wba/BLE_TransparentMode/System/Interfaces/pka_p256.c
rename to lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_pka_p256.c
index 45023a8..64aa302 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Interfaces/pka_p256.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_pka_p256.c
@@ -1,14 +1,12 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
- * @file pka_p256.c
- * @author MCD Application Team
- * @brief This file is an optional part of the PKA driver for STM32WBA.
- * It is dedicated to the P256 elliptic curve.
+ * File Name :
+ * Description :
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.c
index e3a4bf1..026ea83 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.c
@@ -8,7 +8,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.h
index cef7b85..d7c5f9b 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.c
index 108dd38..d715973 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.c
@@ -8,7 +8,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.h
index 4f8b58b..7627573 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.c
index b860e70..1142b82 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.c
@@ -9,7 +9,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.h
index 8fa710c..cdef0cf 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.c
index e4598ca..82c8a92 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.c
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.h
index d983f42..880b8fc 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/debug_signals.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/debug_signals.h
index ecf1a45..36001b4 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/debug_signals.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/debug_signals.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/local_debug_tables.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/local_debug_tables.h
index 6a9bae3..85f5955 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/local_debug_tables.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/local_debug_tables.h
@@ -8,7 +8,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.c
index 599725a..7f54f39 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.c
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
@@ -36,6 +36,17 @@
}
+/* SCM HSE BEGIN */
+__weak void SCM_HSI_SwithSystemClock_Entry(void)
+{
+
+}
+
+__weak void SCM_HSI_SwithSystemClock_Exit(void)
+{
+
+}
+/* SCM HSE END */
/* Private typedef -----------------------------------------------------------*/
#define PLL_INPUTRANGE0_FREQMAX 8000000u /* 8 MHz is maximum frequency for VCO input range 0 */
@@ -175,14 +186,24 @@
/* Start HSI */
SCM_HSI_CLK_ON();
+ /* SCM HSE BEGIN */
+ /* Entry hook for HSI switch */
+ SCM_HSI_SwithSystemClock_Entry();
+ /* SCM HSE END */
+
/* Set HSI as SYSCLK */
LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_HSI);
while (LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_HSI);
/* Enable HSEON */
+ /* SCM HSE BEGIN */
LL_RCC_HSE_Enable();
while(LL_RCC_HSE_IsReady() == 0);
+ /* Exit hook for HSI switch */
+ SCM_HSI_SwithSystemClock_Exit();
+ /* SCM HSE END */
+
/* Set/Clear HSEPRE */
if(hse_pre == HSEPRE_DISABLE)
{
@@ -199,6 +220,16 @@
/* Disable HSI */
SCM_HSI_CLK_OFF();
+
+#if defined(STM32WBAXX_SI_CUT1_0)
+ /* STM32WBA5 Cut1.0 only: if the radio is not active is set to OFF by the hardware. */
+ if(isRadioActive() == SCM_RADIO_NOT_ACTIVE)
+ {
+ /* SCM HSE BEGIN */
+ SCM_HSE_Clear_SW_HSERDY();
+ /* SCM HSE END */
+ }
+#endif /* STM32WBAXX_SI_CUT1_0 */
}
OPTIMIZED static void SwitchHse16toHse32(void)
@@ -353,7 +384,6 @@
__HAL_RCC_RAMCFG_CLK_ENABLE();
/* Reading system core clock configuration from registers */
-
switch(LL_RCC_GetSysClkSource())
{
case LL_RCC_SYS_CLKSOURCE_STATUS_HSI:
@@ -415,6 +445,8 @@
break;
}
+
+ scm_system_clock_requests[SCM_USER_APP]= scm_system_clock_config.targeted_clock_freq;
}
/**
@@ -447,7 +479,7 @@
scm_setwaitstates(HSE32); /* There is no limitation when in Range1 */
/* As system switched to HSE, disable HSI */
- LL_RCC_HSI_Disable();
+ SCM_HSI_CLK_OFF();
/* Check if the clock system used PLL before low power mode entry */
if(scm_system_clock_config.targeted_clock_freq == SYS_PLL)
@@ -480,9 +512,7 @@
__HAL_RCC_ENABLE_IT(RCC_IT_HSERDY);
}
}
- #if (RT_DEBUG_GPIO_MODULE==1)
SYSTEM_DEBUG_SIGNAL_RESET(SCM_SETUP);
- #endif
}
/**
@@ -597,7 +627,7 @@
LL_RCC_SetAHB5Divider(LL_RCC_AHB5_DIVIDER_1);
- LL_RCC_HSI_Disable();
+ SCM_HSI_CLK_OFF();
/* Check if PLL is requested */
if(scm_system_clock_config.targeted_clock_freq == SYS_PLL)
@@ -767,9 +797,8 @@
/* Ensure time base clock coherency */
SystemCoreClockUpdate();
}
-#if (RT_DEBUG_GPIO_MODULE==1)
+
SYSTEM_DEBUG_SIGNAL_RESET(SCM_HSERDY_ISR);
-#endif
}
/**
@@ -847,6 +876,6 @@
}
#else /* CFG_SCM_SUPPORTED */
-void scm_pllrdy_isr(void){/* Intentionally enpty */}
-void scm_hserdy_isr(void){/* Intentionally enpty */}
+__weak void scm_pllrdy_isr(void){/* Intentionally enpty */}
+__weak void scm_hserdy_isr(void){/* Intentionally enpty */}
#endif /* CFG_SCM_SUPPORTED */
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.h
index e34fe1a..450e3a3 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
@@ -29,6 +29,7 @@
#include "stm32wbaxx_hal.h"
#include "stm32wbaxx_ll_pwr.h"
#include "stm32wbaxx_ll_rcc.h"
+#include "stm32wbaxx_ll_tim.h"
/* Exported types ------------------------------------------------------------*/
typedef enum {
@@ -55,6 +56,9 @@
SCM_USER_APP,
SCM_USER_LL_FW,
SCM_USER_LL_HW_RCO_CLBR,
+ /* USER CODE BEGIN SCM_USER */
+
+ /* USER CODE END SCM_USER */
TOTAL_CLIENT_NUM, /* To be at the end of the enum */
} scm_user_id_t;
@@ -65,7 +69,7 @@
} scm_pll_mode_t;
typedef enum {
- SCM_RADIO_NOT_ACTIVE,
+ SCM_RADIO_NOT_ACTIVE = 0,
SCM_RADIO_ACTIVE,
} scm_radio_state_t;
@@ -125,6 +129,13 @@
void scm_standbyexit(void);
/**
+ * @brief Return the state of the Radio.
+ * @param None
+ * @retval radio_state
+ */
+scm_radio_state_t isRadioActive(void);
+
+/**
* @brief Configure the PLL for switching fractional parameters on the fly.
* @param pll_frac Up to date fractional configuration.
* @retval None
@@ -193,6 +204,43 @@
*/
void scm_pllrdy_isr(void);
+/* SCM HSE BEGIN */
+/**
+ * @brief Getter for SW HSERDY flag
+ */
+uint8_t SCM_HSE_Get_SW_HSERDY(void);
+
+/**
+ * @brief Setter for SW HSERDY flag
+ */
+void SCM_HSE_Set_SW_HSERDY(void);
+
+/**
+ * @brief Clean of SW HSERDY flag
+ */
+void SCM_HSE_Clear_SW_HSERDY(void);
+
+/**
+ * @brief Polling function to wait until HSE is ready
+ */
+void SCM_HSE_WaitUntilReady(void);
+
+/**
+ * @brief Start the HSE stabilization timer
+ */
+void SCM_HSE_StartStabilizationTimer(void);
+
+/**
+ * @brief Stop the HSE stabilization timer
+ */
+void SCM_HSE_StopStabilizationTimer(void);
+
+/**
+ * @brief HSE stabilization timer interrupt handler
+ */
+void SCM_HSE_SW_HSERDY_isr(void);
+/* SCM HSE END */
+
/* Exported functions - To be implemented by the user ------------------------- */
/**
@@ -213,6 +261,17 @@
*/
extern void SCM_HSI_CLK_OFF(void);
+/* SCM HSE BEGIN */
+/**
+ * @brief Entry hook for HSI switch
+ */
+extern void SCM_HSI_SwithSystemClock_Entry(void);
+
+/**
+ * @brief Exit hook for HSI switch
+ */
+extern void SCM_HSI_SwithSystemClock_Exit(void);
+/* SCM HSE END */
#else /* CFG_SCM_SUPPORTED */
/* Unused empty functions */
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.c
index c67cc7d..22ffc94 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.c
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.c
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
@@ -21,8 +21,6 @@
/******************************************************************************
* Include Files
******************************************************************************/
-#include "utilities_common.h"
-
#include "stm_list.h"
/******************************************************************************
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.h
index 6cf9b9d..7e057f6 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/BLE_TransparentMode/System/Modules/utilities_common.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/utilities_common.h
index 85e42ad..dd8b11d 100644
--- a/lib/stm32wba/BLE_TransparentMode/System/Modules/utilities_common.h
+++ b/lib/stm32wba/BLE_TransparentMode/System/Modules/utilities_common.h
@@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
- * Copyright (c) 2022 STMicroelectronics.
+ * Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
diff --git a/lib/stm32wba/CMakeLists.txt b/lib/stm32wba/CMakeLists.txt
index eca5399..0f1faa9 100644
--- a/lib/stm32wba/CMakeLists.txt
+++ b/lib/stm32wba/CMakeLists.txt
@@ -33,7 +33,7 @@
zephyr_sources(BLE_TransparentMode/STM32_WPAN/Target/power_table.c)
zephyr_sources(BLE_TransparentMode/System/Config/Log/log_module.c)
zephyr_sources(BLE_TransparentMode/System/Interfaces/hw_pka.c)
-zephyr_sources(BLE_TransparentMode/System/Interfaces/pka_p256.c)
+zephyr_sources(BLE_TransparentMode/System/Interfaces/hw_pka_p256.c)
zephyr_sources(BLE_TransparentMode/System/Modules/scm.c)
zephyr_sources(BLE_TransparentMode/System/Modules/RTDebug/RTDebug.c)
zephyr_sources(STM32_WPAN/link_layer/ll_sys/src/ll_sys_cs.c)
diff --git a/lib/stm32wba/README.rst b/lib/stm32wba/README.rst
index aeb66b1..4a2981c 100644
--- a/lib/stm32wba/README.rst
+++ b/lib/stm32wba/README.rst
@@ -6,7 +6,7 @@
https://github.com/STMicroelectronics/STM32CubeWBA
Status:
- version v1.4.1
+ version v1.5.0
Purpose:
This library is used on STM32WBA series to port BLE controller library in
@@ -90,7 +90,7 @@
https://github.com/STMicroelectronics/STM32CubeWBA
Commit:
- 3820501e7e128592290861c9cc0f7189246bf00d
+ 06402010bb3e1eb4d49ee22cbe45d3408ce413c5
Maintained-by:
External
@@ -127,6 +127,17 @@
Impacted files: ll_sys_if.c
linklayer_plat.c
+ * LL sleep timer clock source set to LSE by default
+ Impacted files: ll_sys_if.c
+ linklayer_plat.c
+
+ * LL power table set not apllied
+ Impacted files: ll_sys_if.c
+
+ * SCM_HSE_WaitUntilReady Cube mechanism not used
+ Impacted files: scm.c
+ linklayer_plat.c
+
* Changes from official delivery:
- dos2unix applied
- trailing white spaces removed
diff --git a/lib/stm32wba/STM32_WPAN/ble/stack/include/auto/ble_types.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/auto/ble_types.h
index ca5f3a1..0e36dbe 100644
--- a/lib/stm32wba/STM32_WPAN/ble/stack/include/auto/ble_types.h
+++ b/lib/stm32wba/STM32_WPAN/ble/stack/include/auto/ble_types.h
@@ -507,7 +507,7 @@
uint8_t Length_Data;
/**
* Octets of advertising or scan response data formatted as defined in
- * Bluetooth spec. v.5.4 [Vol 3, Part C, 11].
+ * Bluetooth spec. [Vol 3, Part C, 11].
*/
const uint8_t* Data;
/**
@@ -2342,21 +2342,29 @@
typedef __PACKED_STRUCT
{
uint8_t Advertising_Handle;
- uint16_t Periodic_Adv_Interval_Min;
- uint16_t Periodic_Adv_Interval_Max;
- uint16_t Periodic_Adv_Properties;
- uint8_t Num_Subevents;
- uint8_t Subevent_Interval;
- uint8_t Response_Slot_Delay;
- uint8_t Response_Slot_Spacing;
- uint8_t Num_Response_Slots;
-} hci_le_set_periodic_advertising_parameters_v2_cp0;
+ uint16_t Adv_Event_Properties;
+ uint8_t Primary_Adv_Interval_Min[3];
+ uint8_t Primary_Adv_Interval_Max[3];
+ uint8_t Primary_Adv_Channel_Map;
+ uint8_t Own_Address_Type;
+ uint8_t Peer_Address_Type;
+ uint8_t Peer_Address[6];
+ uint8_t Adv_Filter_Policy;
+ uint8_t Adv_TX_Power;
+ uint8_t Primary_Adv_PHY;
+ uint8_t Secondary_Adv_Max_Skip;
+ uint8_t Secondary_Adv_PHY;
+ uint8_t Adv_SID;
+ uint8_t Scan_Req_Notification_Enable;
+ uint8_t Primary_Adv_PHY_Options;
+ uint8_t Secondary_Adv_PHY_Options;
+} hci_le_set_extended_advertising_parameters_v2_cp0;
typedef __PACKED_STRUCT
{
uint8_t Status;
- uint8_t Advertising_Handle;
-} hci_le_set_periodic_advertising_parameters_v2_rp0;
+ uint8_t Selected_TX_Power;
+} hci_le_set_extended_advertising_parameters_v2_rp0;
typedef __PACKED_STRUCT
{
@@ -3070,6 +3078,17 @@
typedef __PACKED_STRUCT
{
+ uint16_t Connection_Handle;
+ uint8_t Accept;
+} aci_gap_pairing_request_reply_cp0;
+
+typedef __PACKED_STRUCT
+{
+ uint8_t Status;
+} aci_gap_pairing_request_reply_rp0;
+
+typedef __PACKED_STRUCT
+{
uint8_t Adv_Mode;
uint8_t Advertising_Handle;
uint16_t Adv_Event_Properties;
@@ -3202,6 +3221,33 @@
typedef __PACKED_STRUCT
{
+ uint8_t Adv_Mode;
+ uint8_t Advertising_Handle;
+ uint16_t Adv_Event_Properties;
+ uint32_t Primary_Adv_Interval_Min;
+ uint32_t Primary_Adv_Interval_Max;
+ uint8_t Primary_Adv_Channel_Map;
+ uint8_t Own_Address_Type;
+ uint8_t Peer_Address_Type;
+ uint8_t Peer_Address[6];
+ uint8_t Adv_Filter_Policy;
+ uint8_t Adv_TX_Power;
+ uint8_t Primary_Adv_PHY;
+ uint8_t Secondary_Adv_Max_Skip;
+ uint8_t Secondary_Adv_PHY;
+ uint8_t Adv_SID;
+ uint8_t Scan_Req_Notification_Enable;
+ uint8_t Primary_Adv_PHY_Options;
+ uint8_t Secondary_Adv_PHY_Options;
+} aci_gap_adv_set_configuration_v2_cp0;
+
+typedef __PACKED_STRUCT
+{
+ uint8_t Status;
+} aci_gap_adv_set_configuration_v2_rp0;
+
+typedef __PACKED_STRUCT
+{
uint8_t Scan_Mode;
uint8_t Procedure;
uint8_t Own_Address_Type;
@@ -4381,13 +4427,6 @@
typedef __PACKED_STRUCT
{
- uint8_t RSSI;
- uint8_t Peer_Address_Type;
- uint8_t Peer_Address[6];
-} aci_hal_scan_req_report_event_rp0;
-
-typedef __PACKED_STRUCT
-{
uint8_t FW_Error_Type;
uint8_t Data_Length;
uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 2];
@@ -4446,6 +4485,13 @@
typedef __PACKED_STRUCT
{
uint16_t Connection_Handle;
+ uint8_t Bonded;
+ uint8_t Auth_Req;
+} aci_gap_pairing_request_event_rp0;
+
+typedef __PACKED_STRUCT
+{
+ uint16_t Connection_Handle;
uint16_t Result;
} aci_l2cap_connection_update_resp_event_rp0;
diff --git a/lib/stm32wba/STM32_WPAN/ble/stack/include/ble_defs.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/ble_defs.h
index 05abb1d..77f6fe8 100644
--- a/lib/stm32wba/STM32_WPAN/ble/stack/include/ble_defs.h
+++ b/lib/stm32wba/STM32_WPAN/ble/stack/include/ble_defs.h
@@ -157,8 +157,8 @@
/* Adv. lengths
*/
-#define MAX_ADV_DATA_LEN 31U
-#define BD_ADDR_SIZE 6U
+#define MAX_ADV_DATA_LEN 31
+#define BD_ADDR_SIZE 6
/* Privacy flag values
*/
@@ -379,8 +379,8 @@
/* Encryption key size
*/
-#define MIN_ENCRY_KEY_SIZE 7U
-#define MAX_ENCRY_KEY_SIZE 16U
+#define MIN_ENCRY_KEY_SIZE 7
+#define MAX_ENCRY_KEY_SIZE 16
/* Format
*/
@@ -461,6 +461,9 @@
#define CONFIG_DATA_SMP_MODE_OFFSET 0xB0U
#define CONFIG_DATA_LL_SCAN_CHAN_MAP_OFFSET 0xC0U
#define CONFIG_DATA_LL_BG_SCAN_MODE_OFFSET 0xC1U
+#define CONFIG_DATA_LL_RSSI_GOLDEN_RANGE_OFFSET 0xC2U
+#define CONFIG_DATA_LL_RPA_MODE_OFFSET 0xC3U
+#define CONFIG_DATA_LL_RX_ACL_CTRL_OFFSET 0xC4U
/* Length for configuration values (see ACI_HAL_WRITE_CONFIG_DATA)
*/
@@ -473,6 +476,9 @@
#define CONFIG_DATA_SMP_MODE_LEN 1
#define CONFIG_DATA_LL_SCAN_CHAN_MAP_LEN 1
#define CONFIG_DATA_LL_BG_SCAN_MODE_LEN 1
+#define CONFIG_DATA_LL_RSSI_GOLDEN_RANGE_LEN 2
+#define CONFIG_DATA_LL_RPA_MODE_LEN 1
+#define CONFIG_DATA_LL_RX_ACL_CTRL_LEN 2
/* ------------------------------------------------------------------------- */
diff --git a/lib/stm32wba/STM32_WPAN/ble/stack/include/bleplat.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/bleplat.h
index 1d4ffe3..51bb7c7 100644
--- a/lib/stm32wba/STM32_WPAN/ble/stack/include/bleplat.h
+++ b/lib/stm32wba/STM32_WPAN/ble/stack/include/bleplat.h
@@ -106,7 +106,8 @@
* @param offset: The offset from which the NVM starts the read an operation.
* @param data: The pointer to data read by the function
* @param size: The size of data to be read
- * @retval status (BLEPLAT_XX)
+ * @retval - if positive or zero, it is the number of copied bytes
+ * - if negative, it is an error status (BLEPLAT_XX)
*/
extern int BLEPLAT_NvmGet( uint8_t mode,
uint8_t type,
@@ -119,7 +120,9 @@
* @param offset: The offset from which the NVM starts the comparison
* @param data: The data to be compared with stored data in the NVM
* @param size: The size of data to be compared
- * @retval status (BLEPLAT_XX)
+ * @retval - if zero, the comparison was successful (BLEPLAT_OK)
+ * - if positive, the comparison failed
+ * - if negative, it is an error status (BLEPLAT_XX)
*/
extern int BLEPLAT_NvmCompare( uint16_t offset,
const uint8_t* data,
diff --git a/lib/stm32wba/STM32_WPAN/ble/stack/include/blestack.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/blestack.h
index b313a84..15143be 100644
--- a/lib/stm32wba/STM32_WPAN/ble/stack/include/blestack.h
+++ b/lib/stm32wba/STM32_WPAN/ble/stack/include/blestack.h
@@ -64,7 +64,6 @@
*/
typedef struct
{
-
/* Start address of the RAM buffer allocated for BLE stack library.
* It must be a 32bit aligned RAM area.
*/
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full/ll_fw_config.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full/ll_fw_config.h
index 7d9862b..9fb7900 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full/ll_fw_config.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full/ll_fw_config.h
@@ -70,11 +70,18 @@
#define SUPPORT_CHANNEL_CLASSIFICATION 1
#define SUPPORT_LE_ENHANCED_CONN_UPDATE 1
+
+#define SUPPORT_CSSA 1 /* Enable\Disable Coding Selection Scheme on Advertising Feature. Enable:1 - Disable:0 */
+#define SUPPORT_LE_PAWR_ADVERTISER_ROLE 0 /* Enable\Disable PAwR Advertiser role. Enable:1 - Disable:0 */
+#define SUPPORT_LE_PAWR_SYNC_ROLE 0 /* Enable\Disable PAwR Synchronizer role. Enable:1 - Disable:0 */
+
/* Non-standard features configurations */
#define NUM_OF_CTSM_EMNGR_HNDLS 1 /* Number of custom handles in event manager to be used for app specific needs */
#define SUPPORT_AUGMENTED_BLE_MODE 1 /* Enable\Disable Augmented BLE Support. Enable:1 - Disable:0 */
#define SUPPORT_PTA 1 /* Enable\Disable PTA Feature. Enable:1 - Disable:0 */
+#define CHECK_ANY_MISSED_EVENT_ON_DEEP_SLEEP_EXIT 1 /* Enable\Disable calling event scheduler handler function at the end of deep sleep exit*/
+
#define SUPPORT_AUTONOMOUS_POWER_CONTROL_REQ 1
#define LL_BASIC 0
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files/DWC_ble154combo.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files/DWC_ble154combo.h
index 8fe39eb..4a31ef1 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files/DWC_ble154combo.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files/DWC_ble154combo.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/_40nm_reg_files/DWC_ble154combo.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/_40nm_reg_files/DWC_ble154combo.h#3 $*/
/**
********************************************************************************
* @brief
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/bsp.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/bsp.h
index 1eef01f..c8464d8 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/bsp.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/bsp.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/bsp.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/bsp.h#2 $*/
/**
********************************************************************************
@@ -58,6 +58,11 @@
#ifndef EBQ_BUILD
#define EBQ_BUILD 0
#endif
+
+
+#ifndef USE_HCI_TRANSPORT
+#define USE_HCI_TRANSPORT 0
+#endif
/**
* @brief InterruptPriorities Enum.
* it is used to define the different ISR priorities in the controller
@@ -330,6 +335,12 @@
DBG_IO_PAWR_MULTIPLE_EVNTS_MISSED ,
DBG_IO_PAWR_CHM_UPDT_END ,
DBG_IO_LLHWC_CMN_INIT ,
+ DBG_IO_RADIO_SET_PENDING_TX_FULL ,
+ DBG_IO_RADIO_SET_PENDING_TX_CONTINUE ,
+ DBG_IO_RADIO_HANDLE_PENDING_TX ,
+ DBG_IO_RAL_AD_SET_MEASUREMENT_STATE ,
+ DBG_IO_PROFILE_CS_GEN ,
+ DBG_IO_PROFILE_CS_CHNL_SHUFFLING ,
Debug_GPIO_num
}Debug_GPIO_t;
@@ -401,7 +412,9 @@
*
* @retval None
*/
-extern void enable_irq(void);
+extern void enable_irq(
+ void
+);
/**
* @brief disable interrupt request function
* This function disable the MCU interrupt ,after calling this function the LL code must not be interrupted as it is in critical section
@@ -409,8 +422,9 @@
*
* @retval None
*/
-extern void disable_irq(void);
-
+extern void disable_irq(
+ void
+);
/**
* @brief this function is used to enable a specific ISR
* @param[in] isr_type that holds specific ISR to be enabled by this function
@@ -419,7 +433,7 @@
* BIT[2] for SYS_LOW_ISR
* @return None
*/
-void enable_specific_irq (uint8_t isr_type);
+void enable_specific_irq(uint8_t isr_type );
/**
@@ -430,8 +444,7 @@
* BIT[2] for SYS_LOW_ISR
* @return None
*/
-void disable_specific_irq (uint8_t isr_type);
-
+void disable_specific_irq(uint8_t isr_type );
/**
* @brief broad initialization Function
@@ -499,6 +512,28 @@
*/
void bsp_mcu_slp(void);
+
+/**
+ * @brief Clear GPIO pin output value
+ *
+ * @param enable: enable/disable flag
+ *
+ * @retval None.
+ */
+
+void bsp_gpio_clear(uint8_t gpio_num);
+
+
+/**
+ * @brief Set GPIO pin output value
+ *
+ * @param enable: enable/disable flag
+ *
+ * @retval None.
+ */
+void bsp_gpio_set(uint8_t gpio_num);
+
+
/**
* @brief Enables/Disables the bus clock.
*
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/common_types.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/common_types.h
index e1489a7..b7c9d67 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/common_types.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/common_types.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/common_types.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/common_types.h#3 $*/
/**
********************************************************************************
* @file common_types.h
@@ -107,12 +107,9 @@
#define SUPPORT_COEXISTENCE ((SUPPORT_BLE&&SUPPORT_MAC) || (SUPPORT_BLE&&SUPPORT_ANT))
#define SUPPORT_ANT_COEXISTENCE (SUPPORT_BLE&&SUPPORT_ANT)
/****************** User configuration **********************************/
+#define CS_TESTING TRUE
#define SUPPORT_GNRC_SCHDLR_IF (1)
-
-
-
-
/********************* Macros **********************************/
#ifndef SUCCESS
@@ -144,8 +141,7 @@
#define MEMCPY(ptr_destination, ptr_source, memory_size) ble_memcpy(ptr_destination, ptr_source, memory_size)
#define MEMCMP(ptr_destination, ptr_source, memory_size) ble_memcmp(ptr_destination, ptr_source, memory_size)
#define MEMMOV(ptr_destination, ptr_source, memory_size) ble_memmov(ptr_destination, ptr_source, memory_size)
-
-
+#define MEMCPY_N_BYTES(ptr_dest, ptr_src,no_bytes ,keep_endian) ble_memcpy_n_bytes(ptr_dest,ptr_src ,no_bytes ,keep_endian)
@@ -153,6 +149,24 @@
#define LL_LOCK() os_rcrsv_mutex_wait(g_ll_lock,0xffffffff)
#define LL_UNLOCK() os_rcrsv_mutex_release(g_ll_lock)
+#ifndef SUPPORT_ANT_DIV
+#define SUPPORT_ANT_DIV 0
+#endif
+
+#if SUPPORT_MAC
+#define RADIO_MAC_TX_DONE_EVENT_MAX 1
+#define RAL_SM_DONE_EVENT_MAX RADIO_TX_RX_PACKET_BLOCK_COUNT
+#define ED_TIMER_EVENT_MAX 1
+#define MAX_MLME_TIMER_EVENT MAC_NUMBER_OF_INSTANCE
+#define MAX_DIRECT_DATA_TX_EVENT MAC_NUMBER_OF_INSTANCE
+#define MAX_INDIRECT_DATA_TIMEOUT_EVENT MAX_NUMBER_OF_INDIRECT_DATA
+#define PRDC_CLBR_TMR_EVENT_MAX 1
+#define CSL_RCV_TMR_EVENT_MAX 1
+
+/* Size in octets of extended address used in security processing */
+#define EXT_ADDRESS_LENGTH 8
+#endif /* SUPPORT_MAC */
+
#if SUPPORT_MAC && SUPPORT_OPENTHREAD_1_2
/* compiler flag to control supporting of CSL transmitter , RADIO TX at specific time , 1 supported , 0 not supported */
#define CONFIG_MAC_CSL_TRANSMITTER_ENABLE 1
@@ -176,9 +190,6 @@
/* end of radio activity custom command flag */
#define END_OF_RADIO_ACTIVITY_REPORTING 1 /* Enable\Disable end of radio activity reporting feature. Enable:1 - Disable:0 */
-#if SUPPORT_MAC && SUPPORT_ANT_DIV
-#define EXT_ADDRESS_LENGTH 8
-#endif /* SUPPORT_MAC && SUPPORT_ANT_DIV */
/* Supported PHYs*/
typedef enum {
LE_NO_CHANGE = 0x00,
@@ -251,6 +262,7 @@
#endif
RAL_RATE_256K = 0x01
} ral_phy_rate_enum_t;
+
#endif /*SUPPORT_MAC*/
/**
* @enum extrnl_evnt_priority_e
@@ -339,6 +351,7 @@
#if(SUPPORT_CONNECTED_ISOCHRONOUS && (SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION))
uint8_t flsh_tmout_cnt; /* flush timeout counter */
uint8_t flsh_tmout_subevnt_cnt; /* flush timeout subevent number */
+ uint8_t rx_flsh_tmout_cnt_updtd; /* flush timeout count updated or not flag */
#endif //(SUPPORT_CONNECTED_ISOCHRONOUS && (SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION))
uint8_t status;
} iso_pdu_buff_hdr_st;
@@ -363,6 +376,17 @@
} iso_sdu_buf_hdr_st, *iso_sdu_buf_hdr_p;
#endif /* (SUPPORT_BRD_ISOCHRONOUS || SUPPORT_SYNC_ISOCHRONOUSs || (SUPPORT_CONNECTED_ISOCHRONOUS && ( SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION))) */
+#if SUPPORT_LE_PAWR_ADVERTISER_ROLE
+/**
+ * brief: PAWR host buffer struct
+ */
+typedef struct _pawr_host_buffer {
+ uint8_t buffer[257];
+ uint8_t total_data_lenth;
+ uint8_t number_of_reports;
+}pawr_host_buffer;
+#endif /* SUPPORT_LE_PAWR_ADVERTISER_ROLE */
+
/*
* @brief Transport layer event
@@ -372,14 +396,16 @@
HCI_ACL_DATA_PCKT = 0x02,
HCI_EVNT_PCKT = 0x04,
HCI_ISO_DATA_PCKT = 0x05,
+
+
#if (SUPPORT_MAC && SUPPORT_MAC_HCI_UART)
HCI_MAC_REQ = 0x0A,
HCI_MAC_CFM = 0x0B,
HCI_MAC_KEY_TBL_CFM = 0x0E,
#endif /* SUPPORT_MAC && SUPPORT_MAC_HCI_UART */
#if (SUPPORT_ANT_HCI_UART)
- HCI_ANT_REQ = 0x07,
- HCI_ANT_CFM = 0x08,
+ HCI_ANT_REQ = 0x10,
+ HCI_ANT_CFM = 0x11,
#endif /* SUPPORT_ANT_HCI_UART */
#if (SUPPORT_AUG_MAC_HCI_UART)
AUG_HCI_MAC_REQ = 0x0C,
@@ -426,11 +452,14 @@
*/
#define DEFAULT_PHY_CALIBRATION_PERIOD 10 /* Time period for PHY calibration = 10s */
-#ifdef PHY_40nm_3_00_a
+#if defined(PHY_40nm_3_00_a) || defined(PHY_40nm_3_40_a)
#define SUPPORT_MAC_PHY_CONT_TESTING_CMDS 1
#else
#define SUPPORT_MAC_PHY_CONT_TESTING_CMDS 0
-#endif /*end of PHY_40nm_3_00_a && SUPPORT_MAC_PHY_CONT_TESTING_CMDS */
+#if(SUPPORT_MAC_PHY_CONT_TESTING_CMDS)
+#error "SUPPORT_MAC_PHY_CONT_TESTING_CMDS must be enabled for PHY_40nm_3_00_a or PHY_40nm_3_40_a only"
+#endif/*end of (SUPPORT_MAC_PHY_CONT_TESTING_CMDS) */
+#endif /*end of defined(PHY_40nm_3_00_a) || defined(PHY_40nm_3_40_a) */
#ifndef EXTERNAL_CUSTOM_CMDS
#define EXTERNAL_CUSTOM_CMDS 0 /* Indicates that an external custom HCI commands module exists */
@@ -448,7 +477,40 @@
#define SUPPORT_HCI_EVENT_ONLY 0
#endif/* (!USE_HCI_TRANSPORT) && (SUPPORT_BLE) */
+#ifndef SUPPORT_HCI_EVENT_ONLY_TESTING
+#define SUPPORT_HCI_EVENT_ONLY_TESTING 0
+#endif /* SUPPORT_HCI_EVENT_ONLY_TESTING */
+
#define SUPPORT_HW_AUDIO_SYNC_SIGNAL 0
+#if SUPPORT_LE_PAWR_SYNC_ROLE
+#define SUPPORT_PAWR_CUSTOM_SYNC 1
+#else
+#define SUPPORT_PAWR_CUSTOM_SYNC 0
+#endif /* SUPPORT_LE_PAWR_SYNC_ROLE */
+
+#define PAWR_TESTING 0
+#ifndef SUPPORT_LE_PAWR_ADVERTISER_ROLE
+#define SUPPORT_LE_PAWR_ADVERTISER_ROLE 0
+#endif
+
+
+
#define SUPPORT_TIM_UPDT 1
+
+#define SUPPORT_RX_DTP_CONTROL 1 /* Enable\Disable ACL Rx data throughput feature */
+
+#ifndef SUPPORT_CUSTOM_ADV_SCAN_TESTING
+#define SUPPORT_CUSTOM_ADV_SCAN_TESTING 0
+#endif /* SUPPORT_CUSTOM_ADV_SCAN_TESTING */
+
+#ifndef SUPPORT_CHANNEL_SOUNDING
+#define SUPPORT_CHANNEL_SOUNDING 0
+#endif /* SUPPORT_CHANNEL_SOUNDING */
+
+#ifndef SUPPORT_EXT_FEATURE_SET
+#define SUPPORT_EXT_FEATURE_SET 0
+#endif /* SUPPORT_EXT_FEATURE_SET */
+
+
#endif /*COMMON_TYPES_H_*/
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/event_manager.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/event_manager.h
index 35cc2bd..30b52e9 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/event_manager.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/event_manager.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/event_manager.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/event_manager.h#2 $*/
/**
********************************************************************************
* @file event_manager.h
@@ -86,7 +86,7 @@
#endif /* SUPPORT_SYNC_ISOCHRONOUS */
#endif /* SUPPORT_BRD_ISOCHRONOUS || SUPPORT_SYNC_ISOCHRONOUS */
#endif /*SUPPORT_BLE*/
-#if ((SUPPORT_BLE)||(SUPPORT_MAC_HCI_UART)||(SUPPORT_ANT_HCI_UART) || (SUPPORT_AUG_MAC_HCI_UART))
+#if SUPPORT_BLE
HCI_HANDLER, /* handler for the HCI events; handling events from Host to HCI*/
#endif /*SUPPORT_BLE*/
#if SUPPORT_BLE
@@ -98,6 +98,9 @@
PRDC_SCAN_TIMEOUT_EVENT, /*handler for periodic scan sync timeout */
PRDC_SCAN_CANCEL_EVENT,
#endif /* SUPPORT_LE_PERIODIC_ADVERTISING */
+#if SUPPORT_LE_PAWR_ADVERTISER_ROLE
+ PAWR_SEND_FRST_REQ,
+#endif /* SUPPORT_LE_PAWR_ADVERTISER_ROLE */
#endif /* SUPPORT_LE_EXTENDED_ADVERTISING */
#endif /*SUPPORT_BLE*/
#if SUPPORT_COEXISTENCE
@@ -123,6 +126,12 @@
#if SUPPORT_EXPLCT_OBSERVER_ROLE || SUPPORT_MASTER_CONNECTION || SUPPORT_SYNC_ISOCHRONOUS || (SUPPORT_AOA_AOD && SUPPORT_SLAVE_CONNECTION)
ADV_REPORT_EVENT,
#endif /* SUPPORT_EXPLCT_OBSERVER_ROLE || SUPPORT_MASTER_CONNECTION || SUPPORT_SYNC_ISOCHRONOUS || (SUPPORT_AOA_AOD && SUPPORT_SLAVE_CONNECTION) */
+#if (SUPPORT_CONNECTED_ISOCHRONOUS && (SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION) || (SUPPORT_BRD_ISOCHRONOUS) || (SUPPORT_SYNC_ISOCHRONOUS))
+ HCI_SYNC_EVENT,
+#endif /* SYNC_EVENT */
+#if END_OF_RADIO_ACTIVITY_REPORTING
+ HCI_RADIO_ACTIVITY_EVENT,
+#endif /* END_OF_RADIO_ACTIVITY_REPORTING */
#endif /* SUPPORT_HCI_EVENT_ONLY */
#if ((SUPPORT_MAC) && (MAC_LAYER_BUILD))
MLME_TIMER_EVENT,
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/evnt_schdlr_gnrc_if.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/evnt_schdlr_gnrc_if.h
index ae5d7e9..76e6fd5 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/evnt_schdlr_gnrc_if.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/evnt_schdlr_gnrc_if.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/evnt_schdlr_gnrc_if.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/evnt_schdlr_gnrc_if.h#2 $*/
/**
********************************************************************************
* @file evnt_schdlr_gnrc_if.h
@@ -107,13 +107,11 @@
* no need to call @ref evnt_schdlr_gnrc_evnt_cmpltafter calling this callback as it is called from scheduler itself.
* */
uint32_t (*evnt_abortd_cbk)(void);
-#if (RADIO_CSMA)
/** Event coexistence error Callback Function. it will be called when @ref EXTRNL_GNRC event execution returned error.
* when @ref evnt_strtd_cbk of @ref EXTRNL_GNRC failed at execution for any reason, this callback will be called from event scheduler,
* it'll send the returned error to ral_tx_done to check if there will retransmission of failed packet or send the error to upper layers,
* */
void (*coex_error_cbk)(uint32_t error);
-#endif /*end of (RADIO_CSMA)*/
} extrnl_evnt_st_t;
#if(SUPPORT_COEXISTENCE || SUPPORT_GNRC_SCHDLR_IF)
/**
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/hci.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/hci.h
index 302121f..4afd816 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/hci.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/hci.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/hci.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/hci.h#2 $*/
/**
********************************************************************************
* @file hci.h
@@ -117,8 +117,6 @@
ble_stat_t hci_rcvd_iso_data_pckt_hndlr(
ble_buff_hdr_t *ptr_buff_hdr);
#endif /* ((SUPPORT_CONNECTED_ISOCHRONOUS && (SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION)) || SUPPORT_BRD_ISOCHRONOUS) */
-#endif /* !SUPPORT_HCI_EVENT_ONLY || SUPPORT_HCI_EVENT_ONLY_TESTING */
-
/**
* @brief Process the received HCI command packet from the host.
@@ -131,6 +129,8 @@
uint8_t *ptr_rcvd_pckt_strt,
uint16_t rcvd_pckt_len);
+#endif /* !SUPPORT_HCI_EVENT_ONLY || SUPPORT_HCI_EVENT_ONLY_TESTING */
+
/**
* @brief allocate a message structure to be sent to the HCI layer through event manager.
*
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf.h
index 86c36c0..d64ef54 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/ll_intf.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/ll_intf.h#3 $*/
/**
********************************************************************************
* @file ll_intf_cmds.h
@@ -49,11 +49,15 @@
*/
typedef uint32_t ble_stat_t;
+
+
#ifndef ADDRESS_SIZE
#define ADDRESS_SIZE 6
#endif /* ADDRESS_SIZE */
#define LE_FEATURES_BYTES_NO 8
+
+
#define ISO_CODEC_ID_SIZE 5
/*!
@@ -87,6 +91,14 @@
#define CHANNEL_CLASSIFICATION_REPORTING_TIMING_PARAM_MIN 5
#define CHANNEL_CLASSIFICATION_REPORTING_TIMING_PARAM_MAX 150
+
+
+/* Maximum number of supported sleep clock accuracy */
+#define MAXIMUM_SLP_CLK_ACCURACY 1
+#if (SUPPORT_LE_PAWR_ADVERTISER_ROLE)||(SUPPORT_LE_PAWR_SYNC_ROLE)
+#define NUM_PAWR_SUBEVENTS_MAX 0x80
+#endif /*(SUPPORT_LE_PAWR_ADVERTISER_ROLE)||(SUPPORT_LE_PAWR_SYNC_ROLE)*/
+
extern const struct hci_dispatch_tbl* p_dis_tbl;
/*================================= Enumerations =====================================*/
@@ -234,6 +246,12 @@
uint8_t advertiser_address_type; /* Advertiser address type */
uint8_t advertiser_phy; /* Advertiser PHY */
uint8_t advertiser_clock_accuracy; /* Clock accuracy used by advertise */
+#if SUPPORT_LE_PAWR_SYNC_ROLE
+ uint8_t num_subevnts; /* Number of subevents */
+ uint8_t subevnt_intrvl; /* Interval between subevents */
+ uint8_t rsp_slot_delay; /* Time bet the adv packet in a subevent and the first response slot */
+ uint8_t rsp_slot_spacing; /* Time between response slots */
+#endif /*SUPPORT_LE_PAWR_SYNC_ROLE*/
} ble_intf_prdc_adv_sync_transfer_report_st ;
#endif /* SUPPORT_PERIODIC_SYNC_TRANSFER */
@@ -497,6 +515,7 @@
}le_subrate_change_evnt_st;
#endif /* SUPPORT_LE_ENHANCED_CONN_UPDATE */
+
typedef enum _enum_ext_create_conn_verison
{
EXT_CREATE_CONN_VER_1,
@@ -529,6 +548,11 @@
{
st_ble_intf_ext_create_conn* ptr_ext_create_conn; /* ptr to extended create connection parameters */
uint8_t* ptr_peer_address; /* ptr to the Peer address*/
+#if SUPPORT_LE_PAWR_ADVERTISER_ROLE
+ enum_ext_create_conn_ver ext_create_conn_ver; /* to Indicate which hci command version sent from the host*/
+ uint8_t adv_hndl;/* Advertising_Handle identifying the periodic advertising train */
+ uint8_t subevent;/* Subevent where the connection request is to be sent */
+#endif /*SUPPORT_LE_PAWR_ADVERTISER_ROLE */
uint8_t initiator_filter_policy; /* used to determine whether the Filter Accept List is used */
uint8_t own_address_type; /* indicates the type of address used in the connection request packets */
uint8_t peer_address_type; /* indicates the type of address used in the connectable advertisement sent by the peer */
@@ -540,6 +564,14 @@
uint16_t prdc_adv_intrvl_min;/* Minimum advertising interval for periodic advertising */
uint16_t prdc_adv_intrvl_max;/* Maximum advertising interval for periodic advertising */
uint16_t prdc_adv_prpts; /* Include TxPower in the advertising PDU */
+#if SUPPORT_LE_PAWR_ADVERTISER_ROLE
+ enum_prdc_adv_param_ver prdc_adv_param_ver; /* to Indicate which hci command version sent from the host*/
+ uint8_t num_subevents; /* identifiers the number of subevents that shall be transmitted for each periodic advertising event*/
+ uint8_t subevent_intrvl; /* time between the subevents of PAwR*/
+ uint8_t res_slot_delay; /* Time bet the adv packet in a subevent and the first response slot */
+ uint8_t res_slot_spacing; /* Time between response slots */
+ uint8_t num_res_slots; /* Number of subevent response slots */
+#endif /*SUPPORT_LE_PAWR_ADVERTISER_ROLE */
}ble_set_prdc_adv_param_st;
typedef struct _ble_enhanced_conn_cmplt_evnt_st
@@ -553,6 +585,10 @@
uint16_t conn_intrvl;/*Connection interval used on this connection.*/
uint16_t slave_ltncy;/*Slave latency for the connection in number of connection events.*/
uint16_t suprvsn_tout;/*Supervision timeout for the connection requested by the remote device.*/
+#if (SUPPORT_LE_PAWR_ADVERTISER_ROLE)||(SUPPORT_LE_PAWR_SYNC_ROLE)
+ uint16_t sync_handle;/*Used to identify the periodic advertising train*/
+ uint8_t adv_handle;/*Used to identify an advertising set*/
+#endif /*(SUPPORT_LE_PAWR_ADVERTISER_ROLE)||(SUPPORT_LE_PAWR_SYNC_ROLE)*/
uint8_t peer_addr_type;/*Peer address type*/
uint8_t master_clk_accurcy;/*Master clock acuracy.*/
}ble_enhanced_conn_cmplt_evnt_st;
@@ -567,13 +603,63 @@
uint8_t adv_addrs_type;/*address type of the advertiser */
uint8_t adv_phy; /*advertiser PHY */
uint8_t adv_clk_accuracy;/*Advertiser Clock Accuracy*/
+#if SUPPORT_LE_PAWR_SYNC_ROLE
+ uint8_t num_subevnts; /* Number of subevents */
+ uint8_t subevnt_intrvl; /* Interval between subevents */
+ uint8_t rsp_slot_delay; /* Time bet the adv packet in a subevent and the first response slot */
+ uint8_t rsp_slot_spacing; /* Time between response slots */
+#endif /*SUPPORT_LE_PAWR_SYNC_ROLE*/
}ble_prdc_adv_sync_estblshd_st;
/*============ PAWR ============ */
+#if SUPPORT_LE_PAWR_SYNC_ROLE
+/**
+ * @brief This structure contains the parameters used by the Host to set the data for a response slot in a specific subevent of the PAwR
+ */
+typedef struct _ble_set_prdc_adv_rsp_data_st
+{
+ uint8_t *ptr_rsp_data; /* ptr to the response data */
+ uint16_t req_evnt; /* The event in which the periodic advertising packet that the Host is responding to */
+ uint8_t req_subevnt; /*The subevent for the periodic advertising packet that the Host is responding to */
+ uint8_t rsp_subevnt;/* identifies the subevent that the response shall be sent in. */
+ uint8_t rsp_slot;/* identifies the response slot in which this response data is to be transmitted */
+ uint8_t rsp_data_len;/* The number of octets in the Response_Data parameter.*/
+
+}ble_set_prdc_adv_rsp_data_st;
+
+/**
+ * @brief This structure contains the parameters used to instruct the Controller to synchronize with a subset of the subevents within a PAwR train
+ */
+typedef struct _ble_set_prdc_sync_subevnt_st
+{
+ uint8_t *ptr_subevnts;/* The subevent to synchronize with */
+ uint16_t prdc_adv_prprts; /* Include TxPower in the advertising PDU */
+ uint8_t num_subevnts; /* Number of subevents */
+}ble_set_prdc_sync_subevnt_st;
+#endif/*SUPPORT_LE_PAWR_SYNC_ROLE*/
+
+#if SUPPORT_LE_PAWR_ADVERTISER_ROLE
+/**
+ * @brief This structure contains the parameters used by the Host to set the data for one or more subevents of PAwR.
+ */
+typedef struct _ble_set_prdc_adv_subevnt_data_st
+{
+ uint8_t *ptr_data; /* ptr to the advertising data */
+ uint8_t subevnt; /* The subevent index of the data contained in this command */
+ uint8_t rsp_slot_start; /* The first response slots to be used in this subevent */
+ uint8_t rsp_slot_count;/* The number of response slots to be used */
+ uint8_t subevnt_data_len;/* The number of octets in the Subevent_Data parameter */
+
+}ble_set_prdc_adv_subevnt_data_st;
+#endif/*SUPPORT_LE_PAWR_ADVERTISER_ROLE*/
typedef struct _ble_prdc_adv_rprt_st
{
ble_buff_hdr_t *ptr_data;/*ptr to Data received from a Periodic Advertising packet.*/
+#if SUPPORT_LE_PAWR_SYNC_ROLE
+ uint16_t prdc_evnt_counter;/*The value of paEventCounter for the reported periodic advertising packet*/
+ uint8_t subevnt;/*indicates the PAWR subevent that the periodic advertising packet was received in*/
+#endif /*SUPPORT_LE_PAWR_SYNC_ROLE*/
uint8_t tx_power;/*Tx Power information*/
int8_t rssi;/*RSSI value*/
uint8_t cte_type;/* indicates the type of Constant Tone Extension in the periodic advertising packets*/
@@ -581,6 +667,18 @@
uint8_t data_length;/*Length of the Data field*/
}ble_prdc_adv_rprt_st;
+#if SUPPORT_LE_PAWR_ADVERTISER_ROLE
+typedef struct _ble_prdc_adv_rsp_rprt_st
+{
+ uint8_t tx_power;/*Tx Power information*/
+ int8_t rssi;/*RSSI value*/
+ uint8_t cte_type;/* indicates the type of Constant Tone Extension in the periodic advertising packets*/
+ uint8_t response_slot;/*The response slot the data was received in*/
+ uint8_t data_status;/*Data status*/
+ uint8_t data_length;/*Length of the Data field*/
+ uint8_t *ptr_data;/*ptr to Data received from a Periodic Advertising response packet.*/
+}ble_prdc_adv_rsp_rprt_st;
+#endif/*SUPPORT_LE_PAWR_ADVERTISER_ROLE*/
/* HCI Commands Parameters Structures */
#if (SUPPORT_AOA_AOD)
@@ -848,6 +946,19 @@
uint16_t max_ce_length; /*Range: 0x0000 0xFFFF, Time = N * 0.625 msec.*/
} le_rmt_conn_param_req_rply_cmd_st;
+
+#if SUPPORT_RX_DTP_CONTROL
+
+/**
+ * @brief Control RX Data Throughput parameters
+ */
+typedef struct _ctrl_rx_dtp_st {
+ uint8_t pckt_count; /* holds number of packets to be expected with rx_octets size */
+ uint8_t rx_octets; /* holds number of octets to be received */
+} ctrl_rx_dtp_st;
+
+#endif /* SUPPORT_RX_DTP_CONTROL */
+
/**
* @brief HCI Dispatch table containing callback event functions
*/
@@ -992,7 +1103,7 @@
* @param conn_handle_id : [in] connection handle of the connection for which the LE Read Remote Used Features command is applied.
* @param le_features : [in] Bit Mask List of used LE features.
*/
- void (*ll_intf_le_read_remote_used_features_cmplt_evnt)(
+ void (*ll_intf_le_read_remote_used_page_0_features_cmplt_evnt)(
ble_stat_t status, uint16_t conn_handle_id,
uint8_t le_features[LE_FEATURES_BYTES_NO]);
@@ -1426,6 +1537,74 @@
void (*ll_intf_end_of_activity_evnt)(uint16_t curr_state, uint16_t nxt_state);
#endif /* END_OF_RADIO_ACTIVITY_REPORTING */
+#if (SUPPORT_LE_PAWR_ADVERTISER_ROLE)||(SUPPORT_LE_PAWR_SYNC_ROLE)
+/**
+ * @brief Used to inform the host that a new connection has been created(if both the LE Enhanced Connection Complete event and
+ * LE Connection Complete event are unmasked, only the LE Enhanced Connection Complete event is generated is sent when
+ * a new connection has been completed).
+ *
+ * @param ptr_enhanced_conn_cmplt_evnt* : [in] Pointer to struct contains the enhanced conn complt event params.
+ *
+ * @retval None.
+ */
+ void (*ll_intf_le_enhanced_conn_cmplt_evnt_v2)(
+ ble_enhanced_conn_cmplt_evnt_st* ptr_enhanced_conn_cmplt_evnt);
+#endif /*(SUPPORT_LE_PAWR_ADVERTISER_ROLE)||(SUPPORT_LE_PAWR_SYNC_ROLE)*/
+#if SUPPORT_LE_PAWR_SYNC_ROLE
+/**
+ * @brief indicates that the Controller has received the first periodic advertising packet from an advertiser
+ * after the LE_Periodic_Advertising_Create_Sync Command has been sent to the Controller.
+ *
+ * @param ptr_prdc_adv_sync_estblshd* : [in] ptr to struct contains the established periodic adv sync parameters.
+ *
+ * @retval None.
+ */
+ void(*ll_intf_le_periodic_adv_sync_estblshd_v2)(
+ ble_prdc_adv_sync_estblshd_st* ptr_prdc_adv_sync_estblshd);
+/**
+ * @brief indicates that the Controller has received a Periodic Advertising packet
+ *
+ * @param sync_handle :[in] Sync_Handle identifying the periodic advertising train.
+ * @param ptr_prdc_adv_rprt_params* :[in] ptr to struct contains the periodic adv packet to be reported.
+ *
+ * @retval None.
+ */
+ void(*ll_intf_le_periodic_adv_report_v2)(uint16_t sync_handle,
+ ble_prdc_adv_rprt_st* ptr_prdc_adv_rprt_params);
+/**
+ * @brief used by the Controller to report that it has received periodic advertising synchronization
+ * information from the device referred to by the Connection_Handle parameter and either successfully
+ * synchronized to the periodic advertising events or timed out while attempting to synchronize
+ *
+ * @param ptr_prdc_sync_transfer_report : [in] Pointer to periodic advertising sync transfer report
+ */
+ void(*ll_intf_le_periodic_adv_sync_transfer_recieved_v2)(
+ ble_intf_prdc_adv_sync_transfer_report_st * ptr_prdc_sync_transfer_report);
+#endif/*SUPPORT_LE_PAWR_SYNC_ROLE*/
+#if SUPPORT_LE_PAWR_ADVERTISER_ROLE
+/**
+ * @brief used to allow the Controller to indicate that it is ready to transmit
+ * one or more subevents and is requesting the advertising data for these subevents.
+ *
+ * @param advertising_handle : [in] Used to identify a periodic advertising train.
+ * @param subevent_start : [in] The first subevent that data is requested for.
+ * @param subevent_data_count: [in] The number of subevents that data is requested for.
+ *
+ * @retval None.
+ */
+ void (*ll_intf_le_periodic_subevnt_data_req_evnt)(uint8_t advertising_handle, uint8_t subevent_start, uint8_t subevent_data_count);
+/**
+ * @brief indicates that one or more Bluetooth devices have responded to a periodic
+ * advertising subevent during a PAwR train
+ *
+ * @param[in] pointer to the start of the formatted report needed to be sent to the host
+ * @retval None.
+ */
+ void (*ll_intf_le_periodic_adv_rsp_report_evnt)(pawr_host_buffer* evnt_pckt_p);
+#endif/*SUPPORT_LE_PAWR_ADVERTISER_ROLE*/
+
+
+
};
#if (SUPPORT_CONNECTED_ISOCHRONOUS &&( SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION))
@@ -1644,6 +1823,8 @@
#if (SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION)
le_set_conn_tx_pwr_lvl_cmd_st le_set_conn_tx_pwr_lvl_cmd;
#endif /* SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION */
+
+
} hci_cmds_params_un;
@@ -1663,6 +1844,7 @@
#endif /* SUPPORT_LE_ENHANCED_CONN_UPDATE */
+
/* Exported Definition ------------------------------------------------------*/
#if ((SUPPORT_CONNECTED_ISOCHRONOUS && (SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION)) || (SUPPORT_SYNC_ISOCHRONOUS))
typedef void (*vendor_specific_from_cntrl_to_host_cbk)(const iso_sdu_buf_hdr_p, const uint16_t conn_hndl);
@@ -1683,6 +1865,7 @@
typedef void (*hst_big_missed_evnt_cbk)(uint8_t big_hndl, uint8_t missed_intrvs, uint32_t nxt_anchor_pnt);
#endif /* (SUPPORT_BRD_ISOCHRONOUS || SUPPORT_SYNC_ISOCHRONOUS) */
+
/*##### Device Setup HCI Commands' Group #####*/
/** @ingroup device_setup
* @{
@@ -1776,7 +1959,7 @@
*
* @retval ble_stat_t : Command status to be sent to the Host.
*/
-ble_stat_t ll_intf_read_local_supported_features(uint8_t lmp_features[8]);
+ble_stat_t ll_intf_read_local_supported_features_page_0(uint8_t lmp_features[8]);
/**
* @brief Read the list of the supported LE features for the Controller .
@@ -1785,7 +1968,7 @@
*
* @retval ble_stat_t : Command status to be sent to the Host.
*/
-ble_stat_t ll_intf_le_read_local_supported_features(
+ble_stat_t ll_intf_le_read_local_supported_features_page_0(
uint8_t le_features[LE_FEATURES_BYTES_NO]);
/**
@@ -2453,7 +2636,7 @@
*
* @retval ble_stat_t : Command status to be sent to the Host.
*/
-ble_stat_t ll_intf_le_read_remote_used_features(uint16_t conn_handle_id);
+ble_stat_t ll_intf_le_read_remote_features_page_0(uint16_t conn_handle_id);
/**@}
*/
@@ -2606,6 +2789,9 @@
uint8_t *ptr_peer_addrs, uint8_t adv_filter_policy, int8_t adv_tx_power,
uint8_t prim_adv_phy, uint8_t sec_adv_max_skip, uint8_t sec_adv_phy,
uint8_t adv_sid, uint8_t scan_req_notfy,
+#if SUPPORT_CSSA
+ uint8_t prim_phy_options,uint8_t sec_phy_options,
+#endif /* SUPPORT_CSSA */
int8_t *selected_tx_pwr);
/*================ LE Set Extended Advertising Data Command =====================*/
@@ -3765,14 +3951,14 @@
/**
* @brief Used for setting the custom golden range RSSI
*
- * @param upper_limit : [in]
- * @param lower_limit : [in]
+ * @param lower_limit : [in] golden range RSSI lower limit in dBm
+ * @param upper_limit : [in] golden range RSSI upper limit in dBm
*
* @retval Success
*/
ble_stat_t ll_intf_set_cstm_rssi_golden_range(int lower_limit , int upper_limit);
#endif /* (SUPPORT_LE_POWER_CONTROL) */
-#if (SUPPORT_LE_ENHANCED_CONN_UPDATE || SUPPORT_CONNECTED_ISOCHRONOUS || SUPPORT_CSSA)
+#if (((SUPPORT_LE_ENHANCED_CONN_UPDATE || SUPPORT_CONNECTED_ISOCHRONOUS || SUPPORT_CHANNEL_SOUNDING)&&( SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION)) || SUPPORT_CSSA)
/** @}
*/
@@ -3789,7 +3975,7 @@
* @retval ble_stat_t : Command status.
*/
ble_stat_t ll_intf_le_set_host_feature(uint8_t bit_num, uint8_t bit_value);
-#endif /* (SUPPORT_LE_ENHANCED_CONN_UPDATE || SUPPORT_CONNECTED_ISOCHRONOUS || SUPPORT_CSSA) */
+#endif /* (((SUPPORT_LE_ENHANCED_CONN_UPDATE || SUPPORT_CONNECTED_ISOCHRONOUS || SUPPORT_CHANNEL_SOUNDING)&&( SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION)) || SUPPORT_CSSA) */
#if((SUPPORT_CONNECTED_ISOCHRONOUS &&( SUPPORT_MASTER_CONNECTION || SUPPORT_SLAVE_CONNECTION)) \
||(SUPPORT_BRD_ISOCHRONOUS || SUPPORT_SYNC_ISOCHRONOUS))
@@ -4278,6 +4464,26 @@
* @{
*/
+#if SUPPORT_LE_PAWR_ADVERTISER_ROLE
+/**
+ * @brief this API set the max size for pawr queue
+ * @param[in] max_size the max size for the PAWR queue length this param shall be an even number
+ */
+ble_stat_t ll_intf_set_pawr_queue_max_size(uint8_t max_size );
+#endif /* SUPPORT_LE_PAWR_ADVERTISER_ROLE */
+
+#if SUPPORT_PAWR_CUSTOM_SYNC
+/**
+ * @brief this API set the initialization sync bit map for a periodic scan context
+ * @param[in] sync_bit_map the initialization value of sync_bit_map sent by host. At least one sub-event shall be periodic sync
+ */
+ble_stat_t ll_intf_set_pawr_sync_bit_map(uint8_t* sync_bit_map );
+#endif /* SUPPORT_PAWR_CUSTOM_SYNC */
+
+#if PAWR_TESTING
+ble_stat_t ll_intf_parasite_rsp_enable(uint16_t sync_handle,uint8_t enable, uint8_t rsp_slot, uint8_t data_length);
+#endif /* PAWR_TESTING */
+
/** @}
*/
@@ -4285,6 +4491,57 @@
/** @ingroup pawr
* @{
*/
+#if SUPPORT_LE_PAWR_SYNC_ROLE
+/**
+ * @brief Used to set the data for a response slot in a specific sub-event of the PAwR
+ *
+ * @param[in] sync_handle identifying the PAwR train.
+ * @param[in] ptr_prdc_adv_rsp_param ptr to struct contains the response data params.
+ *
+ * @retval Status(0:SUCCESS, 0xXX:ERROR_CODE).
+ *
+ */
+ble_stat_t ll_intf_le_set_prdc_adv_rsp_data(uint16_t sync_handle ,ble_set_prdc_adv_rsp_data_st* ptr_prdc_adv_rsp_data_param);
+/**
+ * @brief Used to instruct the Controller to synchronize with a subset of the sub-events within a PAwR train
+ *
+ * @param[in] sync_handle identifying the PAwR train.
+ * @param[in] ptr_prdc_adv_synch_params ptr to struct contains the Periodic Sync sub-event parameters.
+ *
+ * @retval Status(0:SUCCESS, 0xXX:ERROR_CODE).
+ */
+ble_stat_t ll_intf_le_set_prdc_adv_sync_subevnt(uint16_t sync_handle ,ble_set_prdc_sync_subevnt_st* ptr_prdc_adv_synch_params);
+#endif/*SUPPORT_LE_PAWR_SYNC_ROLE*/
+
+#if SUPPORT_LE_PAWR_ADVERTISER_ROLE
+/**
+ * @brief Used by the Host to set the data for one or more sub-events of PAwR
+ * in reply to an HCI_LE_Periodic_Advertising_Subevent_Data_Request event.
+ *
+ * @param[in] advertising_handle Used to identify a periodic advertising train.
+ * @param[in] num_subevents Number of sub-event data in the command.
+ * @param[in] ptr_prdc_adv_subevnt_data ptr to struct contains the periodic adv subevent data.
+ *
+ * @retval Status(0:SUCCESS, 0xXX:ERROR_CODE).
+ */
+ble_stat_t ll_intf_le_set_prdc_adv_subevnt_data(
+ uint8_t advertising_handle,
+ uint8_t num_subevents ,
+ ble_set_prdc_adv_subevnt_data_st* ptr_prdc_adv_subevnt_data);
+#endif/*SUPPORT_LE_PAWR_ADVERTISER_ROLE*/
+
+/**
+ * @}
+ */
+
+/** @ingroup 6.0_Features
+ * @{
+ */
+
+
+
+
+
/**
* @}
@@ -4314,7 +4571,9 @@
uint8_t allow_acl_data: 1;
uint8_t allow_iso_data: 1;
uint8_t allow_reports: 1;
- uint8_t rfu: 4;
+ uint8_t allow_sync_event: 1;
+ uint8_t allow_eoa_event: 1;
+ uint8_t rfu: 2;
} bitfield;
} change_state_options_t;
/**
@@ -4448,6 +4707,29 @@
*/
void ll_intf_config_schdling_time(Evnt_timing_t * p_evnt_timing);
#endif /* SUPPORT_TIM_UPDT */
+
+
+
+
+#if SUPPORT_RX_DTP_CONTROL
+
+/**
+ * @brief Set the rx data length throughput parameters.
+ * the first rx_pckt_count will have a payload size of rx_pckt_len and the remaining rx slot (if any) will have a payload size of
+ * connEffectiveMaxRxOctets of the current connection, if rx_pckt_count is set to a value greater than the PACKETS_PER_EVENT_MAX,
+ * the PACKETS_PER_EVENT_MAX will be used, if rx_pckt_len is set to a value greater than the connEffectiveMaxRxOctets of the
+ * current connection, the connEffectiveMaxRxOctets will be used.
+ *
+ * @param rx_pckt_count : [in] number of rx packets expected to be received with a payload size of rx_pckt_len octets,
+ * the remaining rx slots will be calculated with the connEffectiveMaxRxOctets of the current connection.
+ * @param rx_pckt_len : [in] length of rx packets expected to be received on the first rx_pckt_count slots.
+ *
+ * @retval ble_stat_t: Command status to be sent to the Host.
+ */
+ble_stat_t ll_intf_ctrl_rx_dtp(uint8_t rx_pckt_count, uint8_t rx_pckt_len);
+
+#endif /* SUPPORT_RX_DTP_CONTROL */
+
/**@}
*/
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf_cmn.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf_cmn.h
index 540dce6..67a3a94 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf_cmn.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf_cmn.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/ll_intf_cmn.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/ll_intf_cmn.h#1 $*/
/**
********************************************************************************
* @file ll_intf_cmn.h
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/mem_intf.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/mem_intf.h
index ddf9b5c..ee88811 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/mem_intf.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/mem_intf.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/mem_intf.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/mem_intf.h#1 $*/
/**
********************************************************************************
* @file mem_intf.h
@@ -103,6 +103,16 @@
const void *ptr_src,
uint16_t n);
/**
+ * @brief Coping n bytes of memory from position to another.
+ * @param destination : pointer to the destination array where the content is to be copied.
+ * @param source : pointer to the source of data to be copied.
+ * @param num_bytes : the number of bytes to be copied.
+ * @param keep_endian : flag to keep or change the endian
+ * @retval pointer to destination.
+ */
+void ble_memcpy_n_bytes(uint8_t *destination,
+ const uint8_t *source, uint8_t num_bytes, uint8_t keep_endian);
+/**
* @}
*/
#endif /* MEM_INTF_H */
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/os_wrapper.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/os_wrapper.h
index 89fe0ae..8d6538f 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/os_wrapper.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/os_wrapper.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/os_wrapper.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/os_wrapper.h#1 $*/
/**
********************************************************************************
* @file os_wrapper.h
@@ -40,6 +40,10 @@
#define INCLUDE_OS_WRAPPER_H_
#include "stdint.h"
+/********************* Macros **********************************/
+#define POOL_BLOCK_SIZE 16
+#define POOL_TOTAL_BLOCKS_SIZE 10
+#define POOL_INDEX_SIZE 6
/* Exported Defines -----------------------------------------------------------*/
@@ -164,7 +168,9 @@
* @brief Memory Pool Block Structure
*/
typedef struct {
- uint32_t blck_size; /* block size */
+ uint32_t blck_size : POOL_BLOCK_SIZE; /* block size */
+ uint32_t total_blcks : POOL_TOTAL_BLOCKS_SIZE; /* total number of blocks */
+ uint32_t indx : POOL_INDEX_SIZE; /* pool index (sub-pool number) */
mem_blck_t* next_blck; /* next free block */
} os_pool_def_t;
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/power_table.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/power_table.h
index e032f7f..f5865ce 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/power_table.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/power_table.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/power_table.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/power_table.h#1 $*/
/**
******************************************************************************
* @file power_table.h
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/pta.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/pta.h
index afbed1c..fd1f53e 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/pta.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/pta.h
@@ -1,4 +1,4 @@
-/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-LCA00/firmware/public_inc/pta.h#1 $*/
+/*$Id: //dwh/bluetooth/DWC_ble154combo/firmware/rel/1.32a-lca02/firmware/public_inc/pta.h#1 $*/
/**
******************************************************************************
* @file pta.h
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/linklayer_plat.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/linklayer_plat.h
index e0cf6f6..5059f0f 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/linklayer_plat.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/linklayer_plat.h
@@ -1,6 +1,6 @@
/**
******************************************************************************
- * @file hw_radio.h
+ * @file linklayer_plat.h
* @author MCD Application Team
* @brief Header for linklayer_plat.c interface module
******************************************************************************
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/ll_sys.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/ll_sys.h
index 4418212..819422a 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/ll_sys.h
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/ll_sys.h
@@ -120,5 +120,4 @@
uint32_t ll_intf_cmn_get_slptmr_value(void);
-
#endif /* LL_SYS_H */
\ No newline at end of file
diff --git a/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c
index 2b46340..e815169 100644
--- a/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c
+++ b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c
@@ -21,9 +21,6 @@
#include "event_manager.h"
#include "ll_intf.h"
-extern uint8_t AHB5_SwitchedOff;
-extern uint32_t radio_sleep_timer_val;
-
/**
* @brief Initialize the Link Layer SoC dependencies
* @param None
@@ -71,15 +68,9 @@
*/
void ll_sys_radio_wait_for_busclkrdy(void)
{
- /* Wait on radio bus clock readiness if it has been turned of */
- if (AHB5_SwitchedOff == 1)
- {
- AHB5_SwitchedOff = 0;
- while (radio_sleep_timer_val == ll_intf_cmn_get_slptmr_value());
- }
+ LINKLAYER_PLAT_WaitHclkRdy();
}
-
/**
* @brief Get RNG number for the Link Layer IP
* @param None
diff --git a/zephyr/module.yml b/zephyr/module.yml
index 9ab0bf1..8607684 100644
--- a/zephyr/module.yml
+++ b/zephyr/module.yml
@@ -5,18 +5,18 @@
dts_root: .
blobs:
- path: stm32wba/lib/LinkLayer_BLE_Full_lib.a
- sha256: 733fb35f978080e6e39ddaa18e37fc6ab1c694550c5b3c863f30457fa6d3968a
+ sha256: c414a14540fb14c6f4e92246da252886bd03915a02022780d54f05d3f1efa648
type: lib
- version: '1.4.1'
+ version: '1.5.0'
license-path: zephyr/blobs/stm32wba/lib/license.md
- url: https://github.com/STMicroelectronics/STM32CubeWBA/raw/v1.4.1/Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/lib/LinkLayer_BLE_Full_lib.a
+ url: https://github.com/STMicroelectronics/STM32CubeWBA/raw/v1.5.0/Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/lib/LinkLayer_BLE_Full_lib.a
description: "Binary Link Layer library for the STM32WBA Bluetooth subsystem"
- path: stm32wba/lib/stm32wba_ble_stack_llo.a
- sha256: 1fb1287b04105ee6de2709a0239ffb849aa55f577b5234fdfff401b9dec9fcb7
+ sha256: 02e5ab9b172bb93c944eb70014edd9f0f98b448be22480a676ef6f0aa94a2d30
type: lib
- version: '1.4.1'
+ version: '1.5.0'
license-path: zephyr/blobs/stm32wba/lib/license.md
- url: https://github.com/STMicroelectronics/STM32CubeWBA/raw/v1.4.1/Middlewares/ST/STM32_WPAN/ble/stack/lib/stm32wba_ble_stack_llo.a
+ url: https://github.com/STMicroelectronics/STM32CubeWBA/raw/v1.5.0/Middlewares/ST/STM32_WPAN/ble/stack/lib/stm32wba_ble_stack_llo.a
description: "Binary Stack library for the STM32WBA Bluetooth subsystem"
- path: stm32wb0/lib/stm32wb0x_ble_stack_controller_only.a
sha256: 54bf69acaa59afc368132f8170e9910858a2c801538494d8de96fa567c02e233