This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3517 gpio wakeup enable

Other Parts Discussed in Thread: AM3517, TSC2004, TSC2007

Hello to everyone,

I'm working with a ZOOM AM3517 evm with AM3517SDK 05_02_00_00 linux SDK. I'm able to suspend and resume it from UART, but now I want to resume the module from a GPIO.

I want to use one of the BOOT MODE dip switches on the experimenter board. For example BOOT0 witch goes on GPIO2.

I set up all the register for the GPIO1 module: set pin as input, set wakeup enable, interrupt enable, rising edge detection, and check that GPIO 1 wake-up event is enabled in PM_WKEN_WKUP register (0x48306CA0).

I can read gpio data register and I can see the value change as i move the dip switch, but I'm not able to get it working as a wakeup source.

Thanks

Matteo

  • Hello Matteo

    I know I am reviving an old post but did you manage to solve your issue ?

    I am trying to do the same with an AM3517 but using GPIO_28.

    Kind Regards

    Marc

  • Hi Marc,

    Make sure that GPIO_28 is on GPIO_1 group, as this is the only GPIO group that is enabled for the wakeup purpose.
    At the end I solved my issue enabling IRQ on the driver of the TSC2004 touchscreen controller on SOM board with the enable_irq_wake function. You can add irq entry in the i2c_boardinfo structure in your board source file as this:

    {
            I2C_BOARD_INFO("tsc2007", 0x48),
            .platform_data = &board_tsc2007_platform_data,
            .irq = OMAP_GPIO_IRQ(BOARD_TS_GPIO),
        },

    and add enable_irq_wake(ts->irq); in the probe function of the TSC2004 driver

    Bye

    Matteo

  • Hi Matteo

    I have tried all different ways of enabling the wake irq but for each one (GPIO with IRQ and GPIO key with wake enabled) the system just stays in the suspended state.

    I know that the IRQ is being seen as the irq count will increment in /proc/interrupts

    Are there any configuration changes needed to make the system go into a different sleep state ?

    Regards

    Marc

  • Hi,

    are you able to resume the board from UART? If so check if IRQ counter increments before and after suspend.

    I notice that in your other post http://e2e.ti.com/support/arm/sitara_arm/f/791/t/314008.aspx

    the log from suspend is:

    # 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

    I'm not sure that noirq suspend is correct.

    Check also Interrupt and Wake-Up Features under General-Purpose Interface in the TRM
     and relative configurations registers

    Bye

    Matteo