Home/Support/Support Forum/Suspend to ram and wakeup by console input?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Suspend to ram and wakeup by console input?

0 votes
Hi,

I'm using ConnectCore i.mx8qxp board, I'd like to test the suspend-to-ram functions as mentioned here: https://community.arm.com/developer/tools-software/oss-platforms/w/docs/526/system-suspend-to-ram

I followed the instructions as in the document above:

```
/* Set the wakeup alarm for 30s */
# echo +30 > /sys/class/rtc/rtc0/wakealarm
/* Suspend system to RAM */
# echo -n mem > /sys/power/state
```
and also `rtcwake -d /dev/rtc0 -s 30 -m mem`.

It seems that the suspend is working fine. (I run ping cmd at the same time and I saw it disconnected).

Now I'd like to test the wake-up from console input.
I am connecting the PC to imx8qxp's debug port, which displays as "ttyLP2" during boot.

Is there a way to config ttyLP2 as a wakeup input?

From some other website, there is an instruction like this:
```
echo enabled > /sys/devices/platform/imx-uart.0/tty/ttymxc0/power/wakeup echo mem > /sys/power/state
```
but in my imx8qxp, I didn't find `/sys/devices/platform/imx-uart.0`, maybe in a different path or name?

Thanks,
Fei
asked Jul 14 in Linux by fei4xu New to the Community (3 points)

Please log in or register to answer this question.

1 Answer

0 votes
please see:
https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.2/cc8x/bsp_r_mca-uart-serial_8

Wake from suspend
To allow an MCA UART to resume the system from suspend when a character is received (and not lose data), run the following command:

~# echo enabled > /sys/class/tty/ttyMCAx/power/wakeup
where x is the UART index, starting at 0.

An application must be reading from the device or the system will not wake up when a character is received.
answered 6 days ago by LeonidM Veteran of the Digi Community (4,290 points)
...