FTM alarm wake up system in deep sleep failed on nxp-ls1028ardb with LSDK20.04

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FTM alarm wake up system in deep sleep failed on nxp-ls1028ardb with LSDK20.04

818 Views
hittzt
Contributor V

Hi experts,

When I test the FTM alarm feature of nxp-ls1028ardb board, it failed on LSDK20.04(uboot, dtb, Image and rootfs).

On LSDK20.04 user manual "7.2.20 FlexTimer (FTM)" section, it describe the useage of FTM alarm to wake up the 

system in deep sleep, but as I follow the steps of verification on linux, the command runs with nothing message printed as the manual says.

The result of test are as followings:

root@localhost:~#
root@localhost:~# cat /sys/power/mem_sleep
s2idle [deep]
root@localhost:~# echo deep > /sys/power/mem_sleep
c/rtc1/wakealarm && echo mem > /sys/power/statewakealarm; echo +10>/sys/class/rtc
root@localhost:~#
root@localhost:~# uname -a
Linux localhost 5.4.3 #3 SMP PREEMPT Tue Jun 9 17:17:31 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
root@localhost:~#

The above shows just the result on kernel v5.4, but it is the same on kernel v4.19.

And I know that this feature works well on LSDK19.09.

Is there any known issue on FTM?

Thanks,

Zhantao

0 Kudos
4 Replies

722 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Zhantao,

I discussed with LSDK testing team, there is no problem with this feature.

Please refer to the attached testing logs provided by the testing team.

Thanks,

Yiping

0 Kudos

722 Views
hittzt
Contributor V

Hi Yiping,

Thanks for your reply.

I repeated the steps as the log you gave me. But the FTM alarm still failed. with the following info:

NXP LSDK 2004 main
localhost login: root
Password:
Last login: Fri Jul 10 04:24:37 UTC 2020 on tty7
Welcome to NXP LSDK 2004 main (GNU/Linux 4.19.90 aarch64)

* Support: https://www.nxp.com/lsdk
* Documentation: https://lsdk.github.io/document
* Licensing: https://lsdk.github.io/eula
root@localhost:~#
root@localhost:~#
root@localhost:~# uname -a
Linux localhost 4.19.90 #1 SMP PREEMPT Fri Jul 10 11:45:02 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
root@localhost:~#
root@localhost:~#

root@localhost:~# cat /sys/power/state
freeze mem disk
root@localhost:~#
root@localhost:~# cat /sys/power/mem_sleep
s2idle [deep]
root@localhost:~#
root@localhost:~# cat /proc/sys/kernel/printk
4 4 1 7
root@localhost:~#
root@localhost:~# echo '7 4 1 7' > /proc/sys/kernel/printk
root@localhost:~#
root@localhost:~# cat /proc/sys/kernel/printk
7 4 1 7
root@localhost:~#
tc/rtc1/wakealarm echo 0 > /sys/class/rtc/rtc1/wakealarm;echo +10 > /sys/class/rt
root@localhost:~#
root@localhost:~#
root@localhost:~# echo mem > /sys/power/state
[ 127.720222] PM: suspend entry (deep)
[ 127.723796] PM: Syncing filesystems ... done.
[ 127.728699] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 127.736900] OOM killer disabled.
[ 127.740128] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 127.748606] Suspending console(s) (use no_console_suspend to debug)

The board suspend there and did not wakeup or reboot.

I used LSDK20.04 U-Boot and kernel v4.19 and related dtb, all of these compiled by flexbuilder of LSDK20.04.

And I tested the FTM alarm feature on another nxp board nxp-ls1046ardb, it gave the same result as the above.

I am not sure what cause the problem, so seek help to find  how this happened.

Thanks,

Zhantao

0 Kudos

722 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello zhantao,

I used image lsdk2004_yocto_tiny_LS_arm64.itb to do verification, this feature works normally, please refer to my following log, please check your Kernel configuration whether CONFIG_SUSPEND and CONFIG_RTC_DRV_FSL_FTM_ALARM are configured.

NXP LSDK tiny 2004 (based on Yocto)
TinyLinux login: root
root@TinyLinux:~# echo 0 > /sys/class/rtc/rtc1/wakealarm;echo +10 > /sys/class/rtc/rtc1/wakealarm;echo mem > /sys/power/state
[ 45.721567] PM: suspend entry (deep)
[ 45.725309] Filesystems sync: 0.000 seconds
[ 45.731631] Freezing user space processes ... (elapsed 0.000 seconds) done.
[ 45.739567] OOM killer disabled.
[ 45.742806] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 45.751307] printk: Suspending console(s) (use no_console_suspend to debug)
[ 45.838332] PM: suspend devices took 0.080 seconds
[ 45.839453] Disabling non-boot CPUs ...
[ 45.839684] CPU1: shutdown
[ 45.856526] psci: Retrying again to check for CPU kill
[ 45.856530] psci: CPU1 killed.
[ 45.856911] Enabling non-boot CPUs ...
[ 45.857164] Detected PIPT I-cache on CPU1
[ 45.857185] GICv3: CPU1: found redistributor 1 region 0:0x0000000006060000
[ 45.857218] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[ 45.857514] CPU1 is up
[ 46.170685] ata1: SATA link down (SStatus 0 SControl 300)
[ 46.333099] PM: resume devices took 0.476 seconds
[ 46.387531] OOM killer enabled.
[ 46.390681] Restarting tasks ... done.
[ 46.395669] PM: suspend exit
root@TinyLinux:~#

Thanks,

Yiping

0 Kudos

722 Views
hittzt
Contributor V

Hi Yiping,

Thanks for your reply.

I will check it again.

Thanks,

Zhantao

0 Kudos