Imx6 CAN wakes up Linux immediately


I can wake Linux up using UART by enabling its wakeup capability:

$ echo enabled > /sys/class/tty/ttymxc0/power/wakeup

I have put Linux into sleep using the following command:

 $ echo mem > /sys/power/state

then sending a character over UART when the Linux is in sleep to wake it up… This scenario works well.

I want to do the same with CAN, so I enable its wakeup capability:

 $ echo enabled > /sys/class/net/can0/device/power/wakeup

Then put Linux into sleep. It shows that Linux goes into sleep, but it immediately wakes up. I want Linux to be woken up upon the reception of a frame over CAN, just like the UART scenario

Hardware: apalis imx6D ixora v1.2

OS: Linux 5.4.91-33088-g8c05b31a44c3

Question: What could be the problem? How can I do that?

Thanks in advance

Could you please specify which can controller an Linux CAN driver you are using?

As stated in reference manual, it’s flexcan controller. The Linux driver is flexcan.c

What kind of hardware connected to Ixora CAN header (X30)? Are you sure it’s not generating a frame(s) which wake Apalis?

The problem fixed by using Linux Source Code provided by NXP

Hi @Jonathan

Which linux branch from NXP did you use?