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: Fabian Pflug <fabian.pflug@grandcentrix.net>
This commit is contained in:
parent
ec42d825ec
commit
3c0a6058b5
|
@ -732,11 +732,11 @@ static void pwm_stm32_isr(const struct device *dev)
|
||||||
/* Still waiting for a complete capture */
|
/* Still waiting for a complete capture */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (cpt->overflows) {
|
if (cpt->overflows) {
|
||||||
LOG_ERR("counter overflow during PWM capture");
|
LOG_ERR("counter overflow during PWM capture");
|
||||||
status = -ERANGE;
|
status = -ERANGE;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cpt->continuous) {
|
if (!cpt->continuous) {
|
||||||
|
|
Loading…
Reference in a new issue