Skip to main content
Visitor II
August 25, 2019
Question

OpenAMP_TTY_echo_wakeup example prevents A7 processor from going into low power mode.

  • August 25, 2019
  • 3 replies
  • 1137 views

I'm trying to develop an application that puts the A7 into a low power mode and only uses the M4 to do some basic processing. I'm starting with the OpenAMP_TTY_echo_wakeup example. In the example it says to issue the following commands:

echo "*delay" >/dev/ttyRPMSG0

echo mem > /sys/power/state

Then after 20 seconds, the M4 will wake-up the A7. But when I have ANY M4 program running and I issue a:

echo mem > /sys/power/state

I get the following error messages;

root@stm32mp1:~# [ 1008.496994] PM: suspend entry (s2idle)

[ 1008.499292] PM: Syncing filesystems ... done.

[ 1008.509780] Freezing user space processes ... (elapsed 0.045 seconds) done.

[ 1008.560707] OOM killer disabled.

[ 1008.563608] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

[ 1008.571108] Suspending console(s) (use no_console_suspend to debug)

[ 1008.633238] dwc2 49000000.usb-otg: suspending usb gadget configfs-gadget

[ 1008.633257] dwc2 49000000.usb-otg: dwc2_hsotg_ep_disable: called for ep0

[ 1008.633267] dwc2 49000000.usb-otg: dwc2_hsotg_ep_disable: called for ep0

[ 1008.698329] stm32-dma 48001000.dma: Suspend is prevented by Chan 1

[ 1008.698362] dpm_run_callback(): platform_pm_suspend+0x0/0x48 returns -16

[ 1008.698373] PM: Device 48001000.dma failed to suspend: error -16

[ 1008.698383] PM: Some devices failed to suspend, or early wake event detected

[ 1008.709397] dwmac4: Master AXI performs any burst length

[ 1008.709429] stm32-dwmac 5800a000.ethernet eth0: No Safety Features support found

[ 1008.751562] dwc2 49000000.usb-otg: resuming usb gadget configfs-gadget

[ 1009.294489] OOM killer enabled.

[ 1009.297551] Restarting tasks ... done.

[ 1009.316305] PM: suspend exit

[ 1012.901203] stm32-dwmac 5800a000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

If I reboot and attempt to enter low power mode, it succeds, but it will always fail after I start or start then stop an M4 program.

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    August 26, 2019

    Hi @nlbutts​ 

    Please have a look to this page.

    https://wiki.st.com/stm32mpu/wiki/Power_overview#How_to_enter_and_exit_low-power_modes

    I suspect problem is that you are running in weston ..

    You have to call 'systemctl suspend' instead of 'echo mem > /sys/power/state'

    Olivier

    Technical Moderator
    August 26, 2019

    Note that the Readme file of the OpenAMP_TTY_echo_wakeup example will be update accordingly in next Cube package release.

    Olivier

    nlbuttsAuthor
    Visitor II
    August 26, 2019

    I get the same issue. I suspect DMA1 is used to transfer data back and forth through OpenAMP.

    root@stm32mp1:/usr/local/Cube-M4-examples# systemctl suspend

    root@stm32mp1:/usr/local/Cube-M4-examples# [ 1882.992002] unbind driver brcmfmac/sdmmc

    [ 1883.035445] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.

    [ 1883.041748] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.

    [ 1883.048704] brcmfmac: brcmf_cfg80211_get_channel: chanspec failed (-5)

    [ 1883.237082] mmc1: card 0001 removed

    [ 1883.241175] mmci-pl18x 58007000.sdmmc: Dropping the link to regulator.8

    [ 1883.307366] PM: suspend entry (s2idle)

    [ 1883.309665] PM: Syncing filesystems ... done.

    [ 1883.378466] Freezing user space processes ... (elapsed 0.002 seconds) done.

    [ 1883.386122] OOM killer disabled.

    [ 1883.389272] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

    [ 1883.396895] Suspending console(s) (use no_console_suspend to debug)

    [ 1883.467972] dwc2 49000000.usb-otg: suspending usb gadget configfs-gadget

    [ 1883.467992] dwc2 49000000.usb-otg: dwc2_hsotg_ep_disable: called for ep0

    [ 1883.468002] dwc2 49000000.usb-otg: dwc2_hsotg_ep_disable: called for ep0

    [ 1883.513017] stm32-dma 48001000.dma: Suspend is prevented by Chan 1

    [ 1883.513050] dpm_run_callback(): platform_pm_suspend+0x0/0x48 returns -16

    [ 1883.513061] PM: Device 48001000.dma failed to suspend: error -16

    [ 1883.525092] PM: Some devices failed to suspend, or early wake event detected

    [ 1883.536067] dwmac4: Master AXI performs any burst length

    [ 1883.536096] stm32-dwmac 5800a000.ethernet eth0: No Safety Features support found

    [ 1883.576044] dwc2 49000000.usb-otg: resuming usb gadget configfs-gadget

    [ 1884.119183] OOM killer enabled.

    [ 1884.122249] Restarting tasks ... done.

    [ 1884.131236] PM: suspend exit

    [ 1884.218126] bind driver brcmfmac/sdmmc

    [ 1884.221743] mmci-pl18x 58007000.sdmmc: allocated mmc-pwrseq

    [ 1884.228474] mmci-pl18x 58007000.sdmmc: Linked as a consumer to regulator.8

    [ 1884.234189] mmci-pl18x 58007000.sdmmc: mmc1: PL180 manf 53 rev1 at 0x58007000 irq 59,0 (pio)

    [ 1884.293441] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)

    [ 1884.326662] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

    [ 1884.347891] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

    [ 1884.374922] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)

    [ 1884.381893] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

    [ 1884.395514] mmc1: queuing unknown CIS tuple 0x80 (6 bytes)

    [ 1884.487706] mmc1: new high speed SDIO card at address 0001

    [ 1884.504494] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1

    [ 1884.675378] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1

    [ 1884.745393] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Sep 11 2018 09:22:09 version f

    [ 1887.675918] stm32-dwmac 5800a000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx