Zephyr PWM and GPIO in System Off

Hi,

I am developing on a nRF52840dk. I control a LED2 (line P0.14) with PWM in normal operation and want to leave the LED2 ON when I go to System Off mode.

I tried setting the line to constant active with the Zephyr PWM driver by setting the pulse equal to period.

I tried setting the line to constant inactive with the Zephyr PWM driver by setting the pulse equal to 0 and then setting the active level with the GPIO driver.

In both cases the LED was off after going to System Off.

I can't find any obvious way to do what I want.

Parents Reply
  • Airat said:

    Interestingly, if I add nordic,invert; to pwm0_sleep then the LED is always off in System Off mode.

    Is there a way to control that behavior just before going to System Off? Or will I need to drop usage of the Zephyr PWM driver?  

    So it's not enough to set the desired level with/without nordic,invert; to pwm0_sleep ? You want to change it based on something at run-time?

Children
Related