File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,17 @@ void us_ticker_info_test()
3232 const ticker_info_t *p_ticker_info = us_ticker_get_info ();
3333
3434 TEST_ASSERT (p_ticker_info->frequency >= 250000 );
35- TEST_ASSERT (p_ticker_info->frequency <= 8000000 );
35+
36+ switch (p_ticker_info->bits ) {
37+ case 32 :
38+ TEST_ASSERT (p_ticker_info->frequency <= 100000000 );
39+ break ;
40+
41+ default :
42+ TEST_ASSERT (p_ticker_info->frequency <= 8000000 );
43+ break ;
44+ }
45+
3646 TEST_ASSERT (p_ticker_info->bits >= 16 );
3747
3848#ifdef US_TICKER_PERIOD_NUM
Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ extern "C" {
3131 *
3232 * Given ticker is available.
3333 * When ticker information data is obtained.
34- * Then ticker information indicate that frequency between 250KHz and 8MHz and the counter is at least 16 bits wide.
34+ * Then ticker information indicate that:
35+ * - counter frequency is between 250KHz and 8MHz for counters which are less than 32 bits wide
36+ * - counter frequency is up to 100MHz for counters which are 32 bits wide
37+ * - the counter is at least 16 bits wide.
3538 */
3639void us_ticker_info_test (void );
3740
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ extern "C" {
3232 * Low level interface to the microsecond ticker of a target
3333 *
3434 * # Defined behavior
35- * * Has a reported frequency between 250KHz and 8MHz - Verified by test ::us_ticker_info_test
35+ * * Has a reported frequency between 250KHz and 8MHz for counters which are less than 32 bits wide - Verified by test ::us_ticker_info_test
36+ * * Has a reported frequency up to 100MHz for counters which are 32 bits wide - Verified by test ::us_ticker_info_test
3637 * * Has a counter that is at least 16 bits wide - Verified by test ::us_ticker_info_test
3738 * * All behavior defined by the @ref hal_ticker_shared "ticker specification"
3839 *
You can’t perform that action at this time.
0 commit comments