Skip to content

lib: stm32wb0: Provide support for using radio timer as the system clock #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
if(CONFIG_HAS_STM32LIB)
add_subdirectory_ifdef(CONFIG_BT_STM32_IPM stm32wb)
add_subdirectory_ifdef(CONFIG_BT_STM32WBA stm32wba)
add_subdirectory_ifdef(CONFIG_BT_STM32WB0 stm32wb0)
if(CONFIG_BT_STM32WB0 OR CONFIG_STM32_RADIO_TIMER)
add_subdirectory(stm32wb0)
endif()
endif()
5 changes: 0 additions & 5 deletions lib/stm32wb0/BLE_TransparentMode/STM32_BLE/Target/bleplat.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,6 @@ void BLEPLAT_StopTimer(BLEPLAT_TimerHandleTypeDef *TimerHandle)
HAL_RADIO_TIMER_StopVirtualTimer((VTIMER_HandleType*)TimerHandle);
}

uint8_t BLEPLAT_SetRadioTimerValue(uint32_t Time, uint8_t EventType, uint8_t CalReq)
{
return HAL_RADIO_TIMER_SetRadioTimerValue(Time, EventType, CalReq);
}

uint8_t BLEPLAT_ClearRadioTimerValue(void)
{
return HAL_RADIO_TIMER_ClearRadioTimerValue();
Expand Down
9 changes: 7 additions & 2 deletions lib/stm32wb0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@

zephyr_library()

if(CONFIG_STM32_RADIO_TIMER)
zephyr_include_directories(BLE_TransparentMode/System/Modules)
zephyr_library_sources(BLE_TransparentMode/System/Modules/blue_unit_conversion.s)
endif()

if(CONFIG_BT_STM32WB0)
# Set the correct directory
zephyr_include_directories(STM32_BLE)
zephyr_include_directories(STM32_BLE/stack/include)
zephyr_include_directories(BLE_TransparentMode/System/Modules/PKAMGR/Inc)
zephyr_include_directories(BLE_TransparentMode/System/Modules)
zephyr_include_directories(BLE_TransparentMode/System/Interfaces)
zephyr_include_directories(BLE_TransparentMode/System/Modules/RADIO_utils/Inc)
zephyr_include_directories(BLE_TransparentMode/System/Config/Debug_GPIO)
Expand Down Expand Up @@ -290,7 +295,6 @@ zephyr_library_sources(BLE_TransparentMode/System/Modules/PKAMGR/Src/pka_manager
zephyr_library_sources(BLE_TransparentMode/System/Interfaces/hw_aes.c)
zephyr_library_sources(BLE_TransparentMode/System/Interfaces/hw_pka.c)
zephyr_library_sources(BLE_TransparentMode/System/Interfaces/hw_rng.c)
zephyr_library_sources(BLE_TransparentMode/System/Modules/blue_unit_conversion.s)
zephyr_library_sources(BLE_TransparentMode/System/Modules/osal_memcpy.s)
zephyr_library_sources(BLE_TransparentMode/STM32_BLE/App/adv_buff_alloc_tiny.c)
zephyr_library_sources(BLE_TransparentMode/STM32_BLE/App/transport_layer.c)
Expand All @@ -302,3 +306,4 @@ zephyr_library_sources(BLE_TransparentMode/STM32_BLE/App/pawr_buff_alloc.c)
zephyr_library_sources(STM32_BLE/stack/config/ble_stack_user_cfg.c)
zephyr_library_sources(BLE_TransparentMode/STM32_BLE/App/dtm_cmds.c)
zephyr_library_sources(BLE_TransparentMode/Core/Src/stm32wb0x_hal_msp.c)
endif()
2 changes: 2 additions & 0 deletions lib/stm32wb0/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,7 @@ Patch List:
Impacted file: stm32wb0x_hal_msp.c
- Removed BLEPLAT_RngGetRandom16 and BLEPLAT_RngGetRandom32 functions:
Impacted file: bleplat.c
- Removed BLEPLAT_SetRadioTimerValue function:
Impacted file: bleplat.c
- dos2unix applied
- trailing white spaces removed