Page 56 - Embedded Microprocessor Systems Real World Design
P. 56

Flash memory is a type of electrically erasable PROM  (EEPROM). For general
                 use in program storage, devices designated as EEPROM mostly have been replaced
                 by  flash memory. However, in  some applications, specialized EEPROMs are very
                 common. We’ll address these later.
                   When an EPROM needs to be erased and reprogrammed, you just pull it out of
                 the socket and take it to a PROM eraser and then to a programmer. As flash mem-
                 ories have grown in density, this becomes impractical since they no longer fit in a
                 dual inline package (DIP). Early flash parts were available in PLCC (plastic leaded
                 chip carrier)  packages, which could be socketed, but many newer parts are only
                 available in packages such as TSOP (thin small outline package) or BGA (Ball grid
                 array) that are difficult or impossible to put in a socket. The parts are soldered on
                 the board. The result is that in many designs, the only way  to program  the flash
                 memory  is  in-circuit, using the  microprocessor itself. This is fine  if  you want  to
                 program a flash memory to update an existing program. But how does the program
                 get into the memory in the first place?
                   Flash  memories  still can  be  programmed  by  a  programmer,  using  a  special
                 socket, before they are installed on the board. But what happens if the vendor (or
                 your own manufacturing department) inadvertently skips the programming step?
                 Or what if you get a batch of boards with the wrong program in the flash? Do you
                 scrap the entire lot?
                   Some designs are intended  to have  the flash memory programmed by  an in-
                 circuit programmer when the boards are tested. This is common in high-volume
                 designs. In a design that does not use this technique, it is a good idea to provide
                 a means  to  program  the flash using an  external fixture. To  do this, the  micro-
                 processor must tristate its address and data lines so the external circuit can get to
                 the flash. If  the microprocessor supports DMA  (see the DMA section later in this
                 chapter), it can be put in a hold state. Many processors will tristate their buses if
                 they are held in reset. If buffers or latches are used for the signals, or if the signals
                 pass through a PLD before they reach the flash, they can be tristated there.
                   Once the processor has released the bus, some means must be provided to access
                 the flash memory. This can be accomplished with a connector that brings out the
                 addreddata buses and control signals. If  there  is  no room for that, a matrix of
                 pads on the PCB, accessed with spring-loaded test pins, can be used instead.
                   Finally, an alternative to directly programming  the flash is to provide a means,
                 such  as  a  header,  to  install a  daughterboard  containing  a  small flash  memory
                 that replaces the system flash. By  mapping part of the system flash to a different
                 location  in  memory  when  the  daughterboard  is  installed,  the  boot  portion  of
                 the  system  flash  can  be  reprogrammed.  Such remapping  can  be  accomplished
                with a jumper on the main board, or it could be automatically activated when the
                 daughterboard is installed. The boot portion of the system flash, of course, would
                be  programmed  with  code  that  permits  the  remaining  flash  memory  to  be
                programmed.


                 Hardware Design 1                                                    41
   51   52   53   54   55   56   57   58   59   60   61