Execution times in early boot and AUX timing

Werner Almesberger werner at openmoko.org
Fri Jun 6 21:45:00 CEST 2008

Following up on the discussion whether resume-on-AUX is feasible on
GTA02, I did a few measurements:

NAND boot:
	rising edge of nRESET to start:		2.8ms
	start: to done_relocate:		128ms

NAND resume:
	falling edge of POWER to start:		21ms [1]
	start: to jump into kernel:		26ms

NOR boot:
        rising edge of nRESET to start:		~100us [2]
        start: to done_relocate:		54ms

NOR resume:
        falling edge of POWER to start:		20ms [1]
        start: to jump into kernel:		27ms

[1] Note that the PMU debounces POWER (ONKEY) for 14ms. 

[2] nRESET is measured on the debug board's button and rises slowly, 
    taking about 300us. Thus, this near-instantaneous response cannot 
    be measured very accurately.

The window during which changing the state of AUX can cause the system
to behave unpredictably is calculated from the time of the internal
reset to the jump to the relocated u-boot or into the kernel.

In the case of resume, my measurement setup can't determine the time
of the internal reset very accurately, so it's probably best to just
use the normal reset time.

This yields about 29ms for NAND, and 27ms for NOR. In other words, if
someone was to use AUX to wake up from resume, pressing AUX more than
20ms but less than 47ms could cause the system to do something weird.

When I briefly press AUX, it generates a pulse of about 50-80ms.
Since the pulse length depends on mechanical characteristics of the
switch, it seems quite possible that one could produce pulses shorter
than 47ms (or even bounces), and thus run into problems.

So this confirms what I already stated: AUX is not a good choice for
a wakeup source.

There are two more interesting times:

- how long does one have to wait in a normal boot after pressing
  POWER before one can press AUX (to invoke the NAND boot menu) ?

  I didn't measure this directly, but the response time to POWER plus
  the time from start: to done_relocate: should be a good approximation.
  Thus, this would be about 150ms.

  I also measured the time until u-boot checks if AUX is pressed. This
  is about 2.8 seconds after reset. Thus, the general rule for bringing
  up the boot menu would be:

  - hold and press POWER
  - wait 1s (more than 150ms, less than 2.8s)
  - hold and press AUX
  - wait until the boot menu appears
  - release AUX and POWER

- how long does one have to hold AUX when bringing up u-boot from NOR ?

  Again, I have no direct measurement. The same approximation would
  yield about 75ms.

  The general rule is to hold AUX until the boot menu appears, which
  is guaranteed to be well after we've left that critical phase.

- Werner

More information about the openmoko-kernel mailing list