Skip to content

Commit d768bcb

Browse files
HoZHelerwango
authored andcommitted
lib: stm32wb0: Provide support for using radio timer as the system clock
Provide support for using the radio timer as the system clock when CONFIG_STM32WB0_RADIO_TIMER is set. Transfer BLEPLAT_SetRadioTimerValue function to the Bluetooth HCI driver in Zephyr. Signed-off-by: Ali Hozhabri <[email protected]>
1 parent 18186af commit d768bcb

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

lib/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ if(CONFIG_HAS_STM32LIB)
1010
if(CONFIG_BT_STM32WBA OR CONFIG_IEEE802154_STM32WBA)
1111
add_subdirectory(stm32wba)
1212
endif()
13-
add_subdirectory_ifdef(CONFIG_BT_STM32WB0 stm32wb0)
13+
if(CONFIG_BT_STM32WB0 OR CONFIG_STM32WB0_RADIO_TIMER)
14+
add_subdirectory(stm32wb0)
15+
endif()
1416
add_subdirectory_ifdef(CONFIG_VIDEO_STM32_VENC vc8000nanoe)
1517
endif()

lib/stm32wb0/BLE_TransparentMode/STM32_BLE/Target/bleplat.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,6 @@ void BLEPLAT_StopTimer(BLEPLAT_TimerHandleTypeDef *TimerHandle)
233233
HAL_RADIO_TIMER_StopVirtualTimer((VTIMER_HandleType*)TimerHandle);
234234
}
235235

236-
uint8_t BLEPLAT_SetRadioTimerValue(uint32_t Time, uint8_t EventType, uint8_t CalReq)
237-
{
238-
return HAL_RADIO_TIMER_SetRadioTimerValue(Time, EventType, CalReq);
239-
}
240-
241236
uint8_t BLEPLAT_ClearRadioTimerValue(void)
242237
{
243238
return HAL_RADIO_TIMER_ClearRadioTimerValue();

lib/stm32wb0/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44

55
zephyr_library()
66

7+
if(CONFIG_STM32WB0_RADIO_TIMER)
8+
zephyr_include_directories(BLE_TransparentMode/System/Modules)
9+
zephyr_library_sources(BLE_TransparentMode/System/Modules/blue_unit_conversion.s)
10+
endif()
11+
12+
if(CONFIG_BT_STM32WB0)
713
# Set the correct directory
814
zephyr_include_directories(STM32_BLE)
915
zephyr_include_directories(STM32_BLE/stack/include)
1016
zephyr_include_directories(BLE_TransparentMode/System/Modules/PKAMGR/Inc)
11-
zephyr_include_directories(BLE_TransparentMode/System/Modules)
1217
zephyr_include_directories(BLE_TransparentMode/System/Interfaces)
1318
zephyr_include_directories(BLE_TransparentMode/System/Modules/RADIO_utils/Inc)
1419
zephyr_include_directories(BLE_TransparentMode/System/Config/Debug_GPIO)
@@ -290,7 +295,6 @@ zephyr_library_sources(BLE_TransparentMode/System/Modules/PKAMGR/Src/pka_manager
290295
zephyr_library_sources(BLE_TransparentMode/System/Interfaces/hw_aes.c)
291296
zephyr_library_sources(BLE_TransparentMode/System/Interfaces/hw_pka.c)
292297
zephyr_library_sources(BLE_TransparentMode/System/Interfaces/hw_rng.c)
293-
zephyr_library_sources(BLE_TransparentMode/System/Modules/blue_unit_conversion.s)
294298
zephyr_library_sources(BLE_TransparentMode/System/Modules/osal_memcpy.s)
295299
zephyr_library_sources(BLE_TransparentMode/STM32_BLE/App/adv_buff_alloc_tiny.c)
296300
zephyr_library_sources(BLE_TransparentMode/STM32_BLE/App/transport_layer.c)
@@ -302,3 +306,4 @@ zephyr_library_sources(BLE_TransparentMode/STM32_BLE/App/pawr_buff_alloc.c)
302306
zephyr_library_sources(STM32_BLE/stack/config/ble_stack_user_cfg.c)
303307
zephyr_library_sources(BLE_TransparentMode/STM32_BLE/App/dtm_cmds.c)
304308
zephyr_library_sources(BLE_TransparentMode/Core/Src/stm32wb0x_hal_msp.c)
309+
endif()

lib/stm32wb0/README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,7 @@ Patch List:
129129
Impacted file: stm32wb0x_hal_msp.c
130130
- Removed BLEPLAT_RngGetRandom16 and BLEPLAT_RngGetRandom32 functions:
131131
Impacted file: bleplat.c
132+
- Removed BLEPLAT_SetRadioTimerValue function:
133+
Impacted file: bleplat.c
132134
- dos2unix applied
133135
- trailing white spaces removed

0 commit comments

Comments
 (0)