Hi James,
I tested the program on L3.0.35 4.1.0, i.mx6qsabresd, and find that it works well. My test step is as following.
1) Run the image
2) Observe that in the active stage, the EPIT interrupt occurred
3) Put the system into low power mode by
echo mem > /sys/power/state
it indeed cannot output the info to console, but it can be wakeup by epit interrupt all the time.
4) I guess the interrupt actually occurred, so I add a delayed workqueue into the isr handler to verify it. It proves the interrupt actually occurs.
My code segments:
struct delayed_work zss_dwork;
static void do_zss_dwork(struct work_struct *work)
{
printk("zss %s:%d called\n",__func__, __LINE__);
}
INIT_DELAYED_WORK(&zss_dwork, do_zss_dwork); <-----------hwtimer_irq
schedule_delayed_work(&zss_dwork,msecs_to_jiffies( 5 * 1000)); <---------hwtimer_start()
The printed log:
root@freescale ~$ echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
add wake up source irq 101
add wake up source irq 99
add wake up source irq 103
add wake up source irq 51
PM: suspend of devices complete after 25.270 msecs
PM: late suspend of devices complete after 0.629 msecs
Restarting tasks ... done.
<---system is waked up by epit interrupt after 5sec
zss do_zss_dwork:143 called <----delayed scheduled work print out the interrupt
[HWTIMER] Occurred Interrupt!!!!!!!!!!!!!!!!! <--------The next interrupt in active mode
[HWTIMER][mxc_timer_interrupt:87] #### Restart hwtimer ####
[HWTIMER][hwtimer_start:152] Function Start
[HWTIMER]EPITCR value = 0x3280003
[HWTIMER]EPITCR value = 0x3280002
[HWTIMER]EPITCR value = 0x3280002
[HWTIMER]EPITCR value = 0x3280002
[HWTIMER][hwtimer_start:196] Function End
zss do_zss_dwork:143 called