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

lib/stm32: allow temperature calibration to be defined by Kconfig



Add the possibility to change the activation of the temperature
calibration of the radio directly from a Kconfig

Signed-off-by: default avatarRomain Jayles <romain.jayles@st.com>
parent 55b5d9a0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -376,7 +376,9 @@ typedef enum
 * HW RADIO configuration
 ******************************************************************************/
/* Link Layer uses temperature based calibration (0 --> NO ; 1 --> YES) */
#define USE_TEMPERATURE_BASED_RADIO_CALIBRATION  (0)
#ifndef USE_TEMPERATURE_BASED_RADIO_CALIBRATION
#define USE_TEMPERATURE_BASED_RADIO_CALIBRATION (1)
#endif

#define RADIO_INTR_NUM                      RADIO_IRQn     /* 2.4GHz RADIO global interrupt */
#define RADIO_INTR_PRIO_HIGH                (0)            /* 2.4GHz RADIO interrupt priority when radio is Active */
+5 −0
Original line number Diff line number Diff line
@@ -86,6 +86,11 @@ elseif (BLE_LIB_TYPE STREQUAL "BLE_LIB_FULL")
  )
endif()

# Setting the right Cube define according to the Zephyr configuration
if(NOT CONFIG_BT_STM32WBA_USE_TEMP_BASED_CALIB)
  zephyr_compile_definitions( -DUSE_TEMPERATURE_BASED_RADIO_CALIBRATION=0 )
endif()

# Selecting the proper version of link layer lib according the soc
# Checking all the soc variants and not simply relying on board name 

+4 −1
Original line number Diff line number Diff line
@@ -105,11 +105,14 @@ License Link:
   opensource.org/license/mit

Patch List:
        * Discard "static" implementation of ll_sys_bg_temperature_measurement_init to allow specific zephyr implementation
          Impacted file: ll_sys_if.c
                         ll_sys.h

	* Enabled extended advertising in CFG_BLE_OPTIONS:
	  Impacted file: app_conf.h

	* Disable Temperature based radio calibration:
	* Allowing Temperature based radio calibration configuration to be externally overwritten:
	  Impacted file: app_conf.h

	* Increased 2.4GHz RADIO low ISR priority: