[PATCH 1/4] Implementation for HAL_GetTick

Robin Müller robin.mueller.m at gmail.com
Mon Apr 19 08:37:03 UTC 2021


This implementation is problematic because HAL_GetTick is supposed to
return elapsed milliseconds since boot and the current implementation
assumes there are 1000 ticks per second.
I'll send an updated patch.

Kind Regards
Robin

On Mon, 12 Apr 2021 at 11:55, Robin.Mueller <robin.mueller.m at gmail.com>
wrote:

> This commit adds an implementation for the HAL_GetTick function.
> It simply forwards the call to the respective RTEMS function.
> ---
>  bsps/arm/stm32h7/start/bspstart.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bsps/arm/stm32h7/start/bspstart.c
> b/bsps/arm/stm32h7/start/bspstart.c
> index 2fc8133cca..d942fbdcb3 100644
> --- a/bsps/arm/stm32h7/start/bspstart.c
> +++ b/bsps/arm/stm32h7/start/bspstart.c
> @@ -34,7 +34,7 @@
>
>  uint32_t HAL_GetTick(void)
>  {
> -  return 0;
> +  return rtems_clock_get_ticks_since_boot();
>  }
>
>  uint32_t stm32h7_systick_frequency(void)
> --
> 2.25.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210419/541ae66f/attachment.html>


More information about the devel mailing list