Skip to content

Commit cfd601e

Browse files
committed
lib/stm32: stm32wba: fix temperature calibration activation
The temperature calibration is now activable, its activation needs to be integrated in the library. Signed-off-by: Romain Jayles <romain.jayles@st.com>
1 parent 10c67c3 commit cfd601e

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#include "linklayer_plat.h"
2929
#include "scm.h"
3030
#include "log_module.h"
31+
#ifndef __ZEPHYR__
3132
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
3233
#include "adc_ctrl.h"
3334
#endif /* (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1) */
34-
#ifndef __ZEPHYR__
3535
#if (CFG_LPM_LEVEL != 0)
3636
#include "stm32_lpm.h"
3737
#include "stm32_lpm_if.h"
@@ -502,6 +502,7 @@ void LINKLAYER_PLAT_RCOStopClbr(void)
502502
while (LL_PWR_IsActiveFlag_VOS() == 0);
503503
#endif /* (CFG_SCM_SUPPORTED == 1) */
504504
}
505+
#endif /*__ZEPHYR__*/
505506

506507
/**
507508
* @brief Link Layer requests temperature.
@@ -514,7 +515,7 @@ void LINKLAYER_PLAT_RequestTemperature(void)
514515
ll_sys_bg_temperature_measurement();
515516
#endif /* USE_TEMPERATURE_BASED_RADIO_CALIBRATION */
516517
}
517-
518+
#ifndef __ZEPHYR__
518519
/**
519520
* @brief Enable RTOS context switch.
520521
* @param None

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
#include "ll_sys.h"
2424
#include "ll_sys_if.h"
2525
#include "utilities_common.h"
26+
#ifndef __ZEPHYR__
2627
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
2728
#include "temp_measurement.h"
2829
#endif /* (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1) */
29-
30+
#endif /*__ZEPHYR__*/
3031
/* Private defines -----------------------------------------------------------*/
3132
/* Radio event scheduling method - must be set at 1 */
3233
#define USE_RADIO_LOW_ISR (1)
@@ -58,9 +59,6 @@
5859
/* USER CODE END GV */
5960

6061
/* Private functions prototypes-----------------------------------------------*/
61-
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
62-
static void ll_sys_bg_temperature_measurement_init(void);
63-
#endif /* USE_TEMPERATURE_BASED_RADIO_CALIBRATION */
6462
static void ll_sys_sleep_clock_source_selection(void);
6563
static uint8_t ll_sys_BLE_sleep_clock_accuracy_selection(void);
6664
void ll_sys_reset(void);
@@ -129,7 +127,6 @@ void ll_sys_config_params(void)
129127
/* Apply the selected link layer sleep timer source */
130128
ll_sys_sleep_clock_source_selection();
131129

132-
#ifndef __ZEPHYR__
133130
/* USER CODE BEGIN ll_sys_config_params_1 */
134131

135132
/* USER CODE END ll_sys_config_params_1 */
@@ -142,9 +139,10 @@ void ll_sys_config_params(void)
142139
ll_intf_cmn_set_temperature_sensor_state();
143140
#endif /* USE_TEMPERATURE_BASED_RADIO_CALIBRATION */
144141

142+
#ifndef __ZEPHYR__
145143
/* Link Layer power table */
146144
ll_intf_cmn_select_tx_power_table(CFG_RF_TX_POWER_TABLE_ID);
147-
#endif
145+
#endif /*__ZEPHYR__*/
148146
/* USER CODE BEGIN ll_sys_config_params_2 */
149147

150148
/* USER CODE END ll_sys_config_params_2 */

lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/ll_sys.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#ifndef LL_SYS_H
2020
#define LL_SYS_H
2121

22+
#include "app_conf.h"
2223
#include "ll_intf.h"
2324
#include "hci.h"
2425
#include "cmsis_compiler.h"
@@ -99,6 +100,12 @@ ll_sys_status_t ll_sys_dp_slp_exit(void);
99100
ll_sys_dp_slp_state_t ll_sys_dp_slp_get_state(void);
100101
void ll_sys_dp_slp_wakeup_evt_clbk(void const *ptr_arg);
101102

103+
/* Link Layer system interface temperature calibration functions ************************************************/
104+
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
105+
void ll_sys_bg_temperature_measurement_init(void);
106+
void ll_sys_bg_temperature_measurement(void);
107+
#endif /* USE_TEMPERATURE_BASED_RADIO_CALIBRATION */
108+
102109
/**
103110
* @brief Get the number of concurrent state machines for the Link Layer
104111
* @param None

0 commit comments

Comments
 (0)