diff --git a/boards/xg23-pk6068a/Kconfig b/boards/xg23-pk6068a/Kconfig index 56c75eae81..aa9b82755f 100644 --- a/boards/xg23-pk6068a/Kconfig +++ b/boards/xg23-pk6068a/Kconfig @@ -20,3 +20,4 @@ config BOARD_XG23_PK6068A # Put other features for this board (in alphabetical order) select HAVE_SAUL_GPIO + select HAVE_ZTIMER_PERIPH_LPTIMER diff --git a/boards/xg23-pk6068a/Makefile.dep b/boards/xg23-pk6068a/Makefile.dep index 5472bf8b8d..01d21e3373 100644 --- a/boards/xg23-pk6068a/Makefile.dep +++ b/boards/xg23-pk6068a/Makefile.dep @@ -1,3 +1,7 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif + +ifneq (,$(filter ztimer_msec ztimer_sec,$(USEMODULE))) + USEMODULE += ztimer_periph_lptimer +endif diff --git a/boards/xg23-pk6068a/include/board.h b/boards/xg23-pk6068a/include/board.h index 349a011bce..7b0cafa4a9 100644 --- a/boards/xg23-pk6068a/include/board.h +++ b/boards/xg23-pk6068a/include/board.h @@ -35,6 +35,16 @@ extern "C" { */ #define PM_BLOCKER_INITIAL { 0, 0, 0 } +/** + * @name ztimer configuration + * @{ + */ +#define CONFIG_ZTIMER_LPTIMER_DEV TIMER_DEV(1) +#define CONFIG_ZTIMER_LPTIMER_FREQ LFXO_FREQ +#define CONFIG_ZTIMER_LPTIMER_WIDTH 24 +#define CONFIG_ZTIMER_LPTIMER_BLOCK_PM_MODE EFM32_PM_MODE_EM3 +/** @} */ + /** * @brief Power mode required for GPIO IRQs *