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/PROCESSOR-SDK-AM335X: Issues with sleep modes

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: WL1837MOD

Tool/software: Linux

I'm experiencing some issues with two out of the three supported sleep modes on the AM335x.

 The three supported sleep modes, according to: cat /sys/power/state

are:

  • freeze
  • standby
  • mem

( I believe these correspond to ACPI sleep modes S1-S3, respectively)

Issue #1:

When I attempt to transition to "freeze" (echo freeze > /sys/power/state), the system appears to transition to freeze state, but immediately returns to a fully awake state.

Issue #2:

When I attempt to transition to "mem", the system suspends, and awakes upon interrupt.  However, I notice that it reports: "PM: Could not transition all powerdomains to target state"

 

In both the case of "freeze" and "mem" (Issue #1 and #2), the following is reported after wake-up: "-sh: echo: write error: Operation not permitted"

 

In contrast, No problems appear to be reported when transitioning into "standby"

  • It reports "PM: Successfully put all powerdomains to target state"
  • It does NOT report the error message: "-sh: echo: write error: Operation not permitted"

Are these sleep mode issues present in the most recent release of the AM335x hardware and software?  I've been testing with SDK version 03.02.00.05 (stock kernel dated Dec 14, 2016).

I've tested with the WL1837MOD physically inserted and removed, but that appears to make no difference.

Are there any optional processes, drivers or hardware that can be disabled / removed to prevent these freeze and suspend-to-memory (mem) issues?  Have there been software upgrades since December that address these issues?

Thanks in advance!

-  Marc

  • The software team have been notified. They will respond here.
  • Hi Marc,

    What platform are you using?  Have you made any changes to the kernel?  Sometimes simple changes impact the suspend/ resume path.

    Testing on my BeagleBone Black, I see 'standby' and 'mem' modes are working properly with a fresh version of the SDK you're using.  I'm not sure about our 'freeze' support.  Based on my understanding, I do not see much support for 'freeze' in the kernel beyond Intel and one Tegra device.

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am335x-evm ttyS0
    
    Arago 2016.10 am335x-evm ttyS0
    
    am335x-evm login:
    
    root@am335x-evm:~# uname -a
    Linux am335x-evm 4.4.32-gadde2ca9f8 #1 PREEMPT Wed Dec 14 18:52:13 EST 2016 armv7l GNU/Linux
    root@am335x-evm:~# echo mem > /sys/power/state
    [  674.082965] PM: Syncing filesystems ... done.
    [  674.118243] Freezing user space processes ... (elapsed 0.002 seconds) done.
    [  674.119701] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [  674.119764] Suspending console(s) (use no_console_suspend to debug)
    [  674.272755] PM: suspend of devices complete after 120.551 msecs
    [  674.276868] PM: late suspend of devices complete after 4.064 msecs
    [  674.281064] PM: noirq suspend of devices complete after 4.153 msecs
    [  674.281082] PM: Successfully put all powerdomains to target state
    [  674.300471] PM: noirq resume of devices complete after 19.190 msecs
    [  674.304059] PM: early resume of devices complete after 3.307 msecs
    [  674.305795] net eth0: initializing cpsw version 1.12 (0)
    [  674.305819] net eth0: initialized cpsw ale version 1.4
    [  674.305833] net eth0: ALE Table size 1024
    [  674.308934] net eth0: phy found : id is : 0x7c0f1
    [  674.309049] libphy: PHY 4a101000.mdio:01 not found
    [  674.309070] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19
    [  674.541825] PM: resume of devices complete after 237.712 msecs
    [  674.620207] Restarting tasks ... done.
    root@am335x-evm:~# echo standby > /sys/power/state
    [  684.192836] PM: Syncing filesystems ... done.
    [  684.221477] Freezing user space processes ... (elapsed 0.002 seconds) done.
    [  684.223122] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [  684.223180] Suspending console(s) (use no_console_suspend to debug)
    [  684.372641] PM: suspend of devices complete after 117.242 msecs
    [  684.376766] PM: late suspend of devices complete after 4.080 msecs
    [  684.380977] PM: noirq suspend of devices complete after 4.164 msecs
    [  684.380996] PM: Successfully put all powerdomains to target state
    [  684.400226] PM: noirq resume of devices complete after 19.032 msecs
    [  684.403823] PM: early resume of devices complete after 3.312 msecs
    [  684.405610] net eth0: initializing cpsw version 1.12 (0)
    [  684.405633] net eth0: initialized cpsw ale version 1.4
    [  684.405648] net eth0: ALE Table size 1024
    [  684.408757] net eth0: phy found : id is : 0x7c0f1
    [  684.408873] libphy: PHY 4a101000.mdio:01 not found
    [  684.408894] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19
    [  684.641723] PM: resume of devices complete after 237.847 msecs
    [  684.720120] Restarting tasks ... done.
    root@am335x-evm:~#

    Regards,
    Mike

  • I am using the AM335x EVM.   I am using the pre-built images kernel that came with the SDK.

    Here is my  screen output:   (I've highlighted lines of concern in red font)


    _____ _____ _ _ | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_ | | _| .'| . | . | | __| _| . | | | -_| _| _| |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_| |___| |___| Arago Project http://arago-project.org am335x-evm ttyS0 Arago 2016.10 am335x-evm ttyS0 am335x-evm login: root root@am335x-evm:~# uname -a Linux am335x-evm 4.4.32-gadde2ca9f8 #1 PREEMPT Wed Dec 14 18:52:13 EST 2016 armv7l GNU/Linux root@am335x-evm:~# echo mem > /sys/power/state [ 345.771164] PM: Syncing filesystems ... done. [ 345.964172] Freezing user space processes ... (elapsed 0.008 seconds) done. [ 345.975263] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 345.984633] Suspending console(s) (use no_console_suspend to debug) [ 346.117653] PM: suspend of devices complete after 124.809 msecs [ 346.122387] PM: late suspend of devices complete after 4.686 msecs [ 346.130228] omap_hwmod: elm: _wait_target_disable failed [ 346.131099] PM: noirq suspend of devices complete after 8.668 msecs [ 346.131115] PM: Could not transition all powerdomains to target state [ 346.152379] PM: noirq resume of devices complete after 21.064 msecs [ 346.156784] PM: early resume of devices complete after 4.079 msecs [ 346.159072] net eth0: initializing cpsw version 1.12 (0) [ 346.159096] net eth0: initialized cpsw ale version 1.4 [ 346.159112] net eth0: ALE Table size 1024 [ 346.234186] net eth0: phy found : id is : 0x4dd074 [ 346.234326] libphy: PHY 4a101000.mdio:01 not found [ 346.234347] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19 [ 346.423629] PM: resume of devices complete after 266.786 msecs [ 346.505779] Restarting tasks ... done. -sh: echo: write error: Operation not permitted root@am335x-evm:~# echo standby > /sys/power/state [ 397.562562] PM: Syncing filesystems ... done. [ 397.734273] Freezing user space processes ... (elapsed 0.008 seconds) done. [ 397.746429] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 397.756218] Suspending console(s) (use no_console_suspend to debug) [ 397.895361] PM: suspend of devices complete after 130.092 msecs [ 397.900050] PM: late suspend of devices complete after 4.638 msecs [ 397.907917] omap_hwmod: elm: _wait_target_disable failed [ 397.908775] PM: noirq suspend of devices complete after 8.682 msecs [ 397.908789] PM: Successfully put all powerdomains to target state [ 397.928731] PM: noirq resume of devices complete after 19.734 msecs [ 397.932811] PM: early resume of devices complete after 3.769 msecs [ 397.935205] net eth0: initializing cpsw version 1.12 (0) [ 397.935230] net eth0: initialized cpsw ale version 1.4 [ 397.935246] net eth0: ALE Table size 1024 [ 398.014082] net eth0: phy found : id is : 0x4dd074 [ 398.014220] libphy: PHY 4a101000.mdio:01 not found [ 398.014243] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19 [ 398.203524] PM: resume of devices complete after 270.653 msecs [ 398.285392] Restarting tasks ... done. root@am335x-evm:~# echo freeze > /sys/power/state [ 455.016156] PM: Syncing filesystems ... done. [ 455.201206] Freezing user space processes ... (elapsed 0.009 seconds) done. [ 455.213246] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 455.222909] Restarting tasks ... done. -sh: echo: write error: Invalid argument



    Thanks,

    Marc
  • Marc,

    Thank you for including your complete log - I see what the issue is:

    [  346.130228] omap_hwmod: elm: _wait_target_disable failed

    This message is telling us the ELM (error correction block for NAND) did not go to sleep.  This is something we have discovered recently after migrating to systemd.  Systemd will attempt to mount all partitions on the system - the device tree describes the NAND partitions, so they are mounted.  The issue is some of the NAND memories were not programmed properly during production, and there are errors in the NAND, so the ELM is unhappy.

    The solution is to wipe the NAND.  This can be done from Linux or U-Boot.

    I've personally used the U-Boot method, and will share with you the details below:

    1) Stop the boot process during U-Boot by pressing space

    U-Boot 2016.05-g4db46a6bbd (Mar 29 2017 - 17:44:45 -0400)
    
    CPU  : AM335X-GP rev 2.0
    Model: TI AM335x BeagleBone Black
           Watchdog enabled
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in SROM is         de:ad:be:ef:00:01
    Address in environment is  c8:a0:30:af:80:01
    , eth1: usb_ether
    Press SPACE to abort autoboot in 2 seconds
    

    2) From the U-Boot prompt, run "nand erase.chip" to clear the NAND:

    => nand erase.chip
    
    NAND erase.chip: device 0 whole chip
    Erasing at 0xffe0000 -- 100% complete.
    OK
    

    3) boot as normal and resume your testing

    => boot
    switch to partitions #0, OK
    

    This time, using the AM335x GP EVM (with NAND installed!):

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am335x-evm ttyS0
    
    Arago 2016.10 am335x-evm ttyS0
    
    am335x-evm login:
    
    root@am335x-evm:~# uname -a
    Linux am335x-evm 4.4.32-gadde2ca9f8 #1 PREEMPT Wed Dec 14 18:52:13 EST 2016 armv7l GNU/Linux
    
    root@am335x-evm:~# echo standby > /sys/power/state
    [   62.488112] PM: Syncing filesystems ... done.
    [   62.688434] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underfow
    [   62.737843] Freezing user space processes ... (elapsed 0.010 seconds) done.
    [   62.755579] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [   62.764909] Suspending console(s) (use no_console_suspend to debug)
    [   62.890156] PM: suspend of devices complete after 117.007 msecs
    [   62.895225] PM: late suspend of devices complete after 5.017 msecs
    [   62.900909] PM: noirq suspend of devices complete after 5.627 msecs
    [   62.900928] PM: Successfully put all powerdomains to target state
    [   62.922784] PM: noirq resume of devices complete after 21.644 msecs
    [   62.927478] PM: early resume of devices complete after 4.342 msecs
    [   62.929905] net eth0: initializing cpsw version 1.12 (0)
    [   62.929931] net eth0: initialized cpsw ale version 1.4
    [   62.929947] net eth0: ALE Table size 1024
    [   63.007930] net eth0: phy found : id is : 0x4dd074
    [   63.008080] libphy: PHY 4a101000.mdio:01 not found
    [   63.008103] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19
    [   63.197344] PM: resume of devices complete after 269.807 msecs
    [   63.274130] Restarting tasks ... done.
    
    root@am335x-evm:~# echo mem > /sys/power/state
    [   67.388025] PM: Syncing filesystems ... done.
    [   67.662109] Freezing user space processes ... (elapsed 0.008 seconds) done.
    [   67.672898] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [   67.682257] Suspending console(s) (use no_console_suspend to debug)
    [   67.814851] PM: suspend of devices complete after 124.457 msecs
    [   67.820200] PM: late suspend of devices complete after 5.293 msecs
    [   67.825576] PM: noirq suspend of devices complete after 5.322 msecs
    [   67.825593] PM: Successfully put all powerdomains to target state
    [   67.846725] PM: noirq resume of devices complete after 20.911 msecs
    [   67.851243] PM: early resume of devices complete after 4.070 msecs
    [   67.853680] net eth0: initializing cpsw version 1.12 (0)
    [   67.853707] net eth0: initialized cpsw ale version 1.4
    [   67.853723] net eth0: ALE Table size 1024
    [   67.927817] net eth0: phy found : id is : 0x4dd074
    [   67.927966] libphy: PHY 4a101000.mdio:01 not found
    [   67.927989] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19
    [   68.117240] PM: resume of devices complete after 265.936 msecs
    [   68.194039] Restarting tasks ... done.
    root@am335x-evm:~# 

    Regards,
    Mike

  • Hi Mike,

    Wiping the NAND resolved this problem.

    And not surprisingly, it also resolved the following messages reported during boot:
    " omap2-nand: 8000000.nand: uncorrectable bit-flips found

    A two-for-one fix.

    Thanks !

    - Marc
  • Marc,

    Thank you for replying back, and glad to help. We will try to get this fixed in the next batch of production EVMs - thank you for reporting the issue.

    Regards,
    Mike