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.

Wakeup from GPIO2_x AM335x-evmsk

Can GPIO1-3 banks be used for wakeup from standby? In the EVMSK build so far GPIO1-3 banks did not wake up from standby mode which I understand is different from Deepsleep (mem).

I read a following line from a ti-wiki page. I have modified the am335x-evmsk.dts to add SW1, SW2 (GPIO2_2, GPIO2_3) as wakeup sources as mentioned above using a keyword wakeup as it is used for the SW3 in SDK source. But that did not help to wake up from echo standby > /sys/power/state. SW3 press wakes up as expected which shows that GPIO0 works as expected. Question is should GPIO1-3 be wake up triggers from standby and is there a way to set it up that might be different from GPIO0?

I', using SDK 2.00.2.11, 4.1.18 kernel.

GPIO wakeup

One can wakeup from standby from any of the GPIO lines by pressing any button/key connected to a GPIO line

processors.wiki.ti.com/.../AM335x_Power_Management_Standby_User's_Guide

  • Best to differentiate your above DeepSleep1 reference (echo standby > /sys/power/state) with DeepSleep0 reference (echo mem > /sys/power/state) :

    http://processors.wiki.ti.com/index.php/AM335x_Linux_Power_Management_User_Guide#Usage_2 

    You can see the difference from a HW standpoint on the 8.1.4.3 Power Modes section of the AM335x TRM: www.ti.com/.../spruh73

    (The terminololgy does get mixed up a little between SW and HW)

  • Thanks for you response. From your statement are you saying that "standby" as it is implemented is actually DS1 ?

    As mentioned in the manual it seems like the Standby Mode corresponds to echo standby and DS0 corresponds to echo mem.

    #define IPC_CMD_DS0 0x4
    #define IPC_CMD_STANDBY 0xc
    As it is defined in wkup_m3_ipc.c
    the CM3 firmware code has implementation for 3 modes standby, DS1 and DS0 from what I can see.
    arago-project.org/.../

    This brings back to my initial question from what i read any GPIO could be wakeup source from standby as mentioned in the manual, but I cant seem to find a reliable example to do that on the EVM so far.
  • Good point referring the CM3 firmware code which seems to match the TRM for DS0 and DS1.

    But I have only used DS0 with Linux (and from my notes believe I briefly tested DS1 long time ago with AM335X_StarterWare_02_00_00_05\examples\evmAM335x\pm_ds1_mode. Think I used the Touch screen. But this code is no longer available ).

    >> From your statement are you saying that "standby" as it is implemented is actually DS1 ?
    So I guess that is the theory. I just never tested in Linux ( And I believe you can't get to some of the other TRM modes from Linux easily).

    >>This brings back to my initial question from what i read any GPIO could be wakeup source from standby as mentioned in the manual
    >>Question is should GPIO1-3 be wake up triggers from standby
    Honestly it should, but not sure why it is not working for you. I have never tested in Linux.

    Maybe a pin mux issue?
  • Hi Joe, thanks again for the response.
    Just wanted to clarify that it is not our device that I'm having this wakeup from standby using GPIO. I'm using the TI EVM board. I expected the GPIO switch settings mentioned in the dts should be enough to set the GPIO as the wake up source.

    switch@2 {
    label = "button1";
    linux,code = <0x101>;
    gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
    gpio-key,wakeup;
    };

    switch@3 {
    label = "button2";
    linux,code = <0x102>;
    gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
    gpio-key,wakeup;
    };

    So in switch 3 works as expected , but sw2 which is in the GPIO2_2 does not. We want to use standby and hence hoping we can use GPIO1-3 for wakeup along with GPIO0 gpios. Is it possible for you verify that I'm not missing any other step to set the GPIO1-3 as a source to wake up from standby.