Skip to content

Commit ff3d5f8

Browse files
Snevzornashif
authored andcommitted
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>
1 parent 240b560 commit ff3d5f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/pwm/pwm_nrf_sw.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ static int pwm_nrf_sw_set_cycles(const struct device *dev, uint32_t channel,
206206
nrf_rtc_task_trigger(rtc, NRF_RTC_TASK_STOP);
207207
} else {
208208
nrf_timer_task_trigger(timer, NRF_TIMER_TASK_STOP);
209+
#if NRF_TIMER_HAS_SHUTDOWN
210+
nrf_timer_task_trigger(timer, NRF_TIMER_TASK_SHUTDOWN);
211+
#endif
209212
}
210213

211214
return 0;

0 commit comments

Comments
 (0)