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.

Linux/AM3358: Suspend mode issue

Mastermind 35795 points
Part Number: AM3358

Tool/software: Linux

Hi,

I am using sitara sdk 4.2.0.9 on beaglebone black + e14 cape. I want to put the board in suspend mode using command line. Following command doesn't work. Suggestions ?

root@am335x-evm:~# echo mem >/sys/power/state
-sh: echo: write error: Invalid argument

Thanks

Saurabh
  • Hi Saurabh,

    Saurabh Narang said:
    root@am335x-evm:~# echo mem >/sys/power/state

    $ echo mem > /sys/power/state

    Please put a space between ">" and "/sys"

    Regards,
    Pavel

  • Hi Pavel,

    Thanks for your response. I get same result :

    root@am335x-evm:~# echo mem > /sys/power/state
    -sh: echo: write error: Invalid argument

    Thanks

    Saurabh

  • Maybe your terminal program is sending a "newline" character. Try

    echo -n mem >/sys/power/state

    Steve K.

  • Hi,
    None of these options work . Are you able to try this at your end on bbb ?

    Thanks
    Saurabh
  • Hi,
    I tested on my BBB with SDK 4.2, and it worked:

    root@am335x-evm:~# echo mem >/sys/power/state
    [ 154.033756] PM: Syncing filesystems ... done.
    [ 154.168974] Freezing user space processes ... (elapsed 0.002 seconds) done.
    [ 154.170455] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) do
    ne.
    [ 154.170516] Suspending console(s) (use no_console_suspend to debug)
    [ 155.529945] PM: suspend of devices complete after 1332.811 msecs
    [ 155.534134] PM: late suspend of devices complete after 4.137 msecs
    [ 155.538175] PM: noirq suspend of devices complete after 3.996 msecs
    [ 155.538191] PM: Successfully put all powerdomains to target state
    [ 155.538191] PM: Wakeup source UART
    [ 155.556726] PM: noirq resume of devices complete after 18.345 msecs
    [ 155.560443] PM: early resume of devices complete after 3.380 msecs
    [ 155.561942] net eth0: initializing cpsw version 1.12 (0)
    [ 155.561967] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [ 155.561983] cpsw 4a100000.ethernet: ALE Table size 1024
    [ 155.662924] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC
    LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=-1)
    [ 155.667289] cpts ptp bc clkid 0
    [ 155.672877] Suspended for 2.419 seconds
    [ 155.792447] PM: resume of devices complete after 231.966 msecs
    [ 155.880178] Restarting tasks ... done.
    root@am335x-evm:~#

    Which Element 14 Cape? I am sure that is not the problem, but take it off and see if anything changes.

    Steve K.
  • You will get the same "-sh: echo: write error: Invalid argument" error if the Power management options ---> [*] Suspend to RAM and standby is not enabled in the kernel's menuconfig. Please, check this out too.

  • Thanks Steve, Kemal

    -"Suspend to RAM and standby" is enabled. I haven't changed any power related configs that come default with sdk. I have attached snapshot

    - it fails on bbb w/o e-14 cape as well

    One difference i can think of is that i am booting bbb using SD card and not flashing image on eMMC since WiLink8 uses same MMC controller as eMMC on bbb. Could that be the reason ?

    Thanks

    Saurabh

     

  • Saurabh,

    I am booting BBB board with AM335x rev 2.1 device on it. I am booting from SD card only, no eMMC involved. I am using AM335x TI PSDK 4.02 with the pre-built images. And I can successfully suspend/resume BBB board. See the attached log file.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/BBB_5F00_log

    I have no capes on BBB board.

    Make sure you are using create-sdcard.sh script to create your bootable SD card.

    Regards,
    Pavel

  • Saurabh Narang said:
    root@am335x-evm:~# echo mem >/sys/power/state
    -sh: echo: write error: Invalid argument

    This error occur when there is nothing inside /sys/power/state/ folder of the rootfs. This is related to missing CM3 firmware and/or kernel wrong configuration. Please check the below e2e threads for details:

    Regards,
    Pavel