Re: PXA270 - Sleep & Wake
- From: "Jim Merkle" <jimmerkle@xxxxxxxxxxx>
- Date: Mon, 2 May 2005 08:33:00 -0700
Good question. Yes it has.
"Piet" <pietdesomere@xxxxxxxxx> wrote in message
news:b498cce3.0505020418.1dcc1148@xxxxxxxxxxxxxxxxxxxxx
> 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
.
- References:
- Re: PXA270 - Sleep & Wake
- From: Piet
- Re: PXA270 - Sleep & Wake
- Prev by Date: Re: XXX_Open not being called !!
- Next by Date: Re: XXX_Open not being called !!
- Previous by thread: Re: PXA270 - Sleep & Wake
- Next by thread: Re: PXA270 - Sleep & Wake
- Index(es):
Relevant Pages
|