mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11157 from mprse/us_ticker_freq_fix
Relax us ticker frequency requirement + test updatepull/11212/head
commit
69bfc3460b
|
@ -32,7 +32,17 @@ void us_ticker_info_test()
|
||||||
const ticker_info_t *p_ticker_info = us_ticker_get_info();
|
const ticker_info_t *p_ticker_info = us_ticker_get_info();
|
||||||
|
|
||||||
TEST_ASSERT(p_ticker_info->frequency >= 250000);
|
TEST_ASSERT(p_ticker_info->frequency >= 250000);
|
||||||
|
|
||||||
|
switch (p_ticker_info->bits) {
|
||||||
|
case 32:
|
||||||
|
TEST_ASSERT(p_ticker_info->frequency <= 100000000);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
TEST_ASSERT(p_ticker_info->frequency <= 8000000);
|
TEST_ASSERT(p_ticker_info->frequency <= 8000000);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
TEST_ASSERT(p_ticker_info->bits >= 16);
|
TEST_ASSERT(p_ticker_info->bits >= 16);
|
||||||
|
|
||||||
#ifdef US_TICKER_PERIOD_NUM
|
#ifdef US_TICKER_PERIOD_NUM
|
||||||
|
|
|
@ -31,7 +31,10 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* Given ticker is available.
|
* Given ticker is available.
|
||||||
* When ticker information data is obtained.
|
* When ticker information data is obtained.
|
||||||
* Then ticker information indicate that frequency between 250KHz and 8MHz and the counter is at least 16 bits wide.
|
* Then ticker information indicate that:
|
||||||
|
* - counter frequency is between 250KHz and 8MHz for counters which are less than 32 bits wide
|
||||||
|
* - counter frequency is up to 100MHz for counters which are 32 bits wide
|
||||||
|
* - the counter is at least 16 bits wide.
|
||||||
*/
|
*/
|
||||||
void us_ticker_info_test(void);
|
void us_ticker_info_test(void);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,8 @@ extern "C" {
|
||||||
* Low level interface to the microsecond ticker of a target
|
* Low level interface to the microsecond ticker of a target
|
||||||
*
|
*
|
||||||
* # Defined behavior
|
* # 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
|
* * 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"
|
* * All behavior defined by the @ref hal_ticker_shared "ticker specification"
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue