From 13dff4ae3d34bdcd24ffbb143041f9682d61b92f Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Fri, 2 Aug 2019 13:13:38 +0200 Subject: [PATCH] Relax us ticker frequency requirement. This change is required by the Samsung S111(S5JS100). On this board timer clock used for us ticker operates at 26MHz. According to current requirements, 8 MHz is the top limit for us ticker timer. This change relaxes top limit to 100 MHz, but only for 32-bit timers. Ticker common layer schedules one interrupt per timer rollover to trace elapsed time. We need to ensure that this operation is not performed too frequently. I.e. in case of 16-bit timer at 32 MHz, the timer rollover will happen after ~2 ms. This may cause that there will be no time for other tasks. That is why we increase the top limit, but only for 32-bit timers. --- hal/us_ticker_api.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hal/us_ticker_api.h b/hal/us_ticker_api.h index f62a06d189..ecfa712bb9 100644 --- a/hal/us_ticker_api.h +++ b/hal/us_ticker_api.h @@ -32,7 +32,8 @@ extern "C" { * Low level interface to the microsecond ticker of a target * * # Defined behavior - * * Has a reported frequency between 250KHz and 8MHz - Verified by test ::us_ticker_info_test + * * Has a reported frequency between 250KHz and 8MHz for counters which are less than 32 bits wide - Verified by test ::us_ticker_info_test + * * Has a reported frequency up to 100MHz for counters which are 32 bits wide - Verified by test ::us_ticker_info_test * * Has a counter that is at least 16 bits wide - Verified by test ::us_ticker_info_test * * All behavior defined by the @ref hal_ticker_shared "ticker specification" *