Commit 126cbbee authored by Romain Jayles's avatar Romain Jayles Committed by Erwan Gouriou
Browse files

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: default avatarRomain Jayles <romain.jayles@st.com>
parent c69ae89c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -28,10 +28,10 @@
#include "linklayer_plat.h"
#include "scm.h"
#include "log_module.h"
#ifndef __ZEPHYR__
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
#include "adc_ctrl.h"
#endif /* (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1) */
#ifndef __ZEPHYR__
#if (CFG_LPM_LEVEL != 0)
#include "stm32_lpm.h"
#include "stm32_lpm_if.h"
@@ -510,6 +510,7 @@ void LINKLAYER_PLAT_RCOStopClbr(void)
  while (LL_PWR_IsActiveFlag_VOS() == 0);
#endif /* (CFG_SCM_SUPPORTED == 1) */
}
#endif /*__ZEPHYR__*/

/**
  * @brief  Link Layer requests temperature.
@@ -522,7 +523,7 @@ void LINKLAYER_PLAT_RequestTemperature(void)
  ll_sys_bg_temperature_measurement();
#endif /* USE_TEMPERATURE_BASED_RADIO_CALIBRATION */
}

#ifndef __ZEPHYR__
/**
  * @brief  Enable RTOS context switch.
  * @param  None
+4 −6
Original line number Diff line number Diff line
@@ -23,10 +23,11 @@
#include "ll_sys.h"
#include "ll_sys_if.h"
#include "utilities_common.h"
#ifndef __ZEPHYR__
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
#include "temp_measurement.h"
#endif /* (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1) */

#endif /*__ZEPHYR__*/
/* Private defines -----------------------------------------------------------*/
/* Radio event scheduling method - must be set at 1 */
#define USE_RADIO_LOW_ISR                   (1)
@@ -58,9 +59,6 @@
/* 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);
static uint8_t ll_sys_BLE_sleep_clock_accuracy_selection(void);
void ll_sys_reset(void);
@@ -129,7 +127,6 @@ void ll_sys_config_params(void)
  /* Apply the selected link layer sleep timer source */
  ll_sys_sleep_clock_source_selection();

#ifndef __ZEPHYR__
/* USER CODE BEGIN ll_sys_config_params_1 */

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

#ifndef __ZEPHYR__
  /* Link Layer power table */
  ll_intf_cmn_select_tx_power_table(CFG_RF_TX_POWER_TABLE_ID);
#endif 
#endif  /*__ZEPHYR__*/
/* USER CODE BEGIN ll_sys_config_params_2 */

/* USER CODE END ll_sys_config_params_2 */
+7 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#ifndef LL_SYS_H
#define LL_SYS_H

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

/* Link Layer system interface temperature calibration functions  ************************************************/
#if (USE_TEMPERATURE_BASED_RADIO_CALIBRATION == 1)
void ll_sys_bg_temperature_measurement_init(void);
void ll_sys_bg_temperature_measurement(void);
#endif /* USE_TEMPERATURE_BASED_RADIO_CALIBRATION */

/**
  * @brief  Get the number of concurrent state machines for the Link Layer
  * @param  None