drivers: pwm: pwm_nrf_sw: use shutdown task if available

Add a workaround for NRF52 anomaly 78: "High current consumption when
using timer STOP task only. Use the SHUTDOWN task instead."

Signed-off-by: Sven Depoorter <svndepoorter@gmail.com>
This commit is contained in:
Sven Depoorter 2025-05-29 22:05:06 +02:00 committed by Anas Nashif
parent 240b56008c
commit ff3d5f89a2

View File

@ -206,6 +206,9 @@ static int pwm_nrf_sw_set_cycles(const struct device *dev, uint32_t channel,
nrf_rtc_task_trigger(rtc, NRF_RTC_TASK_STOP);
} else {
nrf_timer_task_trigger(timer, NRF_TIMER_TASK_STOP);
#if NRF_TIMER_HAS_SHUTDOWN
nrf_timer_task_trigger(timer, NRF_TIMER_TASK_SHUTDOWN);
#endif
}
return 0;