diff --git a/arch/arm/soc/st_stm32/stm32f1/soc.c b/arch/arm/soc/st_stm32/stm32f1/soc.c index db7ca5becf3..874eeaab749 100644 --- a/arch/arm/soc/st_stm32/stm32f1/soc.c +++ b/arch/arm/soc/st_stm32/stm32f1/soc.c @@ -16,6 +16,17 @@ #include #include +/** + * @brief This function configures the source of stm32cube time base. + * Cube HAL expects a 1ms tick which matches with k_uptime_get_32. + * Tick interrupt priority is not used + * @return HAL status + */ +uint32_t HAL_GetTick(void) +{ + return k_uptime_get_32(); +} + /** * @brief Perform basic hardware initialization at boot. * diff --git a/arch/arm/soc/st_stm32/stm32f3/soc.c b/arch/arm/soc/st_stm32/stm32f3/soc.c index 9855ea0ffed..4c554051834 100644 --- a/arch/arm/soc/st_stm32/stm32f3/soc.c +++ b/arch/arm/soc/st_stm32/stm32f3/soc.c @@ -16,6 +16,17 @@ #include #include +/** + * @brief This function configures the source of stm32cube time base. + * Cube HAL expects a 1ms tick which matches with k_uptime_get_32. + * Tick interrupt priority is not used + * @return HAL status + */ +uint32_t HAL_GetTick(void) +{ + return k_uptime_get_32(); +} + /** * @brief Perform basic hardware initialization at boot. * diff --git a/arch/arm/soc/st_stm32/stm32f4/soc.c b/arch/arm/soc/st_stm32/stm32f4/soc.c index 3857992a374..827bb1edcdc 100644 --- a/arch/arm/soc/st_stm32/stm32f4/soc.c +++ b/arch/arm/soc/st_stm32/stm32f4/soc.c @@ -17,6 +17,17 @@ #include #include +/** + * @brief This function configures the source of stm32cube time base. + * Cube HAL expects a 1ms tick which matches with k_uptime_get_32. + * Tick interrupt priority is not used + * @return HAL status + */ +uint32_t HAL_GetTick(void) +{ + return k_uptime_get_32(); +} + /** * @brief Perform basic hardware initialization at boot. * diff --git a/arch/arm/soc/st_stm32/stm32l4/soc.c b/arch/arm/soc/st_stm32/stm32l4/soc.c index 742960e4635..84ee3295d0f 100644 --- a/arch/arm/soc/st_stm32/stm32l4/soc.c +++ b/arch/arm/soc/st_stm32/stm32l4/soc.c @@ -17,6 +17,17 @@ #include #include +/** + * @brief This function configures the source of stm32cube time base. + * Cube HAL expects a 1ms tick which matches with k_uptime_get_32. + * Tick interrupt priority is not used + * @return HAL status + */ +uint32_t HAL_GetTick(void) +{ + return k_uptime_get_32(); +} + /** * @brief Perform basic hardware initialization at boot. *