mirror of https://github.com/ARMmbed/mbed-os.git
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.
parent
9739b565b2
commit
cbb15ad9ac
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue