Re: PXA270 - Sleep & Wake

Tech-Archive recommends: Fix windows errors by optimizing your registry



Has GPIO 0 been configured as an input in the GPDR register?

P


"Jim Merkle" <jimmerkle@xxxxxxxxxxx> wrote in message news:<eeUlY$QTFHA.3308@xxxxxxxxxxxxxxxxxxxx>...
> 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: `How to resume ce 6.0 from PXA 27x standby mode?
    ... As he intends to use Standby Mode instead of Sleep or Deep Sleep for Suspend or Idle? ... Just like Sleep Mode, the Standby more will put the SDRAM into self-refreshing, so it is expected to brought-out of Self-Refresh mode after leaving Standby mode. ... it needs to be write one to clear after existing Standby mode or the GPIO will be held in its sleep-mode states. ... stand by mode unit retention bits in PSTR register are set ...
    (microsoft.public.windowsce.platbuilder)
  • Re: PXA270 - Sleep & Wake
    ... GPIO outputs assume their PGSRx defined states ... When we entered sleep, this 32K clocked stopped. ... the 32K clock source is an open collector output, ... >> Has GPIO 0 been configured as an input in the GPDR register? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: PXA270 - Sleep & Wake
    ... > Has GPIO 0 been configured as an input in the GPDR register? ... Should the processor wake from sleep, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: XScale sleep mode
    ... Removed all wakesources, (PRER, PFER, PWER have all bits set to 0) ... GPIO lines considered - but if it isn't actually going to sleep ... increased power consumption over that which might be expected. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Problem in XScale exiting from sleep mode after a fault signal assert
    ... Any time the PXA255 enters sleep, the processor itself is basically powered ... and begins execution from the reset vector when it is brought out of ... Early, within the boot code, the Reset Controller Status Register ...
    (microsoft.public.windowsce.platbuilder)