GPIO Wake-up on ConnectCore

I am trying to wake up my system (ConnectCore 6UL SBC Pro, with dey 3.0) from suspend by using edge interrupts on a GPIO pin, with no success so far.

I have the latest MCA firmware.

I have tried with the method in the documentation (https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.0/cc6ul/bsp_r_power-mgmt), for example like
gpiomon --num-events 1 --rising-edge mca-gpio 1 &
Suspend followed by edges on the gpio pin does not wake the system. The edges are detected by gpiomon when not sleeping.

I also tried adding
&mca_gpio {
pwroff-wakeup-capable-ios = <1>
};
to the device tree as per some older documentation, but that didn’t change anything.

Am I missing something? Is there something more that should be enabled somewhere to enable the wakeup?

1 Like

Here is an example:

These MCA gpio pins are IRQ capable: MCA_IO0/1/2/5 (index 504,505,505,509).

In this case you don´t need to enable the wakeup register, once you configure the MCA GPIO edge the IRQ will be avaible.

So to configure the MCA_IO1

root@ccimx6ulsbc:~# cat /proc/interrupts | grep gpiolib

root@ccimx6ulsbc:~# echo 505 > /sys/class/gpio/export

root@ccimx6ulsbc:~# echo in > /sys/class/gpio/gpio505/direction

root@ccimx6ulsbc:~# echo rising > /sys/class/gpio/gpio505/edge

Once you have done this, you are done and the GPIO will be used as a wakeup source

root@ccimx6ulsbc:~# cat /proc/interrupts | grep gpiolib

246: 0 mca-gpio-irq 1 Edge gpiolib

1 Like

&mca_gpio {
pwroff-wakeup-capable-ios = <1>
};
this should work.

I realized I had made a faulty assumption that I could use the 3V3 power line (from the J30 connector) during standby. By using other means to create the edge, the system wakes up as expected. Thanks for the example!