PXA270 - Sleep & Wake



I'm having difficulty putting my PXA270 to sleep and then waking it via
GPIO_0.
In order to more rapidly test this, I put the following module into my
loader, which can be invoked as a command:
No attempt is being made in this example to preserve any specific state,
conserve power, or preserve SDRAM. Should the processor wake from sleep,
the loader will display the reset cause and the values of the PSSR and RCSR
registers.

// Prototype assembly function that pokes R0 into CP14, register 7
extern "C" void WritePWRMODE(DWORD dwSleepMode);
#define PWRMODE_SLEEP 0x00000003 // Value for cp14: Reg7 to induce sleep.

// Perform minimal steps necessary to configure the PXA270 for sleep and
// wake up from the Philips, then initiate a sleep.
STATUS CmdSleep(int argc, char * argv[])
{
volatile PMRC_REGS * pPmrcRegs = (PMRC_REGS *)PWR_BASE_U_VIRTUAL;

// Configure the state of the GPIO outputs during sleep
/*
; PGSR0: 0 .. 31
PGSR_nEnCF33V GPIO_13 ; 0: enable 3.3V to User CF card, 1:
turn off 3.3V
PGSR_nEnCF50V GPIO_14 ; 0: enable 5.0V to User CF card, 1:
turn off 5.0V
PGSR_nEnUtilPwr GPIO_22 ; 0: enable 5V supply, 1: dissable 5V
supply
PGSR_FF_nRTS GPIO_27 ; For "normal" RS-232, we want this line
high, for RS-485, we want this low

; PGSR1 32 .. 63
nFFUART_RS422 GPIO_32 ; If we want the RS-232 transceiver
enabled, raise this line
PGSR_nPOE GPIO_48
PGSR_nPWE GPIO_49
PGSR_nPIOR GPIO_50
PGSR_nPIOW GPIO_51
PGSR_nPCE2 GPIO_54

; PGSR2 64 .. 95
PGSR_FF_nDTR GPIO_82
PGSR_nPCE1 GPIO_85 ; another PCMCIA bit

; PGSR3 96 .. 120
PGSR_EnCoreLow GPIO_100 ; 1: 1.0V core voltage
*/
pPmrcRegs->pgsr0 = GPIO_13 | GPIO_14 | GPIO_22 | GPIO_27;
pPmrcRegs->pgsr1 = GPIO_48 | GPIO_49 | GPIO_50 | GPIO_51 | GPIO_54;
//pPmrcRegs->pgsr1 = GPIO_32 | GPIO_48 | GPIO_49 | GPIO_50 | GPIO_51 |
GPIO_54;
pPmrcRegs->pgsr2 = GPIO_82 | GPIO_85;
//pPmrcRegs->pgsr3 = GPIO_100;
pPmrcRegs->pgsr3 = 0;

// Configure the wake-up event
pPmrcRegs->prer = GPIO_0; // (GPIO_0 rising edge) 0x00000001
pPmrcRegs->pfer = GPIO_0; // (GPIO_0 falling edge) 0x00000001
pPmrcRegs->pwer = GPIO_0; // (GPIO_0 event) 0x00000001

// Configure the PCMCIA output drive, 13Mhz oscillator during sleep
pPmrcRegs->pcfr=0;

// Sleep Configuration register
// Set Ramp up for power domains, ignore VDD_FAULT, Keep P1 domain
powered with clocks running
//pPmrcRegs->pslr = BIT_31|BIT_30|BIT_27|BIT_26|BIT_22|BIT_3;
pPmrcRegs->pslr = 0xCC400008;

printf("CmdSleep: Going to sleep...\r\n");

// Wait for the last character in the above line to get out
msWait(1); // wait one millisecond

WritePWRMODE(PWRMODE_SLEEP); // Initate SLEEP (0x03 - regular sleep)

// Do not return!!!
while(1);

return STATUS_SUCCESS;
} // CmdSleep

The processor appears to be sleeping peacefully, but it refuses to wake when
pulsed on GPIO_0. I can tell the processor has entered sleep since the
settings in PGSRx have taken effect, driving each of the GPIOs to its
requested state. (There's still the possibility we have a hardware
problem...)

Any ideas?

Thank you,

Jim Merkle


.



Relevant Pages

  • Re: PXA270 - Sleep & Wake
    ... Have You looked through the "PXa27x Speciafication Update". ... > I'm having difficulty putting my PXA270 to sleep and then waking it via ... > // wake up from the Philips, ... > // Configure the state of the GPIO outputs during sleep ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Who needs AppleTV?
    ... I said "about one second" long before you started to drag up specs of unrelated hard drives. ... "Are you actually trying to claim that a Mac laptop won't wake ... from sleep in about a second?" ...     in a second. ...
    (comp.sys.mac.advocacy)
  • Re: Off switch blues
    ... "It" is the operating system. ... Here's what the Apple documentation says: "To wake your computer from ... sleep, press a key on the keyboard, or click the mouse. ... requires this), the problem is that it STAYS awake, even though the user ...
    (comp.sys.mac.system)
  • Re: Lady DArbanville Lyrics (aka nsa Timisoara+Moldova Scenario second location) Re: remember phoeni
    ... My Lady d'Arbanville why do you sleep so still? ... I'll wake you tomorrow ... This rose will never die this rose will never die. ... hei joben, ...
    (soc.culture.romanian)
  • [RFC] sleepy linux
    ... Download this big chunk in mozilla, then go to sleep ... but wake me up in 8:30 with mp3 player ... +void detect_idle; ... static int enter_state ...
    (Linux-Kernel)