Nick: icon
E-mail: none
Board: any
Contents: 
Booting from External Flash
===========================

If the onboard flash chip has a /HOLD pin with weak pull-up:

                                |
            onboard             |                external
                                |
                         Vcc    |                                    Vcc
                          |     |                                     |
                          o_____|_8___________________________________o
                         /|\    |                                    /|\
                        Ro| |   |                                   | | |
          ______________| | Rh  |                                   Rw| |
      ___|________________|_|___|_1_______________                  | | |
     |  _|________________|_|___|_2_____________  |   ______________| | |
     | | |   __________   | |   |               | |  |   __________   | |
     | | |  |O         |  | |   |               | |  |  |O         |  | Rw
     |_|_|__|/CS    VCC|__| |   |               | |__|__|/CS    VCC|__| |
       |_|__|MISO /HOLD|____o___|_7_____        |____|__|MISO /HOLD|____|
         |__|/WP    CLK|________|_6_____|_________   |__|/WP    CLK|__
          __|GND   MOSI|________|_5_____|_______  |   __|GND   MOSI|__|_
         |  |__________|        |       |       | |  |  |__________|  | |
         |                      |       |       | |__|________________| |
         |                      |       Rs      |____|__________________|
         |                      |       |            |
         o______________________|_4_____o____________o    Ro: onboard
         |                      |                    |    Rh: onboard hold
        ===                     |                   ===   Rs: strong
         =                      |                    =    Rw: weak
                                |

It's actually quite simple: The SPI bus allows multiple slaves.
Hence, MISO, MOSI and CLK can be shared among chips. Usually,
each slave is supposed to have a separate /CS signal. We can
borrow the onboard chip's /CS if we can keep that chip in the
hold state. This is accomplished by pulling its /HOLD pin low
and possible when its onboard pull-up resistor (Rh) is weak
enough.

The maximum value for Rs (the external pull-down to override Rh)
is given by:

               Vil_max * Rh
    Rs_max = ---------------
              Vcc - Vil_max

Where `Vil_max` is the maximum input voltage for a logical low
signal (see datasheet). It's often `0.3 * Vcc` which would give
us:

    Rs_max = Rh * 3 / 7

Roughly 1/3 of Rh should be a reasonable choice for Rs. But one
should make sure that `Rh + Rs` won't overload the power supply.