Beaglebone Black wake up from resume on GPIO event

Hello,

I am using a Beaglebone Black running the latest Debian Stretch on it.

debian@beaglebone:~$ cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 9 (stretch)”
NAME=“Debian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
ID=debian
HOME_URL=“https://www.debian.org/
SUPPORT_URL=“https://www.debian.org/support
BUG_REPORT_URL=“https://bugs.debian.org/

debian@beaglebone:~$ uname -a
Linux beaglebone 4.4.91-ti-r133 #1 SMP Tue Oct 10 05:18:08 UTC 2017 armv7l GNU/Linux

I have downloaded the Linux kernel source from below to compile and use custom device trees.
https://github.com/beagleboard/linux.git

diff --git a/arch/arm/boot/dts/am335x-boneblack-custom.dts b/arch/arm/boot/dts/am335x-boneblack-custom.dts
index 0c68a88…a85990d 100644
— a/arch/arm/boot/dts/am335x-boneblack-custom.dts
+++ b/arch/arm/boot/dts/am335x-boneblack-custom.dts
@@ -10,10 +10,49 @@
#include “am33xx.dtsi”
#include “am335x-bone-common-no-capemgr.dtsi”
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
+#include <dt-bindings/input/input.h>

/ {
model = “TI AM335x BeagleBone Black”;
compatible = “ti,am335x-bone-black”, “ti,am335x-bone”, “ti,am33xx”;

Hi Sanchayan,

Have you tried:-
rtcwake -m standby -s 30 (the debian version I am using do not wake from mem).

This command never wakes up
rtcwake -m mem -s 30

This wakes up after 30 seconds or if I insert or remove the USB to serial TTL cable
rtcwake -m standby -s 30

Linux arm 4.9.67-ti-r82 #1 SMP PREEMPT Fri Dec 8 02:39:42 UTC 2017 armv7l GNU/Linux

Hope this helps,

Lloyd.

Hi Lloyd,

The RTC wakeup is only useful for me from the point of view testing. For my project, I need wake up on GPIO state change and CAN.

From your tests, it would seem “mem” suspend which is suspend to memory and the actual deep sleep mode, does not work on 4.9 kernel. “standby” mode is not that useful for me, since I want the deepest sleep mode possible.

Thanks & Regards,
Sanchayan.

Stupid me for not consulting the TRM and thinking the hardware engineer did his job. Only GPIO bank 0 allows wakeup and I only have pins from GPIO banks 1 and 2 connected for wakeup.

http://www.ti.com/lit/an/sprac74a/sprac74a.pdf
Section 3.2.3 clarifies it.

  • Sanchayan.

Hi, Sanchayan

What HW version of bbb are you using to verify deep sleep?

Can you post the link? Since we are testing it also and from TR I saw that power management chip is needed to realize deep sleep, I guess the hw version of bbb matters.

Thanks in advance!

Regards
Tibalt

在 2018年2月10日星期六 UTC+8上午12:59:17,Sanchayan Maity写道: