summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Mueller <robin.mueller.m@gmail.com>2021-04-26 11:20:32 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-26 11:24:22 +0200
commit37649355ce876924ef4058bc761af54631659341 (patch)
tree3185047c58ea73d9da27b867630d314e9ab47b12
parent53bb397dfa7906be013276da2b56219da8a3408f (diff)
downloadrtems-37649355ce876924ef4058bc761af54631659341.tar.bz2
Implementation for STM32 HAL_GetTick using RTEMS
Uses configured millisecond per ticks
-rw-r--r--bsps/arm/stm32h7/start/bspstart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsps/arm/stm32h7/start/bspstart.c b/bsps/arm/stm32h7/start/bspstart.c
index 7ae39f1410..cdc23d4911 100644
--- a/bsps/arm/stm32h7/start/bspstart.c
+++ b/bsps/arm/stm32h7/start/bspstart.c
@@ -35,8 +35,8 @@
/* Get number of milliseconds elapsed since startup */
uint32_t HAL_GetTick(void)
{
- uint64_t temp = rtems_clock_get_uptime_nanoseconds() / (1000 * 1000);
- return temp;
+ return rtems_clock_get_ticks_since_boot() *
+ rtems_configuration_get_milliseconds_per_tick();
}
uint32_t stm32h7_systick_frequency(void)