WINCE WAKEUP from SUSPEND

This forum is for users of Atmel's SAM Series and who are interested in using WinCE OS.

Moderator: nferre

bob
Posts: 44
Joined: Fri Jan 16, 2009 10:46 pm

WINCE WAKEUP from SUSPEND

Fri May 08, 2009 1:30 pm

Hi,
I have a problem with the suspend wake-up procedure. I'm using the sam9263 with wince 6.0R2. I'm using a key button to wake-up the system.
I put in suspend mode the system using the menu start->suspend,
1) if I wake-up the system in about 30 seconds everything works fine
2) if I wake-up the system after 30 seconds the system hangs
KeyPadPowerOff customclass
KeyPadPowerOff
resetting RTT to delay rollover
BSPPowerOff
+SOCSaveAndDisableAllIntrBeforeSuspend()
SOCPioSaveAndDisableAllIntrBeforeSuspend()
+SOCPioControllerIntrEnable()
OALPowerWakeSource enable 17

SUSPEND CPU

+SOCRestoreAllIntrAfterSuspend()
+SOCPioRestoreAllIntrAfterSuspend()
BSPPowerOn
-----system hangs -----

any idea? (I have disabled all the timers in the PM power module)
thanks
ianscriven
Posts: 18
Joined: Wed Nov 25, 2009 4:15 am

Re: WINCE WAKEUP from SUSPEND

Mon Feb 08, 2010 4:30 am

Hi,

Did you ever figure this out? I'm experiencing the same problem at the moment.
guangyu.ren
Posts: 23
Joined: Tue Mar 31, 2009 7:22 am

Re: WINCE WAKEUP from SUSPEND

Tue Feb 09, 2010 5:18 am

This could be due to the data loss in SDRAM during suspend period.
To confirm it, you can try disabling all the SDRAM and PMC configure code in PLATFORM\AT91SAM9263EK\SRC\OAL\OALLIB\asmpower.s to let SDRAM and all the clock run as normal during suspend.

And see whether you still have this problem or not.
uma_crlbel
Posts: 2
Joined: Sat Jun 13, 2009 7:38 am

Re: WINCE WAKEUP from SUSPEND

Tue Jul 27, 2010 6:22 am

Dear Sir,

Can you please post the stps which you have followd to solve this issue.

With regards,
uma
ianscriven
Posts: 18
Joined: Wed Nov 25, 2009 4:15 am

Re: WINCE WAKEUP from SUSPEND

Fri Jul 30, 2010 12:48 am

This is my BSPPowerOff function (in platform/at91sam9263ek/src/oal/oallip/power.c) - I think this the change I made to make it work (it was a while ago)...

Code: Select all

VOID BSPPowerOff(DWORD *pdwSavePCConfig, DWORD *pdwSaveSCConfig)
{
	AT91PS_PMC pPMC = OALPAtoVA((DWORD)AT91C_BASE_PMC,FALSE);
	AT91PS_SDRAMC pSDRAM = OALPAtoVA((DWORD)AT91C_BASE_SDRAMC0,FALSE);

	RETAILMSG(1,(TEXT("BSPPowerOff\r\n")));
	// Save the settings in order to restore them after a resume
	*pdwSavePCConfig = pPMC->PMC_PCSR;
	*pdwSaveSCConfig = pPMC->PMC_SCSR;

	pSDRAM->SDRAMC_LPR = AT91C_SDRAMC_LPCB_SELF_REFRESH;

	//stop unecessary clock
	// The PIOC should be awake for resume, PIOA maybe for the Touschscreen IRQ
	// For the others three, poweroff should be implemented in the driver code, in order to correctly manage the poweroff
	//pPMC->PMC_PCDR = ~((1 << AT91C_ID_PIOCDE) | (1 << AT91C_ID_PIOA) | (1 << AT91C_ID_AC97C) | (1 << AT91C_ID_2DGE) | (1 << AT91C_ID_EMAC) | (1 << AT91C_ID_US0) | (1 << AT91C_ID_DMA ));		//0xFF5BFFEB
	pPMC->PMC_PCDR = ~((1 << AT91C_ID_PIOA) | (1 << AT91C_ID_2DGE));		//0xFF5BFFEB
	//pPMC->PMC_SCDR = ~(AT91C_PMC_PCK);
	pPMC->PMC_SCDR = 0xFFFFFFFF;
}
The last bit (stop unecessary clock...) will probably be different for your system or the eval board, so I'd just leave it as the default. The two pSDRAM lines are the ones that matter.
uma_crlbel
Posts: 2
Joined: Sat Jun 13, 2009 7:38 am

Re: WINCE WAKEUP from SUSPEND

Fri Jul 30, 2010 5:21 am

Thanks for the reply sir,

I could do it.

This is my BSPPowerOff:

VOID BSPPowerOff(DWORD *pdwSavePCConfig, DWORD *pdwSaveSCConfig)
{
AT91PS_PMC pPMC = OALPAtoVA((DWORD)AT91C_BASE_PMC,FALSE);

// UMA 27-07-10
AT91PS_SDRAMC pSDRAM = OALPAtoVA((DWORD)AT91C_BASE_SDRAMC0,FALSE);

RETAILMSG(1,(TEXT("BSPPowerOff\r\n")));
// Save the settings in order to restore them after a resume
*pdwSavePCConfig = pPMC->PMC_PCSR;
*pdwSaveSCConfig = pPMC->PMC_SCSR;

//stop unecessary clock
// The PIOC should be awake for resume, PIOA maybe for the Touschscreen IRQ
// For the others three, poweroff should be implemented in the driver code, in order to correctly manage the poweroff

pPMC->PMC_PCDR = ~((1 << AT91C_ID_PIOCDE) | (1 << AT91C_ID_PIOA) | (1 << AT91C_ID_AC97C) | (1 << AT91C_ID_2DGE) | (1 << AT91C_ID_EMAC)); //0xFF5BFFEB
pPMC->PMC_SCDR = ~(AT91C_PMC_PCK);

// UMA 27-07-10
//Put SDRAM in SELF_REFRESH mode
pSDRAM->SDRAMC_LPR = AT91C_SDRAMC_LPCB_SELF_REFRESH | AT91C_SDRAMC_TIMEOUT_128_CLK_CYCLES;

}


Thankyou verymuch.

Return to “WinCE”

Who is online

Users browsing this forum: Bing [Bot] and 5 guests