Context: I am making sample apps on the nRF54LM20DK ver 0.3.4 on ncs 3.2.1. I noticed that when trying to use the built in PWM shell that 100% duty cycle is not being set correctly when CONFIG_PM_DEVICE_RUNTIME is enabled.
DTS snippet:
&pwm20 {
status = "okay";
pinctrl-0 = <&pwm20_default>;
pinctrl-1 = <&pwm20_sleep>;
pinctrl-names = "default", "sleep";
};
...
pwm20_default: pwm20_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 1, 17)>,
<NRF_PSEL(PWM_OUT1, 1, 18)>;
nordic,invert;
};
};
pwm20_sleep: pwm20_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 1, 17)>,
<NRF_PSEL(PWM_OUT1, 1, 18)>;
low-power-enable;
};
};
Commands/Logs:
uart:~$ pwm usec pwm@d2000 0 30 30 [00:00:22.045,845] <dbg> pwm_nrfx: pwm_nrfx_set_cycles: channel 0, pulse 480, period 480, prescaler: 0. uart:~$ pwm usec pwm@d2000 0 30 15 [00:00:30.518,719] <dbg> pwm_nrfx: pwm_nrfx_set_cycles: channel 0, pulse 240, period 480, prescaler: 0. uart:~$ pwm usec pwm@d2000 0 30 0 [00:00:34.934,456] <dbg> pwm_nrfx: pwm_nrfx_set_cycles: channel 0, pulse 0, period 480, prescaler: 0.
prf.conf:
CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE_RUNTIME=y CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_LOG=y CONFIG_SHELL=y CONFIG_I2C_SHELL=y CONFIG_GPIO_SHELL=y CONFIG_FLASH_SHELL=y CONFIG_PWM_SHELL=y
PM_DEVICE_RUNTIME enabled

PM_DEVICE_RUNTIME disabled
