SST39VF200A Software Driver_Assy

SST39VF200A Software Driver_Assy - Software Driver 39VF200A...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Software Driver 39VF200A 2 Mbit Multi-Purpose Flash September 2001 ABOUT THE SOFTWARE This application note provides a software driver example for 39VF200A 2 Mbit Multi-Purpose Flash, that can be used in any microprocessor based system. Software driver example used in this document utilizes 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 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 39VF200A Companion product datasheet for the 39VF200A should be reviewed in conjunction with this application note for a complete understanding of the device. The x86 assembly code in the document contains the following routines,
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 in this order: Name Function ------------------------------------------------------------------ Check_SST_39VF200 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 8086 ASSEMBLY LANGUAGE DRIVERS
Background image of page 2
Sheet1 Page 3 SECTOR_SIZE EQU 2048 BLOCK_SIZE EQU 32768 SST_ID EQU 00BFh SST_SST39VF200 EQU 2789h ABS_SEGMENT EQU 0C000h extrn Delay_150_Nano_Seconds:near extrn Delay_25_Milli_Seconds:near extrn Delay_100_Milli_Seconds:near
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 4 Check_SST_SST39VF200 proc near push ax push ds pushf p cli mov ax, ABS_SEGMENT mov ds, ax mov ds:word ptr [5555h], 0AAAAh mov ds:word ptr [2AAAh], 05555h mov ds:word ptr [5555h], 09090h
Background image of page 4
Sheet1 Page 5 call Delay_150_Nano_Seconds mov ax, ds:[0] cmp ax, SST_ID jne CSC5 mov ax, ds:[1] cmp ax, SST_SST39VF200 jne CSC5 CSC4: popax andax, 0FFFEh jmp short CSC6 CSC5: popax orax, 0001h CSC6: pushax
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 6 mov ds:word ptr [5555h], 0AAAAh mov ds:word ptr [2AAAh], 05555h mov ds:word ptr [5555h], 0F0F0h call Delay_150_Nano_Seconds popf pop ds pop ax ret Check_SST_SST39VF200 endp
Background image of page 6
Sheet1 Page 7 CFI_Query proc near pushf push ax push ds cli mov ax, ABS_SEGMENT mov ds, ax mov ds:word ptr [5555h], 0AAAAh mov ds:word ptr [2AAAh], 05555h mov ds:word ptr [5555h], 09898h call Delay_150_Nano_Seconds
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 8 mov ds:word ptr [5555h], 0AAAAh mov ds:word ptr [2AAAh], 05555h mov ds:word ptr [5555h], 0F0F0h call Delay_150_Nano_Seconds pop ds pop ax popf ret CFI_Query endp
Background image of page 8
Sheet1 Page 9 Erase_One_Sector proc near push ax mov es:word ptr [5555h], 0AAAAh
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/08/2010 for the course CMPE 46 at San Jose State University .

Page1 / 42

SST39VF200A Software Driver_Assy - Software Driver 39VF200A...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online