Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 148938

Forum Post: Getting AM3517 to wakeup from GPIO source

$
0
0

Hello, it seems like I am going round in circles trying to get my system to be able to suspend to memory and then wakeup via a GPIO event.

I have configured my system to use GPIO_28 as the wakeup source as it is in GPIO block 0 therefore should be able to be used as a wakeup source;

static void enable_board_wakeup_source(void)
{
    int ret;
    /* GPIO_28 interrupt line */

    omap_mux_init_gpio(WAKEUP_GPIO, OMAP_PIN_INPUT|OMAP_MUX_MODE4);

    omap_mux_init_signal("etk_d14",
                         OMAP_PIN_INPUT | OMAP_MUX_MODE4 |
                         OMAP_PIN_OFF_INPUT_PULLUP |
                         OMAP_PIN_OFF_WAKEUPENABLE);

    //ret = gpio_request(WAKEUP_GPIO, "etk_d14");

    ret = request_irq(gpio_to_irq(WAKEUP_GPIO), detect_irq,
        IRQF_TRIGGER_RISING,
        "etk_d14-wakeup", NULL);

    enable_irq_wake(gpio_to_irq(WAKEUP_GPIO));
}

I can see that the events are seen in /proc/interrupts the count increments for each pulse.

If I look at the mux config it seems to have configured correctly;

# cat /debug/omap_mux/etk_d14
name: etk_d14.gpio_28 (0x480025f8/0x5c8 = 0x7704), b ag8, t NA
mode: OMAP_PIN_INPUT | OMAP_PIN_OFF_OUTPUT_LOW | OMAP_PIN_OFF_WAKEUPENABLE | OMAP_MUX_MODE4
signals: etk_d14 | NA | NA | hsusb2_data0 | gpio_28 | mm2_rxrcv | hsusb2_tll_data0 | NA

So its configured as an input and has the wakeup enable set.

If I put the system to sleep;

# echo mem > /sys/power/state
[  767.050445] PM: Syncing filesystems ... done.
[  767.058929] Freezing user space processes ... (elapsed 0.01 seconds) done.
[  767.083923] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
[  767.164367] PM: suspend of devices complete after 48.461 msecs
[  767.171142] PM: late suspend of devices complete after 0.549 msecs
[  767.178802] PM: noirq suspend of devices complete after 1.129 msecs

No matter what I do with the input pulse duration it refuses to wakeup.

Does anyone know what I could be missing ?

 

Thanks

Marc


Viewing all articles
Browse latest Browse all 148938

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>