This application note provides software driver examples for 39VF400A 4 Mbit
Multi-Purpose Flash, that can be used in any microprocessor based system.
Please note that the software driver for 39VF400A is the same as the driver
for 39VF400 except the part number has been changed. Software driver examples
used in this document utilize two programming languages: (a) high -level "C"
for broad platform support and (b) optimized x86 assembly language. In many
cases, software driver routines can be inserted "as is" into the main body of
code being developed by the system software developers. Extensive comments
are included in each routine to describe the function of each routine. The
driver in "C" language can be used with many microprocessors and
microcontrollers, while the x86 assembly language provides an optimized solution
for x86 microprocessors. A Code Segment base address equal to C000h was used in
this sample code. Software designers shall assign the segment address
appropriate to their designs.
ABOUT THE 39VF400A
Companion product datasheet for the 39VF400A should be reviewed in conjunction
with this application note for a complete understanding of the device.
Both the C and x86 assembly code in the document contain the following routines,
in this order:
Name Function
------------------------------------------------------------------
Check_SST_39VF400A Check manufacturer and device ID
CFI_Query CFI Query Entry/Exit command sequence
Erase_One_Sector Erase a sector of 2048 words
Erase_One_Block Erase a block of 32K words
Erase_Entire_Chip Erase the contents of the entire chip
Program_One_Word Alter data in one word
Program_One_Sector Alter data in 2048 word sector
Program_One_Block Alter data in 32K word block
Check_Toggle_Ready End of internal program or erase detection using
Toggle bit
Check_Data_Polling End of internal program or erase detection using
Data# polling