ThisThread::sleep_for is asserted when the PWM test case calls this API with IRQ masked, so wait_us is used to fix this issue as PWM testes to be executed with interrupt disabled to avoid context switch.

pull/12572/head
Rajkumar Kanagaraj 2020-03-31 17:14:49 +01:00
parent 9739b565b2
commit cbb15ad9ac
1 changed files with 2 additions and 2 deletions

View File

@ -127,11 +127,11 @@ void fpga_pwm_period_fill_test(PinName pin, uint32_t period_ms, uint32_t fill_pr
break;
}
ThisThread::sleep_for(period_ms);
wait_us(PERIOD_US(period_ms));
tester.io_metrics_start();
ThisThread::sleep_for(NUM_OF_PERIODS * period_ms);
wait_us(NUM_OF_PERIODS * PERIOD_US(period_ms));
tester.io_metrics_stop();
core_util_critical_section_exit();