diff --git a/ref_app/src/util/utility/util_time.h b/ref_app/src/util/utility/util_time.h index 5a01301d6..834bdb858 100644 --- a/ref_app/src/util/utility/util_time.h +++ b/ref_app/src/util/utility/util_time.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/ref_app/target/micros/am6254_soc/Code/Appli/Core/a53/main_cores.cpp b/ref_app/target/micros/am6254_soc/Code/Appli/Core/a53/main_cores.cpp index 05a70d69f..f14c45a98 100644 --- a/ref_app/target/micros/am6254_soc/Code/Appli/Core/a53/main_cores.cpp +++ b/ref_app/target/micros/am6254_soc/Code/Appli/Core/a53/main_cores.cpp @@ -20,12 +20,11 @@ namespace local template struct timer_core_x_backend { + static_assert(CoreId == 0U, "Error: This template is intended for CoreId 0 only"); + using tick_type = UnsignedTickType; - constexpr static auto get_now() -> tick_type - { - return static_cast(mcal::gpt::secure::get_time_elapsed()); - } + static constexpr auto get_now() -> tick_type { return util::default_timer_backend::get_now(); } }; template @@ -33,10 +32,7 @@ namespace local { using tick_type = UnsignedTickType; - constexpr static auto get_now() -> tick_type - { - return static_cast(mcal::gpt::secure::get_time_elapsed_core1()); - } + static constexpr auto get_now() -> tick_type { return static_cast(mcal::gpt::secure::get_time_elapsed_core1()); } }; template @@ -44,10 +40,7 @@ namespace local { using tick_type = UnsignedTickType; - constexpr static auto get_now() -> tick_type - { - return static_cast(mcal::gpt::secure::get_time_elapsed_core2()); - } + static constexpr auto get_now() -> tick_type { return static_cast(mcal::gpt::secure::get_time_elapsed_core2()); } }; template @@ -55,10 +48,7 @@ namespace local { using tick_type = UnsignedTickType; - constexpr static auto get_now() -> tick_type - { - return static_cast(mcal::gpt::secure::get_time_elapsed_core3()); - } + static constexpr auto get_now() -> tick_type { return static_cast(mcal::gpt::secure::get_time_elapsed_core3()); } }; template