Issue: Instability in test results detected when testing https://github.com/ARMmbed/mbed-os/pull/10824
When computing 10ms period with duty cycle 10%, we try to measure 1ms only.
Thus we cannot use 1ms precision measurement(read_ms()).
It used to cause instability in test results.
fix: Compute PWM high state duration in micro seconds instead of milli seconds to avoid instability.
Issue: Instability in test results detected when testing https://github.com/ARMmbed/mbed-os/pull/10824 When computing 10ms period with duty cycle 10%, we try to measure 1ms only. Thus we cannot use 1ms precision measurement(read_ms()). It used to cause instability in test results.
fix: Compute PWM high state duration in micro seconds instead of milli seconds to avoid instability.