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

Programming flash memories typically requires a specified sequence of writes to
                  specific locations. The Atmel AT49F080 uses the following sequence to initiate the
                  erase cycle:
                    Ad&       Data
                    5555      AA
                    2AAA      55
                    5555      80
                    5555      AA
                    2AAA      55
                    5555       10
                    Once erase is started, the memorywill complete the operation itself, timing it inter-
                  nally. Similar command sequences are used to protect and unprotect the boot block,
                  to request the manufacturer’s ID fiom the device, and to program a byte in the memory.
                    Most  flash  devices  use  -DATA  polling  when  programming.  This  allows  the
                  processor to poll the device by  attempting to read the location just programmed.
                  The flash memory returns the complement of the data that was written until the
                  internally timed programming cycle is complete.
                    Not  all block-organized flash memories have  a single small boot  block and a
                  larger main block. Some have multiple boot blocks, and some divide the memory
                  into a few large blocks.
                    Most modern flash devices can be programmed using only the normal supply
                  voltage  (5V, 2.7V,  or  3V). Internal  charge pumps  generate  the  higher voltage
                  needed for programming  (typically 12V). Flash devices also can be programmed
                  in a PROM programmer, which usually allows the boot block erase lockout to be
                  overridden.  Some microcontrollers with internal flash memory require an exter-
                  nal programming voltage.
                    While programming flash memory is different from programming an EPROM,
                  reading a flash memory is exactly like reading an EPROM. The flash memory will
                  have an additional input that controls writing of  the memory array and which is
                  inactive during reading.
                    Flash memory devices also have a means to read the device manufacturer  and
                  ID  code. This is  useful for device programmers,  but it also is often  needed  for
                  in-circuit programming.  Different  manufacturers  have  different  algorithms  for
                  erasing and  programming  flash  memory.  If  you  want  to  have  multiple  sources
                  for the flash memory in your design, your software will  need to read the flash to
                  determine which device is installed so it can determine which programming algo-
                  rithm  to use. You  also will  need  to retain  multiple  programming algorithms in
                  memory, one for each type of device you can substitute into the system. This was
                  no problem with EPROM-all   27256 EPROMs work the same when reading. Pro-
                  gramming differences were taken care of by the device programmer. On the other
                  hand, EPROMs cannot be reprogrammed in-circuit.


                  40                                              Embedded Microprocessor Systems
   50   51   52   53   54   55   56   57   58   59   60