Commit 3c0a6058 authored by Fabian Pflug's avatar Fabian Pflug Committed by Carles Cufi
Browse files

drivers: pwm: stm32: Catch overflows in 2-channel capture



When not using 4 channel capture, overflows were never reported
to the application, because the check was in the
four_channel_capture_support branch.

Signed-off-by: default avatarFabian Pflug <fabian.pflug@grandcentrix.net>
parent ec42d825
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -732,12 +732,12 @@ static void pwm_stm32_isr(const struct device *dev)
			/* Still waiting for a complete capture */
			return;
		}
	}

	if (cpt->overflows) {
		LOG_ERR("counter overflow during PWM capture");
		status = -ERANGE;
	}
	}

	if (!cpt->continuous) {
		pwm_stm32_disable_capture(dev, cpt->channel);