CAF LED blinks on wake up event

Hi,

I use CAF LEDs with PWM. I have a timer that would make device wake up every 20 seconds with a CONFIG_CAF_POWER_MANAGER_TIMEOUT to make it sleep 2 seconds after waking up.

Every time the system wakes up from sleep, the LED will be turned on for a brief moment before turning off again, and I think it is because of the code below. This happens even though I manually turn off LEDs on a system wake up. Is there any way to prevent the blink from happening (either through my code or modifying the source code)? 

https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/caf/modules/leds.c#L207C32-L207C32

Best,

Kevin

Parents
  • Hello Kevin,

    If you assign a new LED effect on wake_up_event processing, the old effect would still be in use for time between wake_up_event processing and processing of the led_event turning off LEDs that is submitted by you.

    We would suggest assigning the new LED effect earlier (e.g. on power_down_event) to ensure that the LED effect is set before wake_up_event is processed.

    Regards,

    Elfving

Reply
  • Hello Kevin,

    If you assign a new LED effect on wake_up_event processing, the old effect would still be in use for time between wake_up_event processing and processing of the led_event turning off LEDs that is submitted by you.

    We would suggest assigning the new LED effect earlier (e.g. on power_down_event) to ensure that the LED effect is set before wake_up_event is processed.

    Regards,

    Elfving

Children
Related