mirror of https://github.com/ARMmbed/mbed-os.git
tests-mbed_hal-common_tickers: disable os tick while running test cases
It has been noticed on NRF51_DK board that occurrence of system tick have impact on test execution. NRF51_DK is a slow board with fast us ticker and handling of system tick interrupt takes about 250 us ticker ticks which have huge influence on interrupt tests where interrupt is set to <current count> + 100, 200, 500 ticks.pull/7009/head
parent
7d969326d6
commit
c18763bb41
|
@ -443,6 +443,8 @@ utest::v1::status_t us_ticker_setup(const Case *const source, const size_t index
|
|||
{
|
||||
intf = get_us_ticker_data()->interface;
|
||||
|
||||
OS_Tick_Disable();
|
||||
|
||||
intf->init();
|
||||
|
||||
prev_irq_handler = set_us_ticker_irq_handler(ticker_event_handler_stub);
|
||||
|
@ -459,6 +461,8 @@ utest::v1::status_t us_ticker_teardown(const Case * const source, const size_t p
|
|||
|
||||
prev_irq_handler = NULL;
|
||||
|
||||
OS_Tick_Enable();
|
||||
|
||||
return greentea_case_teardown_handler(source, passed, failed, reason);
|
||||
}
|
||||
|
||||
|
@ -467,6 +471,8 @@ utest::v1::status_t lp_ticker_setup(const Case *const source, const size_t index
|
|||
{
|
||||
intf = get_lp_ticker_data()->interface;
|
||||
|
||||
OS_Tick_Disable();
|
||||
|
||||
intf->init();
|
||||
|
||||
prev_irq_handler = set_lp_ticker_irq_handler(ticker_event_handler_stub);
|
||||
|
@ -483,6 +489,8 @@ utest::v1::status_t lp_ticker_teardown(const Case * const source, const size_t p
|
|||
|
||||
prev_irq_handler = NULL;
|
||||
|
||||
OS_Tick_Enable();
|
||||
|
||||
return greentea_case_teardown_handler(source, passed, failed, reason);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue