From afb5301cef6d06e5932dbc9bad64062bf9d4ca3c Mon Sep 17 00:00:00 2001 From: BooleanMattock <118489982+BooleanMattock@users.noreply.github.com> Date: Fri, 2 Dec 2022 20:21:40 -0500 Subject: [PATCH] Fix to Issue #7224 - tested --- ports/raspberrypi/common-hal/pwmio/PWMOut.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ports/raspberrypi/common-hal/pwmio/PWMOut.c b/ports/raspberrypi/common-hal/pwmio/PWMOut.c index e6f88f8894..f75c4b3451 100644 --- a/ports/raspberrypi/common-hal/pwmio/PWMOut.c +++ b/ports/raspberrypi/common-hal/pwmio/PWMOut.c @@ -236,14 +236,6 @@ extern void common_hal_pwmio_pwmout_set_duty_cycle(pwmio_pwmout_obj_t *self, uin } // compare_count is the CC register value, which should be TOP+1 for 100% duty cycle. pwm_set_chan_level(self->slice, self->ab_channel, compare_count); - // Wait for wrap so that we know our new cc value has been applied. Clear - // the internal interrupt and then wait for it to be set. Worst case, we - // wait a full cycle. - pwm_hw->intr = 1 << self->slice; - while ((pwm_hw->en & (1 << self->slice)) != 0 && - (pwm_hw->intr & (1 << self->slice)) == 0 && - !mp_hal_is_interrupted()) { - } } uint16_t common_hal_pwmio_pwmout_get_duty_cycle(pwmio_pwmout_obj_t *self) {