T20 doesn't wake up right after second suspend or pin 178

Hello!
I use a Colibri T20 on custom board, WinCE7, build Tegra_WinCE_Image_2.0beta3

  1. I start the suspend function SuspendResumeAfter() for 60 seconds, as described here. When I do this the first time the device wakes up successfully, my program continues to run. But after the second call SuspendResumeAfter() device goes to sleep and not waking up. Current consumption increases, it seems that the OS hangs while waking up. After that I have to turn off and turn on the power.

The effect is consistently reproduced.

  1. Also, the device not waking up from pin 178.

In registry
[HKEY_LOCAL_MACHINE\SYSTEM\PM\Suspend]
“WakeupSources”=“rtc,pin178l”

How to fix this problem?
Thank you.

Did you see any output on the Debug console (serial port)?

No, there is nothing in serial port. Output is only during the boot OS.

@sz36, please enable the debug output for WinCE over serial:

Let us know what you see on the serial debug output when the problem occurs.

Here is debug output:

Toradex Bootloader 2.0 BETA 3 for Tegra Built Nov  4 2016

Press [SPACE] to enter Bootloader Menu

Colibri T20 512MB V1.2A  SerialNo: 4754241
RAM: 512 MB, CarveOut: 64 MB
Locating kernel image in flash...Ecc.Corrected(1) Blk 49 PgOffset 0, status: 0x2
0100
Ecc.Corrected(1) Blk 58 PgOffset 0, status: 0x200100
Ecc.Corrected(1) Blk 60 PgOffset 0, status: 0x10100
Ecc.Corrected(1) Blk 71 PgOffset 0, status: 0x20100
Ecc.Corrected(1) Blk 86 PgOffset 0, status: 0x40100
Done(1374)
Decompressing IMAGE(25738246, 50339636) from FLASH(0) to RAM(16000)...Done(561ms)
Jumping to image at 0x80016000...

Toradex Windows CE 7.0 IMAGE 2.0 BETA 3 for Tegra Built Nov  4 2016
INFO:OALLogSetZones: dpCurSettings.ulZoneMask: 0xb
L2 cache enabled
MainMemoryEndAddress adjusted from 0x86000000 to 0x9C000000
Main Phys Mem: 0x00000000:0x1BFFFFFF
Carveout Phys: 0x1C000000:0x1FFFFFFF
Cold boot selected
WatchDog Enabled (5000 ms)
SMP: Active CPUs = 2
Chip Id: 0x20 (Handheld SOC) Major: 0x1 Minor: 0x3 SKU: 0x8
NVRM Initialized shmoo database
PllClocks(Mhz): X=1000, M=666, C=581, P=216, A=24.576
SysClocks(Mhz): CPU=1000, AVP=232, SysBus=232, Mem=333, EMem=666
GraphicClocks(Mhz): Host=108, 3D=111, 2D=111, Epp=111, Mpe=111, Vde=232
Loading FlashFileSystem(NAND)...
Micron M71M PS:4KB BS:256KB DS:1024MB BCH16 ECC
INFO: TotalBlocks = 4096, FreeBlocks = 178
BBs: 2
No TAT bad block found.
No TT bad block found.
Done FlashFileSystem(NAND)(231)
Loading Audio...Done
Loading Serial2(UART_B)...Done(0)
Loading Serial3(UART_C)...Done(0)
Loading SDIO(SDIO4)...Done(3)
Loading USBFunction(Port1)...Done
Loading USBHost(Port3)...NvDdkSdioSetClockFrequency: Requested: 100 KHz, Actual: 101 KHz
Done
Loading USBHost(Port2)...Done
NvDdkSdioSetClockFrequency: Requested: 25000 KHz, Actual: 25411 KHz
NvDdkSdioSetClockFrequency: Requested: 50000 KHz, Actual: 48000 KHz
Loading DisplayDriver...Done(38)
Set LCD to 640x480 (60Hz)
Loading Keyboard/MouseDriver...Done
Loading TouchDriver...Maximum Allowed Error 5:
Done
AX88772B: instantiate [AX88772B1]
AX88772B: WakeUpMode:[0] OID_WakeUpMode:[0]
Warning: you are requesting IOCTL_HAL_GET_DEVICE_INFO::SPI_GETPLATFORMTYPE, which has been deprecated.  Use IOCTL_HAL_GET_DEVICE_INFO::SPI_GETPLATFORMNAME instead.
AX88772B: ASX_DeRegisterAdapter()
AX88772B: AX88772BHalt()
AX88772B: RcbFreeCnt (16)
AX88772B: RcbRecvCnt (0)
AX88772B: un-instantiate [AX88772B1]
USB CABLE REMOVED
Suspend entry/exit kHz: Cpu = 216000, Emc = 166500, Sys = 143347
                                                                RM power state before suspend: Idle (4)
                       IшSMP: CPU 1 failed to start in time
NvDdkSdioSetClockFrequency: Requested: 100 KHz, Actual: 101 KHz
NvDdkSdioSetClockFrequency: Requested: 25000 KHz, Actual: 25411 KHz
NvDdkSdioSetClockFrequency: Requested: 50000 KHz, Actual: 48000 KHz
AX88772B: instantiate [AX88772B1]
AX88772B: WakeUpMode:[0] OID_WakeUpMode:[0]
AX88772B: ASX_DeRegisterAdapter()
AX88772B: AX88772BHalt()
AX88772B: RcbFreeCnt (16)
AX88772B: RcbRecvCnt (0)
AX88772B: un-instantiate [AX88772B1]
USB CABLE REMOVED
RM power state before suspend: Idle (4)

There is nothing after second suspend.

We have been able to reproduce this issue. This issue was introduced with in release V2.0 beta 1. We will further investigate and give you an update. The issue is on our road with the number 23998.