Table of Contents

Advertisement

When table #1 is full we wrap around to table #0 again to continue the list, which is OK
since it has been erased.
The firmware determines which list is the beginning of the list by looking at the end of the
list. If one sector is empty, the decision is easy. If both list sectors are being used then one
(and only one) must be full, so the firmware checks the end of where each list would be
and concludes the other list must be the current one. If both sectors are empty, then the
disk has been newly erased and we use the first sector for the list [Fig 5.15].
Fig 5.15

5.3.4 Conclusions

We're used to using Flash memory cards, Flash USB sticks and even Flash Solid State
drives; so we think they must be simple. However, in reality managing Flash memory is
fairly tricky, because the technology itself is fairly inconvenient.
Most simple embedded systems that use Flash memory either use SD memory cards or
they use Flash memory in a simplistic way that doesn't provide for re-use.
FIGnition's Flash driver by-passes the SD Card protocol (which isn't open and free) and
implements a fully-reusable Flash driver in about 1.5Kb of compiled AVR code. It demon-
strates how flash memory can be used effectively within a constrained environment.
More sophisticated and efficient flash drivers are used in commercial systems which in-
clude larger embedded and mobile systems as well as the microcontrollers in flash cards
or solid-state disks.

Advertisement

Table of Contents
loading

Table of Contents