Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: WINCE WAKEUP from SUSPEND
PostPosted: Fri May 08, 2009 1:30 pm 
Offline

Joined: Fri Jan 16, 2009 10:46 pm
Posts: 44
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


Top
 Profile  
 
 Post subject: Re: WINCE WAKEUP from SUSPEND
PostPosted: Mon Feb 08, 2010 4:30 am 
Offline

Joined: Wed Nov 25, 2009 4:15 am
Posts: 18
Hi,

Did you ever figure this out? I'm experiencing the same problem at the moment.


Top
 Profile  
 
 Post subject: Re: WINCE WAKEUP from SUSPEND
PostPosted: Tue Feb 09, 2010 5:18 am 
Offline

Joined: Tue Mar 31, 2009 7:22 am
Posts: 23
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.


Top
 Profile  
 
 Post subject: Re: WINCE WAKEUP from SUSPEND
PostPosted: Tue Jul 27, 2010 6:22 am 
Offline

Joined: Sat Jun 13, 2009 7:38 am
Posts: 2
Dear Sir,

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

With regards,
uma


Top
 Profile  
 
 Post subject: Re: WINCE WAKEUP from SUSPEND
PostPosted: Fri Jul 30, 2010 12:48 am 
Offline

Joined: Wed Nov 25, 2009 4:15 am
Posts: 18
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:
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.


Top
 Profile  
 
 Post subject: Re: WINCE WAKEUP from SUSPEND
PostPosted: Fri Jul 30, 2010 5:21 am 
Offline

Joined: Sat Jun 13, 2009 7:38 am
Posts: 2
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: