Skip to content

Commit cbb15ad

Browse files
committed
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.
1 parent 9739b56 commit cbb15ad

File tree

1 file changed

+2
-2
lines changed
  • TESTS/mbed_hal_fpga_ci_test_shield/pwm

1 file changed

+2
-2
lines changed

TESTS/mbed_hal_fpga_ci_test_shield/pwm/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ void fpga_pwm_period_fill_test(PinName pin, uint32_t period_ms, uint32_t fill_pr
127127
break;
128128
}
129129

130-
ThisThread::sleep_for(period_ms);
130+
wait_us(PERIOD_US(period_ms));
131131

132132
tester.io_metrics_start();
133133

134-
ThisThread::sleep_for(NUM_OF_PERIODS * period_ms);
134+
wait_us(NUM_OF_PERIODS * PERIOD_US(period_ms));
135135

136136
tester.io_metrics_stop();
137137
core_util_critical_section_exit();

0 commit comments

Comments
 (0)