cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
7,485 Views
Registered: ‎08-27-2014

SPANSION FLASH INTERFACE WITH SPARTAN 3AN FOR WRITE AND READ THE DATA BYTES USING SPI PROTOCOL

Dear all.....
           Here the verilog code and simulation model for write/read the single byte of data into the specific address byte of the flash s25fl204k memory using SPI Protocol which is 4-wire  MOSI,MISO,CS,SCK are Configured for normal dual(I/O) pins of SPARTAN-3an FPGA.

HERE THE PROTOCOL BYTES  I USED TO WRITE/READ THE DATA BYTES BASED ON DATASHEET OF spansion S25FL204K THE ABOVE FLASH
                       
BYTE READ

FOR MOSI( RISING EDGE OF SCK )

*Byte one   - 03h(code for read)
*Byte 2,3,4 - address byte 24bit      
*byte 5     -dont care

FOR MISO ( FALLING EDGE SCK  )     
               
*during byte 5 of MOSI

BYTE WRITE*Byte one   - 06h(WRITE ENABLE)
*Byte 2     -02h (code for pag program)
*3,4,5 - address byte 24bit
*byte 6    -data = 8'h10101010

 

The  simulation waveform  is  attached in the below jpeg picture 
can any tell me this is the correct procedure for access the spansion flash with fpga .thak you

 

s25fl204k_write_read.png
0 Kudos