Skip to content

Commit 10c67c3

Browse files
committed
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 c83a9ef commit 10c67c3

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-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
@@ -60,6 +60,11 @@ set_target_properties(
6060
stm32wba_ble_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_BLE_LIB_DIR}/stm32wba_ble_stack_llo.a
6161
)
6262

63+
# Setting the right Cube define according to the Zephyr configuration
64+
if(NOT CONFIG_BT_STM32WBA_USE_TEMPERATURE_BASED_RADIO_CALIBRATION STREQUAL "y")
65+
zephyr_compile_definitions( -DUSE_TEMPERATURE_BASED_RADIO_CALIBRATION=0 )
66+
endif()
67+
6368
# Selecting the proper version of link layer lib according the soc
6469
# Checking all the soc variants and not simply relying on board name
6570

lib/stm32wba/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Patch List:
109109
* Enabled extended advertising in CFG_BLE_OPTIONS:
110110
Impacted file: app_conf.h
111111

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

115115
* Increased 2.4GHz RADIO low ISR priority:

0 commit comments

Comments
 (0)