WP7702 how to stay in suspended mode (active sleep, USB-SS) until timer expires

Hi all, with a WP7702, I want to exit out of suspended mode (USB-SS, active sleep) on the expiration of a timer. So far in my tests, just having an active timer pops me out of active sleep right away, without waiting for the timer to expire. I’m using le_timer_*. I had high hopes for le_timer_SetWakeUp parameter, either true or false, but either way, having a timer active seems to act as a wake_lock. Does anyone know, is it possible to do what I’m trying, to stay in active sleep until an le_timer expires? If not, is there a different approach to this problem?

I just have a quick trial on WP76 with FW 13 (legato 19.2.0), I don’t see problem with the following timer application.
This application will wake up the module every 20 seconds.
During the selective suspend mode (USB cable disconnected from PC), there is no response on UART console.
And the there is print out “INSIDE TIMER” in logread every 20 seconds in UART console.


#include "legato.h"
#include <stdio.h>



#define TIMER_INTERVAL_SEC 20
#define TIMER_INTERVAL_uSEC 100000


static void tmrHandler(le_timer_Ref_t timerRef) {
	 LE_INFO("INSIDE TIMER");

}
COMPONENT_INIT
{


    le_clk_Time_t clk = { .sec = TIMER_INTERVAL_SEC, .usec = TIMER_INTERVAL_uSEC };
    le_timer_Ref_t adxlPollingTimer = le_timer_Create("ADXL_TIMER");
    le_timer_SetRepeat(adxlPollingTimer, 1000);
    le_timer_SetInterval(adxlPollingTimer, clk);
    le_timer_SetHandler(adxlPollingTimer, tmrHandler);
    le_timer_Start(adxlPollingTimer);


	LE_INFO("Hello, world. 123");


}
root@fx30:~# logread -f &
root@fx30:~# app status
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[running] cellNetService
[running] dataConnectionService
[running] fwupdateService
[running] gpioService
[running] modemService
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
[running] hello1
root@fx30:~# Jan  6 08:08:29 fx30 user.info Legato:  INFO | hello1[2046]/hello1Component T=main | hello1Component.c tmrHandler() 11 | INSIDE TIMER
Jan  6 08:08:33 fx30 user.info kernel: [  174.626324] msm_otg 78d9000.usb: Avail curr from USB = 2
Jan  6 08:08:33 fx30 user.info kernel: [  174.626417] msm_hsusb msm_hsusb: CI13XXX_CONTROLLER_SUSPEND_EVENT received
Jan  6 08:08:33 fx30 user.info kernel: [  174.626626] android_work: android_work: sent uevent USB_STATE=SUSPENDED
Jan  6 08:08:33 fx30 user.info kernel: [  174.632176] msm_otg 78d9000.usb: USB in low power mode
Jan  6 08:08:33 fx30 user.info kernel: [  174.632258] PM: suspend entry 1980-01-06 00:08:33.066951446 UTC
Jan  6 08:08:51 fx30 user.info kernel: [  174.632275] PM: Syncing filesystems ... done.
Jan  6 08:08:51 fx30 user.debug kernel: [  174.659977] PM: Preparing system for mem sleep
Jan  6 08:08:51 fx30 user.warn kernel: [  174.664583] Freezing user space processes ... (elapsed 0.009 seconds) done.
Jan  6 08:08:51 fx30 user.warn kernel: [  174.673942] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
Jan  6 08:08:51 fx30 user.debug kernel: [  174.677285] PM: Entering mem sleep
Jan  6 08:08:51 fx30 user.warn kernel: [  174.677318] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:08:51 fx30 user.info kernel: [  174.690072] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:08:51 fx30 user.debug kernel: [  174.711722] wm8944_suspend - START
Jan  6 08:08:51 fx30 user.debug kernel: [  174.712843] wm8944_suspend - OK
Jan  6 08:08:51 fx30 user.info kernel: [  174.722983] msm_hsic_host 7c00000.hsic_host: HSIC-USB in low power mode
Jan  6 08:08:51 fx30 user.info kernel: [  174.724691] PM: suspend of devices complete after 45.693 msecs
Jan  6 08:08:51 fx30 user.info Legato:  INFO | hello1[2046]/hello1Component T=main | hello1Component.c tmrHandler() 11 | INSIDE TIMER
Jan  6 08:08:51 fx30 user.info kernel: [  174.729081] PM: late suspend of devices complete after 4.343 msecs
Jan  6 08:08:51 fx30 user.info kernel: [  174.734049] PM: noirq suspend of devices complete after 4.917 msecs
Jan  6 08:08:51 fx30 user.info kernel: [  174.734137] suspend ns:     174734121259      suspend cycles:       4118124450
Jan  6 08:08:51 fx30 user.info kernel: [  174.734121] CPU0:msm_cpu_pm_enter_sleep mode:3 during suspend
Jan  6 08:08:51 fx30 user.info kernel: [  174.734121] resume cycles:       4456177042
Jan  6 08:08:51 fx30 user.info kernel: [  174.736907] PM: noirq resume of devices complete after 2.147 msecs
Jan  6 08:08:51 fx30 user.info kernel: [  174.737569] sierra_rtc_wake
Jan  6 08:08:51 fx30 user.info kernel: [  174.737577] sierra_rtc_wake: sierra_rtc_wake
Jan  6 08:08:51 fx30 user.info kernel: [  174.740409] PM: early resume of devices complete after 2.214 msecs
Jan  6 08:08:51 fx30 user.info kernel: [  174.745314] msm_hsic_host 7c00000.hsic_host: HSIC-USB exited from low power mode
Jan  6 08:08:51 fx30 user.info kernel: [  174.920864] usb 1-1: reset high-speed USB device number 2 using msm_hsic_host
Jan  6 08:08:51 fx30 user.info kernel: [  175.370856] usb 1-1.1: reset full-speed USB device number 3 using msm_hsic_host
Jan  6 08:08:51 fx30 user.info kernel: [  175.560766] usb 1-1.2: reset high-speed USB device number 4 using msm_hsic_host
Jan  6 08:08:51 fx30 user.info kernel: [  175.773049] PM: resume of devices complete after 1032.588 msecs
Jan  6 08:08:51 fx30 user.debug kernel: [  175.774870] PM: Finishing wakeup.
Jan  6 08:08:51 fx30 user.warn kernel: [  175.774894] Restarting tasks ... done.
Jan  6 08:08:51 fx30 user.info kernel: [  175.793546] sierra_pm_resume
Jan  6 08:08:51 fx30 user.info kernel: [  175.795217] PM: suspend exit 1980-01-06 00:08:51.836804355 UTC
Jan  6 08:08:51 fx30 user.info kernel: [  175.795862] PM: suspend entry 1980-01-06 00:08:51.837452793 UTC
Jan  6 08:08:51 fx30 user.info kernel: [  175.795889] PM: Syncing filesystems ... done.
Jan  6 08:08:51 fx30 user.debug kernel: [  175.802874] PM: Preparing system for mem sleep
Jan  6 08:09:06 fx30 user.warn kernel: [  175.859371] Freezing user space processes ... (elapsed 0.008 seconds) done.
Jan  6 08:09:06 fx30 user.warn kernel: [  175.868383] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
Jan  6 08:09:06 fx30 user.debug kernel: [  175.871915] PM: Entering mem sleep
Jan  6 08:09:06 fx30 user.warn kernel: [  175.871947] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:09:06 fx30 user.info kernel: [  175.882841] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:09:06 fx30 user.debug kernel: [  175.901691] wm8944_suspend - START
Jan  6 08:09:06 fx30 user.debug kernel: [  175.902816] wm8944_suspend - OK
Jan  6 08:09:06 fx30 user.info kernel: [  175.909356] msm_hsic_host 7c00000.hsic_host: HSIC-USB in low power mode
Jan  6 08:09:06 fx30 user.info kernel: [  175.911433] PM: suspend of devices complete after 37.570 msecs
Jan  6 08:09:06 fx30 user.info kernel: [  175.915640] PM: late suspend of devices complete after 4.153 msecs
Jan  6 08:09:06 fx30 user.info kernel: [  175.920219] PM: noirq suspend of devices complete after 4.532 msecs
Jan  6 08:09:06 fx30 user.info kernel: [  175.920308] suspend ns:     175920290741      suspend cycles:       4478951496
Jan  6 08:09:06 fx30 user.info kernel: [  175.920290] CPU0:msm_cpu_pm_enter_sleep mode:3 during suspend
Jan  6 08:09:06 fx30 user.info kernel: [  175.920290] resume cycles:       4746225557
Jan  6 08:09:06 fx30 user.info kernel: [  175.922377] PM: noirq resume of devices complete after 1.748 msecs
Jan  6 08:09:06 fx30 user.info kernel: [  175.924542] PM: early resume of devices complete after 1.745 msecs
Jan  6 08:09:06 fx30 user.info kernel: [  175.928461] msm_hsic_host 7c00000.hsic_host: HSIC-USB exited from low power mode
Jan  6 08:09:06 fx30 user.info kernel: [  176.100591] usb 1-1: reset high-speed USB device number 2 using msm_hsic_host
Jan  6 08:09:06 fx30 user.info kernel: [  176.550516] usb 1-1.1: reset full-speed USB device number 3 using msm_hsic_host
Jan  6 08:09:06 fx30 user.info kernel: [  176.740582] usb 1-1.2: reset high-speed USB device number 4 using msm_hsic_host
Jan  6 08:09:06 fx30 user.info kernel: [  176.953381] PM: resume of devices complete after 1028.800 msecs
Jan  6 08:09:06 fx30 user.debug kernel: [  176.954930] PM: Finishing wakeup.
Jan  6 08:09:06 fx30 user.warn kernel: [  176.954950] Restarting tasks ... done.
Jan  6 08:09:06 fx30 user.info kernel: [  176.973112] sierra_pm_resume
Jan  6 08:09:06 fx30 user.info kernel: [  176.974935] PM: suspend exit 1980-01-06 00:09:06.937042318 UTC
Jan  6 08:09:06 fx30 user.info kernel: [  176.975235] PM: suspend entry 1980-01-06 00:09:06.937354557 UTC
Jan  6 08:09:06 fx30 user.info kernel: [  176.975262] PM: Syncing filesystems ... done.
Jan  6 08:09:06 fx30 user.debug kernel: [  176.982713] PM: Preparing system for mem sleep
Jan  6 08:09:11 fx30 user.info Legato:  INFO | hello1[2046]/hello1Component T=main | hello1Component.c tmrHandler() 11 | INSIDE TIMER
Jan  6 08:09:11 fx30 user.warn kernel: [  177.039066] Freezing user space processes ... (elapsed 0.009 seconds) done.
Jan  6 08:09:11 fx30 user.warn kernel: [  177.048194] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
Jan  6 08:09:11 fx30 user.debug kernel: [  177.051500] PM: Entering mem sleep
Jan  6 08:09:11 fx30 user.warn kernel: [  177.051527] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:09:11 fx30 user.info kernel: [  177.063672] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:09:11 fx30 user.debug kernel: [  177.077826] wm8944_suspend - START
Jan  6 08:09:11 fx30 user.debug kernel: [  177.078918] wm8944_suspend - OK
Jan  6 08:09:11 fx30 user.info kernel: [  177.105377] msm_hsic_host 7c00000.hsic_host: HSIC-USB in low power mode
Jan  6 08:09:11 fx30 user.info kernel: [  177.107098] PM: suspend of devices complete after 54.177 msecs
Jan  6 08:09:11 fx30 user.info kernel: [  177.111645] PM: late suspend of devices complete after 4.278 msecs
Jan  6 08:09:11 fx30 user.info kernel: [  177.115553] PM: noirq suspend of devices complete after 3.868 msecs
Jan  6 08:09:11 fx30 user.info kernel: [  177.115626] suspend ns:     177115609494      suspend cycles:       4769175677
Jan  6 08:09:11 fx30 user.info kernel: [  177.115609] CPU0:msm_cpu_pm_enter_sleep mode:3 during suspend
Jan  6 08:09:11 fx30 user.info kernel: [  177.115609] resume cycles:       4840107070
Jan  6 08:09:11 fx30 user.info kernel: [  177.117824] PM: noirq resume of devices complete after 1.744 msecs
Jan  6 08:09:11 fx30 user.info kernel: [  177.118390] sierra_rtc_wake
Jan  6 08:09:11 fx30 user.info kernel: [  177.118398] sierra_rtc_wake: sierra_rtc_wake
Jan  6 08:09:11 fx30 user.info kernel: [  177.120964] PM: early resume of devices complete after 2.050 msecs
Jan  6 08:09:11 fx30 user.info kernel: [  177.124898] msm_hsic_host 7c00000.hsic_host: HSIC-USB exited from low power mode
Jan  6 08:09:11 fx30 user.info kernel: [  177.299933] usb 1-1: reset high-speed USB device number 2 using msm_hsic_host
Jan  6 08:09:11 fx30 user.info kernel: [  177.750508] usb 1-1.1: reset full-speed USB device number 3 using msm_hsic_host
Jan  6 08:09:11 fx30 user.info kernel: [  177.940282] usb 1-1.2: reset high-speed USB device number 4 using msm_hsic_host
Jan  6 08:09:11 fx30 user.info kernel: [  178.143939] PM: resume of devices complete after 1022.936 msecs
Jan  6 08:09:11 fx30 user.debug kernel: [  178.145505] PM[  179.427198] PM: Some devices failed to suspend, or early wake event detected
: Finishing wakeup.
Jan  6 08:09:11 fx30 user.warn kernel: [  178.145529] Restarting tasks ... done.
Jan  6 08:09:11 fx30 user.info kernel: [  178.164389] sierra_pm_resume
Jan  6 08:09:11 fx30 user.info kernel: [  178.165406] PM: suspend exit 1980-01-06 00:09:11.825591463 UTC
Jan  6 08:09:11 fx30 user.info kernel: [  178.165510] PM: suspend entry 1980-01-06 00:09:11.825711046 UTC
Jan  6 08:09:11 fx30 user.info kernel: [  178.165535] PM: Syncing filesystems ... done.
Jan  6 08:09:11 fx30 user.debug kernel: [  178.176657] PM: Preparing system for mem sleep
[  179.540202] Freezing of tasks aborted after 0.006 seconds
[  179.651943] PM: Some devices failed to suspend, or early wake event detected
[  179.748731] Freezing of tasks aborted after 0.006 seconds
Jan  6 08:09:14 fx30 user.warn kernel: [  178.215371] Freezing user space processes ... (elapsed 0.007 seconds) done.
Jan  6 08:09:14 fx30 user.warn kernel: [  178.223299] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
Jan  6 08:09:14 fx30 user.debug kernel: [  178.226362] PM: Entering mem sleep
Jan  6 08:09:14 fx30 user.warn kernel: [  178.226396] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:09:14 fx30 user.info kernel: [  178.236040] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:09:14 fx30 user.debug kernel: [  178.253151] wm8944_suspend - START
Jan  6 08:09:14 fx30 user.debug kernel: [  178.254277] wm8944_suspend - OK
Jan  6 08:09:14 fx30 user.info kernel: [  178.278362] msm_hsic_host 7c00000.hsic_host: HSIC-USB in low power mode
Jan  6 08:09:14 fx30 user.info kernel: [  178.280447] PM: suspend of devices complete afte[  181.018297] Freezing of tasks aborted after 0.007 secondsr 52.559 msecs
Jan  6 08:09:14 fx30 user.info kernel: [  178.28
4545] PM: late suspend of devices complete after 4.056 msecs
Jan  6 08:09:14 fx30 user.info kernel: [  178.288951] PM: noirq suspend of devices complete after 4.361 msecs
Jan  6 08:09:14 fx30 user.info kernel: [  178.289035] suspend ns:     178289019185      suspend cycles:       4862636536
Jan  6 08:09:14 fx30 user.info kernel: [  178.289019] CPU0:msm_cpu_pm_enter_sleep mode:3 during suspend
Jan  6 08:09:14 fx30 user.info kernel: [  178.289019] resume cycles:       4889852135
Jan  6 08:09:14 fx30 user.info kernel: [  178.291736] PM: noirq resume of devices complete after 1.706 msecs
Jan  6 08:09:14 fx30 user.info kernel: [  178.293895] PM: early resume of devices complete after 1.741 msecs
Jan  6 08:09:14 fx30 user.info kernel: [  178.297096] msm_hsic_host 7c00000.hsic_host: HSIC-USB exited from low power mode
Jan  6 08:09:14 fx30 user.info kernel: [  178.469650] usb 1-1: reset high-speed USB device number 2 using msm_hsic_host
Jan  6 08:09:14 fx30 user.info kernel: [  178.920262] usb 1-1.1: reset full-speed USB device number 3 using msm_hsic_host
Jan  6 08:09:14 fx30 user.info kernel: [  179.110160] usb 1-1.2: reset high-speed USB device number 4 using msm_hsic_host
Jan  6 08:09:14 fx30 user.info kernel: [  179.311064] PM: resume of devices complete after 1017.130 msecs
Jan  6 08:09:14 fx30 user.debug kernel: [  179.312679] PM: Finishing wakeup.
Jan  6 08:09:14 fx30 user.warn kernel: [  179.312700] Restarting tasks ... done.
Jan  6 08:09:14 fx30 user.info kernel: [  179.331493] sierra_pm_resume
Jan  6 08:09:14 fx30 user.info kernel: [  179.332456] PM: suspend exit 1980-01-06 00:09:14.410125681 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.332779] PM: suspend entry 1980-01-06 00:09:14.410457035 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.332807] PM: Syncing filesystems ... done.
Jan  6 08:09:14 fx30 user.debug kernel: [  179.387270] PM: Preparing system for mem sleep
Jan  6 08:09:14 fx30 user.warn kernel: [  179.391932] Freezing user space processes ... (elapsed 0.007 seconds) done.
Jan  6 08:09:14 fx30 user.warn kernel: [  179.399680] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
Jan  6 08:09:14 fx30 user.debug kernel: [  179.402487] PM: Entering mem sleep
Jan  6 08:09:14 fx30 user.warn kernel: [  179.402515] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:09:14 fx30 user.info kernel: [  179.412286] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:09:14 fx30 user.info kernel: [  179.426700] PM: Wakeup pending, aborting suspend
Jan  6 08:09:14 fx30 user.info kernel: [  179.426798] active wakeup source: [timerfd]
Jan  6 08:09:14 fx30 user.info kernel: [  179.426817] active wakeup source: [timerfd]
Jan  6 08:09:14 fx30 user.err kernel: [  179.427198] PM: Some devices failed to suspend, or early wake event detected
Jan  6 08:09:14 fx30 user.info kernel: [  179.435015] PM: resume of devices complete after 7.774 msecs
Jan  6 08:09:14 fx30 user.debug kernel: [  179.454184] PM: Finishing wakeup.
Jan  6 08:09:14 fx30 user.warn kernel: [  179.454205] Restarting tasks ... done.
Jan  6 08:09:14 fx30 user.info kernel: [  179.484967] sierra_pm_resume
Jan  6 08:09:14 fx30 user.info kernel: [  179.485321] Abort: Pending Wakeup Sources: [timerfd] [timerfd]
Jan  6 08:09:14 fx30 user.info kernel: [  179.485740] PM: suspend exit 1980-01-06 00:09:14.563413181 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.486014] PM: suspend entry 1980-01-06 00:09:14.563513493 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.486038] PM: Syncing filesystems ... done.
Jan  6 08:09:14 fx30 user.debug kernel: [  179.495763] PM: Preparing system for mem sleep
Jan  6 08:09:14 fx30 user.warn kernel: [  179.533575] Freezing user space processes ...
Jan  6 08:09:14 fx30 user.info kernel: [  179.539532] PM: Wakeup pending, aborting suspend
Jan  6 08:09:14 fx30 user.info kernel: [  179.539934] last active wakeup source: eventpoll
Jan  6 08:09:14 fx30 user.warn kernel: [  179.540177]
Jan  6 08:09:14 fx30 user.err kernel: [  179.540202] Freezing of tasks aborted after 0.006 seconds
Jan  6 08:09:14 fx30 user.warn kernel: [  179.544572] Restarting tasks ... done.
Jan  6 08:09:14 fx30 user.inf[  181.149887] dpm_run_callback(): platform_pm_suspend+0x0/0x38 returns -16
[  181.149915] PM: Device alarmtimer failed to suspend: error -16
[  181.150551] PM: Some devices failed to suspend, or early wake event detected
o kernel: [  179.559550] sierra_pm_resume
Jan  6 08:09:14 fx30 user.info kernel: [  179.559863] Abort: Last active Wakeup Source: eventpoll
Jan  6 08:09:14 fx30 user.info kernel: [  179.560278] PM: suspend exit 1980-01-06 00:09:14.637951045 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.560552] PM: suspend entry 1980-01-06 00:09:14.638053441 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.560576] PM: Syncing filesystems ... done.
Jan  6 08:09:14 fx30 user.debug kernel: [  179.581331] PM: Preparing system for mem sleep
Jan  6 08:09:14 fx30 user.warn kernel: [  179.608169] Freezing user space processes ... (elapsed 0.007 seconds) done.
Jan  6 08:09:14 fx30 user.warn kernel: [  179.615951] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
Jan  6 08:09:14 fx30 user.debug kernel: [  179.618749] PM: Entering mem sleep
Jan  6 08:09:14 fx30 user.warn kernel: [  179.618776] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:09:14 fx30 user.info kernel: [  179.628402] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:09:14 fx30 user.info kernel: [  179.651516] PM: Wakeup pending, aborting suspend
Jan  6 08:09:14 fx30 user.info kernel: [  179.651600] active wakeup source: [timerfd]
Jan  6 08:09:14 fx30 user.err kernel: [  179.651943] PM: Some devices failed to suspend, or early wake event detected
Jan  6 08:09:14 fx30 user.info kernel: [  179.660662] PM: resume of devices complete after 8.677 msecs
Jan  6 08:09:14 fx30 user.debug kernel: [  179.668205] PM: Finishing wakeup.
Jan  6 08:09:14 fx30 user.warn kernel: [  179.668226] Restarting tasks ... done.
Jan  6 08:09:14 fx30 user.info kernel: [  179.691102] sierra_pm_resume
Jan  6 08:09:14 fx30 user.info kernel: [  179.691414] Abort: Pending Wakeup Sources: [timerfd]
Jan  6 08:09:14 fx30 user.info kernel: [  179.691836] PM: suspend exit 1980-01-06 00:09:14.769507660 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.692136] PM: suspend entry 1980-01-06 00:09:14.769608701 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.692161] PM: Syncing filesystems ... done.
Jan  6 08:09:14 fx30 user.debug kernel: [  179.696234] PM: Preparing system for mem sleep
Jan  6 08:09:14 fx30 user.warn kernel: [  179.742388] Freezing user space processes ...
Jan  6 08:09:14 fx30 user.info kernel: [  179.748054] PM: Wakeup pending, aborting suspend
Jan  6 08:09:14 fx30 user.info kernel: [  179.748456] last active wakeup source: eventpoll
Jan  6 08:09:14 fx30 user.warn kernel: [  179.748706]
Jan  6 08:09:14 fx30 user.err kernel: [  179.748731] Freezing of tasks aborted after 0.006 seconds
Jan  6 08:09:14 fx30 user.warn kernel: [  179.753375] Restarting tasks ... done.
Jan  6 08:09:14 fx30 user.info kernel: [  179.769553] sierra_pm_resume
Jan  6 08:09:14 fx30 user.info kernel: [  179.769866] Abort: Last active Wakeup Source: eventpoll
Jan  6 08:09:14 fx30 user.info kernel: [  179.770275] PM: suspend exit 1980-01-06 00:09:14.847946931 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.770551] PM: suspend entry 1980-01-06 00:09:14.848048181 UTC
Jan  6 08:09:14 fx30 user.info kernel: [  179.770575] PM: Syncing filesystems ... done.
Jan  6 08:09:14 fx30 user.debug kernel: [  179.774667] PM: Preparing system for mem sleep
Jan  6 08:09:29 fx30 user.warn kernel: [  179.818405] Freezing user space processes ... (elapsed 0.009 seconds) done.
Jan  6 08:09:29 fx30 user.warn kernel: [  179.827794] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
Jan  6 08:09:29 fx30 user.debug kernel: [  179.831192] PM: Entering mem sleep
Jan  6 08:09:29 fx30 user.warn kernel: [  179.831224] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:09:29 fx30 user.info kernel: [  179.841530] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:09:29 fx30 user.debug kernel: [  179.872010] wm8944_suspend - START
Jan  6 08:09:29 fx30 user.debug kernel: [  179.873159] wm8944_suspend - OK
Jan  6 08:09:29 fx30 user.info kernel: [  179.879953] msm_hsic_host 7c00000.hsic_host: HSIC-USB in low power mode
Jan  6 08:09:29 fx30 user.info kernel: [  179.881682] PM: suspend of devices complete after 48.726 msecs
Jan  6 08:09:29 fx30 user.info kernel: [  179.885925] PM: late suspend of devices complete after 3.967 msecs
Jan  6 08:09:29 fx30 user.info kernel: [  179.890391] PM: noirq suspend of devices complete after 4.421 msecs
Jan  6 08:09:29 fx30 user.info kernel: [  179.890474] suspend ns:     179890457054      suspend cycles:       4920599742
Jan  6 08:09:29 fx30 user.info kernel: [  179.890457] CPU0:msm_cpu_pm_enter_sleep mode:3 during suspend
Jan  6 08:09:29 fx30 user.info kernel: [  179.890457] resume cycles:       5174286474
Jan  6 08:09:29 fx30 user.info kernel: [  179.892902] PM: noirq resume of devices complete after 1.713 msecs
Jan  6 08:09:29 fx30 user.info kernel: [  179.895063] PM: early resume of devices complete after 1.743 msecs
Jan  6 08:09:29 fx30 user.info kernel: [  179.899385] msm_hsic_host 7c00000.hsic_host: HSIC-USB exited from low power mode
Jan  6 08:09:29 fx30 user.info kernel: [  180.080349] usb 1-1: reset high-speed USB device number 2 using msm_hsic_host
Jan  6 08:09:29 fx30 user.info kernel: [  180.530364] usb 1-1.1: reset full-speed USB device number 3 using msm_hsic_host
Jan  6 08:09:29 fx30 user.info kernel: [  180.720233] usb 1-1.2: reset high-speed USB device number 4 using msm_hsic_host
Jan  6 08:09:29 fx30 user.info kernel: [  180.927659] PM: resume of devices complete after 1032.550 msecs
Jan  6 08:09:29 fx30 user.debug kernel: [  180.929967] PM: Finishing wakeup.
Jan  6 08:09:29 fx30 user.warn kernel: [  180.929992] Restarting tasks ... done.
Jan  6 08:09:29 fx30 user.info kernel: [  180.952673] sierra_pm_resume
Jan  6 08:09:29 fx30 user.info kernel: [  180.953668] PM: suspend exit 1980-01-06 00:09:29.244187915 UTC
Jan  6 08:09:29 fx30 user.info kernel: [  180.953977] PM: suspend entry 1980-01-06 00:09:29.244505050 UTC
Jan  6 08:09:29 fx30 user.info kernel: [  180.954004] PM: Syncing filesystems ... done.
Jan  6 08:09:29 fx30 user.debug kernel: [  180.964646] PM: Preparing system for mem sleep
Jan  6 08:09:29 fx30 user.warn kernel: [  181.010496] Freezing user space processes ...
Jan  6 08:09:29 fx30 user.info kernel: [  181.017292] PM: Wakeup pending, aborting suspend
Jan  6 08:09:29 fx30 user.info kernel: [  181.017930] last active wakeup source: eventpoll
Jan  6 08:09:29 fx30 user.warn kernel: [  181.018268]
Jan  6 08:09:29 fx30 user.err kernel: [  181.018297] Freezing of tasks aborted after 0.007 seconds
Jan  6 08:09:29 fx30 user.warn kernel: [  181.030896] Restarting tasks ... done.
Jan  6 08:09:29 fx30 user.info kernel: [  181.057333] sierra_pm_resume
Jan  6 08:09:29 fx30 user.info kernel: [  181.057814] Abort: Last active Wakeup Source: eventpoll
Jan  6 08:09:29 fx30 user.info kernel: [  181.058300] PM: suspend exit 1980-01-06 00:09:29.348817446 UTC
Jan  6 08:09:29 fx30 user.info kernel: [  181.058593] PM: suspend entry 1980-01-06 00:09:29.349120675 UTC
Jan  6 08:09:29 fx30 user.info kernel: [  181.058620] PM: Syncing filesystems ... done.
Jan  6 08:09:29 fx30 user.debug kernel: [  181.065043] PM: Preparing system for mem sleep
Jan  6 08:09:30 fx30 user.warn kernel: [  181.108492] Freezing user space processes ... (elapsed 0.009 seconds) done.
Jan  6 08:09:30 fx30 user.warn kernel: [  181.117638] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
Jan  6 08:09:30 fx30 user.debug kernel: [  181.121030] PM: Entering mem sleep
Jan  6 08:09:30 fx30 user.warn kernel: [  181.121062] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:09:30 fx30 user.info kernel: [  181.131362] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:09:30 fx30 user.err kernel: [  181.149887] dpm_run_callback(): platform_pm_suspend+0x0/0x38 returns -16
Jan  6 08:09:30 fx30 user.err kernel: [  181.149915] PM: Device alarmtimer failed to suspend: error -16
Jan  6 08:09:30 fx30 user.err kernel: [  181.150551] PM: Some devices failed to suspend, or early wake event detected
Jan  6 08:09:30 fx30 user.info kernel: [  181.269677] usb 1-1: reset high-speed USB device number 2 using msm_hsic_host
Jan  6 08:09:30 fx30 user.info kernel: [  181.720334] usb 1-1.1: reset full-speed USB device number 3 using msm_hsic_host
Jan  6 08:09:30 fx30 user.info kernel: [  181.910227] usb 1-1.2: reset high-speed USB device number 4 using msm_hsic_host
Jan  6 08:09:30 fx30 user.info Legato:  INFO | hello1[2046]/hello1Component T=main | hello1Component.c tmrHandler() 11 | INSIDE TIMER
Jan  6 08:09:30 fx30 user.info kernel: [  182.123223] PM: resume of devices complete after 972.628 msecs
Jan  6 08:09:30 fx30 user.debug kernel: [  182.143538] PM: Finishing wakeup.
Jan  6 08:09:30 fx30 user.warn kernel: [  182.143562] Restarting tasks ... done.
Jan  6 08:09:30 fx30 user.info kernel: [  182.169858] sierra_pm_resume
Jan  6 08:09:30 fx30 user.info kernel: [  182.170346] Abort: Some devices failed to suspend, or early wake event detected
Jan  6 08:09:30 fx30 user.info kernel: [  182.170834] PM: suspend exit 1980-01-06 00:09:30.461351768 UTC
Jan  6 08:09:51 fx30 user.info kernel: [  183.150078] PM: suspend entry 1980-01-06 00:09:31.440591195 UTC
Jan  6 08:09:51 fx30 user.info kernel: [  183.150110] PM: Syncing filesystems ... done.
Jan  6 08:09:51 fx30 user.debug kernel: [  183.152763] PM: Preparing system for mem sleep
Jan  6 08:09:51 fx30 user.warn kernel: [  183.155081] Freezing user space processes ... (elapsed 0.008 seconds) done.
Jan  6 08:09:51 fx30 user.warn kernel: [  183.164078] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
Jan  6 08:09:51 fx30 user.debug kernel: [  183.167412] PM: Entering mem sleep
Jan  6 08:09:51 fx30 user.warn kernel: [  183.167443] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:09:51 fx30 user.info kernel: [  183.177608] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:09:51 fx30 user.debug kernel: [  183.208716] wm8944_suspend - START
Jan  6 08:09:51 fx30 user.debug kernel: [  183.209858] wm8944_suspend - OK
Jan  6 08:09:51 fx30 user.info kernel: [  183.216422] msm_hsic_host 7c00000.hsic_host: HSIC-USB in low power mode
Jan  6 08:09:51 fx30 user.info Legato:  INFO | hello1[2046]/hello1Component T=main | hello1Component.c tmrHandler() 11 | INSIDE TIMER
Jan  6 08:09:51 fx30 user.info kernel: [  183.218191] PM: suspend of devices complete after 48.716 msecs
Jan  6 08:09:51 fx30 user.info kernel: [  183.222927] PM: late suspend of devices complete after 4.458 msecs
Jan  6 08:09:51 fx30 user.info kernel: [  183.227492] PM: noirq suspend of devices complete after 4.517 msecs
Jan  6 08:09:51 fx30 user.info kernel: [  183.227584] suspend ns:     183227566126      suspend cycles:       5238358968
Jan  6 08:09:51 fx30 user.info kernel: [  183.227566] CPU0:msm_cpu_pm_enter_sleep mode:3 during suspend
Jan  6 08:09:51 fx30 user.info kernel: [  183.227566] resume cycles:       5608174652
Jan  6 08:09:51 fx30 user.info kernel: [  183.230478] PM: noirq resume of devices complete after 2.279 msecs
Jan  6 08:09:51 fx30 user.info kernel: [  183.231137] sierra_rtc_wake
Jan  6 08:09:51 fx30 user.info kernel: [  183.231145] sierra_rtc_wake: sierra_rtc_wake
Jan  6 08:09:51 fx30 user.info kernel: [  183.233806] PM: early resume of devices complete after 2.039 msecs
Jan  6 08:09:51 fx30 user.info kernel: [  183.239206] msm_hsic_host 7c00000.hsic_host: HSIC-USB exited from low power mode
Jan  6 08:09:51 fx30 user.info kernel: [  183.420179] usb 1-1: reset high-speed USB device number 2 using msm_hsic_host
Jan  6 08:09:51 fx30 user.info kernel: [  183.870179] usb 1-1.1: reset full-speed USB device number 3 using msm_hsic_host
Jan  6 08:09:51 fx30 user.info kernel: [  184.060025] usb 1-1.2: reset high-speed USB device number 4 using msm_hsic_host
Jan  6 08:09:51 fx30 user.info kernel: [  184.274792] PM: resume of devices complete after 1040.938 msecs
Jan  6 08:09:51 fx30 user.debug kernel: [  184.276608] PM: Finishing wakeup.
Jan  6 08:09:51 fx30 user.warn kernel: [  184.276632] Restarting tasks ... done.
Jan  6 08:09:51 fx30 user.info kernel: [  184.291696] sierra_pm_resume
Jan  6 08:09:51 fx30 user.info kernel: [  184.292634] PM: suspend exit 1980-01-06 00:09:51.844387958 UTC
Jan  6 08:09:51 fx30 user.info kernel: [  184.293061] PM: suspend entry 1980-01-06 00:09:51.844821343 UTC
Jan  6 08:09:51 fx30 user.info kernel: [  184.293088] PM: Syncing filesystems ... done.
Jan  6 08:09:51 fx30 user.debug kernel: [  184.298309] PM: Preparing system for mem sleep
Jan  6 08:10:05 fx30 user.warn kernel: [  184.361930] Freezing user space processes ... (elapsed 0.008 seconds) done.
Jan  6 08:10:05 fx30 user.warn kernel: [  184.370770] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
Jan  6 08:10:05 fx30 user.debug kernel: [  184.374105] PM: Entering mem sleep
Jan  6 08:10:05 fx30 user.warn kernel: [  184.374137] Suspending console(s) (use no_console_suspend to debug)
Jan  6 08:10:05 fx30 user.info kernel: [  184.384272] smsc95xx 1-1.2:1.0 eth0: entering SUSPEND1 mode
Jan  6 08:10:05 fx30 user.debug kernel: [  184.403982] wm8944_suspend - START
Jan  6 08:10:05 fx30 user.debug kernel: [  184.405142] wm8944_suspend - OK
Jan  6 08:10:05 fx30 user.info kernel: [  184.411865] msm_hsic_host 7c00000.hsic_host: HSIC-USB in low power mode
Jan  6 08:10:05 fx30 user.info kernel: [  184.413603] PM: suspend of devices complete after 37.783 msecs
Jan  6 08:10:05 fx30 user.info kernel: [  184.418000] PM: late suspend of devices complete after 4.349 msecs
Jan  6 08:10:05 fx30 user.info kernel: [  184.422984] PM: noirq suspend of devices complete after 4.933 msecs
Jan  6 08:10:05 fx30 user.info kernel: [  184.423076] suspend ns:     184423057900      suspend cycles:       5631128094
Jan  6 08:10:05 fx30 user.info kernel: [  184.423057] CPU0:msm_cpu_pm_enter_sleep mode:3 during suspend
Jan  6 08:10:05 fx30 user.info kernel: [  184.423057] resume cycles:       5863072064
Jan  6 08:10:05 fx30 user.info kernel: [  184.425142] PM: noirq resume of devices complete after 1.748 msecs
Jan  6 08:10:05 fx30 user.info kernel: [  184.427293] PM: early resume of devices complete after 1.736 msecs
Jan  6 08:10:05 fx30 user.info kernel: [  184.431370] msm_hsic_host 7c00000.hsic_host: HSIC-USB exited from low power mode
Jan  6 08:10:05 fx30 user.info kernel: [  184.609834] usb 1-1: reset high-speed USB device number 2 using msm_hsic_host
Jan  6 08:10:05 fx30 user.info kernel: [  185.059802] usb 1-1.1: reset full-speed USB device number 3 using msm_hsic_host


Thank you jyijyi. I gave that a try and it does appear to come out of suspended mode at the expiration of timer.
Just one think I noticed is that it remains in active mode for one full minute before going back to suspended even though it only has to print “Inside Timer” and restart the timer.

Since it is consistently one minute before going back, I wonder if there is a setting that might reduce that time.
Thanks again!
Jim

does this help?