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()
32
32
const ticker_info_t *p_ticker_info = us_ticker_get_info ();
33
33
34
34
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
+
36
46
TEST_ASSERT (p_ticker_info->bits >= 16 );
37
47
38
48
#ifdef US_TICKER_PERIOD_NUM
Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ extern "C" {
31
31
*
32
32
* Given ticker is available.
33
33
* 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.
35
38
*/
36
39
void us_ticker_info_test (void );
37
40
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ extern "C" {
32
32
* Low level interface to the microsecond ticker of a target
33
33
*
34
34
* # 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
36
37
* * Has a counter that is at least 16 bits wide - Verified by test ::us_ticker_info_test
37
38
* * All behavior defined by the @ref hal_ticker_shared "ticker specification"
38
39
*
You can’t perform that action at this time.
0 commit comments