Re: PXA270 - Sleep & Wake



We found the hardware problem.

1) PWREN drops from 3.3V to Ground.
2) VCC_CORE drops from 1.6V to Ground
3) GPIO outputs assume their PGSRx defined states
I've tried multiple core frequencies. An errata mentioned 91MHz, so I was
trying that.
A=0, 2N=3, L=7, B=0, HT=0, F=1, T=0 (91Mhz)

One clue that we tracked down is we have an external 32K RTC oscillator,
with which we are driving the TXTAL_IN input. The loader enables the 32K
clock. When we entered sleep, this 32K clocked stopped. The problem was
the 32K clock source is an open collector output, with a pull-up resistor
going to a PWREN switched supply. When the PWREN signal dropped, so did the
supply, so did the pull-up, so did the 32K clock. With a cut & jump, we now
have an external 32K clock as well as sleeping and waking.

Thank you everyone!

Jim


"voidcoder" <voidcoder@xxxxxxxxx> wrote in message
news:%23R9Ba76TFHA.2976@xxxxxxxxxxxxxxxxxxxxxxx
> Are You sure that CPU is switched to SLEEP? Check the core voltage
> to see if You really enter SLEEP. What is the core frequency when
> You are trying to enter SLEEP mode?
>
>
> "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
>
>


.



Relevant Pages

  • Re: a proposed callout API
    ... given wall-clock (UTC) time. ... Others want to sleep on the absolute timescale, ... so it should not be affected by NTPD stepping the clock but only ... NTPD steps the clock. ...
    (freebsd-arch)
  • Re: Premature wakeup of time.sleep()
    ... >> clock, shich varies from os to os. ... Once you have a wakeup time, you can put your sleeper in a time-ordered queue, ... have the option of a hot return as if the sleep call hadn't happened. ... meaning any time there is any interrupt. ...
    (comp.lang.python)
  • Re: Being of average chronotype
    ... findings have shown that the average person prefers to sleep ... the article doesn't say whether this is clock time or solar time. ... Take THAT, Daniel Lin, Mark Sadek, James Lin & Christopher Chung! ...
    (rec.arts.sf.fandom)
  • 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)