Skip to content

Commit c69ae89

Browse files
rjayleserwango
authored andcommitted
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: Romain Jayles <[email protected]>
1 parent 55b5d9a commit c69ae89

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

lib/stm32wba/BLE_TransparentMode/Core/Inc/app_conf.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ typedef enum
376376
* HW RADIO configuration
377377
******************************************************************************/
378378
/* Link Layer uses temperature based calibration (0 --> NO ; 1 --> YES) */
379-
#define USE_TEMPERATURE_BASED_RADIO_CALIBRATION (0)
379+
#ifndef USE_TEMPERATURE_BASED_RADIO_CALIBRATION
380+
#define USE_TEMPERATURE_BASED_RADIO_CALIBRATION (1)
381+
#endif
380382

381383
#define RADIO_INTR_NUM RADIO_IRQn /* 2.4GHz RADIO global interrupt */
382384
#define RADIO_INTR_PRIO_HIGH (0) /* 2.4GHz RADIO interrupt priority when radio is Active */

lib/stm32wba/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ elseif (BLE_LIB_TYPE STREQUAL "BLE_LIB_FULL")
8686
)
8787
endif()
8888

89+
# Setting the right Cube define according to the Zephyr configuration
90+
if(NOT CONFIG_BT_STM32WBA_USE_TEMP_BASED_CALIB)
91+
zephyr_compile_definitions( -DUSE_TEMPERATURE_BASED_RADIO_CALIBRATION=0 )
92+
endif()
93+
8994
# Selecting the proper version of link layer lib according the soc
9095
# Checking all the soc variants and not simply relying on board name
9196

lib/stm32wba/README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,14 @@ License Link:
105105
opensource.org/license/mit
106106

107107
Patch List:
108+
* Discard "static" implementation of ll_sys_bg_temperature_measurement_init to allow specific zephyr implementation
109+
Impacted file: ll_sys_if.c
110+
ll_sys.h
108111

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

112-
* Disable Temperature based radio calibration:
115+
* Allowing Temperature based radio calibration configuration to be externally overwritten:
113116
Impacted file: app_conf.h
114117

115118
* Increased 2.4GHz RADIO low ISR priority:

0 commit comments

Comments
 (0)