External RTC can't wakeup PM component

cancel
Showing results for 
Search instead for 
Did you mean: 

External RTC can't wakeup PM component

410 Views
yaolinchang
Contributor I

Hi All,

     We have changed RTC component from internal RTC to external RTC (RX8010).

The RTC interrupt is normal, but it can't wakeup PM component.

We check IRQ number is 197. We found the number is not in A9 interrupts domain(32~159).

We execute two unit test. (rtctest and rtcwakeup)

(1)We execute unit_tests/rtctest as below: (Interrupts is OK)

root@imx6qsabresd:/unit_tests# ./rtctest.out --full        

RTC Driver Test Example.

Counting 5 update (1/sec) interrupts from reading /dev/rtc0: 1 2 3 4 5

Again, from using select(2) on /dev/rtc0: 1 2 3 4 5

Current RTC date/time is 3-7-2015, 11:09:42.

Alarm time now set to 11:09:47.

Waiting 5 seconds for alarm... okay. Alarm rang.

Periodic IRQ rate was 1Hz.

Counting 20 interrupts at:

2Hz:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
4Hz:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
8Hz:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
16Hz:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
32Hz:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
64Hz:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

*** Test complete ***

Typing "cat /proc/interrupts" will show 131 more events on IRQ rtc.

(2)We execute unit_tests/rtcwakup as below: (resume is NG, system can't be wakeup)

root@imx6qsabresd:/unit_tests# ./rtcwakeup.out -d rtc0 -m mem -s 3

rtcwakeup.out: wakeup from "mem" using rtc0 at Sat Jul  4 11:06:56 2015

PM: Syncing filesystems ... done.

Freezing user space processes ... (elapsed 0.001 seconds) done.

Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

Suspending console(s) (use no_console_suspend to debug)

==================================

The system can't be wakeup and stuck.

If we push any key, the system can be wakeup.

Have any one know what's happen?

Thanks,

Best Regards,

Yao

Labels (1)
0 Kudos
3 Replies

54 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi YaoLin

difference using external RTC is that it should use processor

GPIO interrupt. When using i.MX6 internal RTC, processor uses

other SNVS SRTC interrupt, rtcwakeup.out uses SNVS interrupt.

So for external RTC one needs to add GPIO interrupt, to wake processor

from low power mode, like

Working with GPIO on the Wandboard and Writing an Android Driver for GPIO Interrupts | Using Android... .

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

54 Views
yaolinchang
Contributor I

Hi igor,

     Thanks for your information.

Do you know where is arch/arm/plat-mxc/include/mach/gpio.h in imx6qsabresd.

We can not find it.

Thanks,

Best Regards,

Yao

0 Kudos

54 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi YaoLin

for gpio settings one can look at pinctrl

linux/imx6qdl-sabresd.dtsi at master · torvalds/linux · GitHub

and Documentation/devicetree/bindings/pinctrl

~igor

0 Kudos