Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Writing data in SPI FLASH MEMORY MP25XX on SPARTRAN 3A

Status
Not open for further replies.

engrkhurram

Newbie level 4
Joined
Nov 20, 2009
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pakistan
Activity points
1,323
Hello friends i hope u r all fine
I need ur urgent and detailed help in my problem
Actually i need to interface a Mp2580 SPI 8Mbit serial flash with FPGA to store my data in it.
I need a MP25X80 or MP25X16 spi serail flash driver in verilog (along with documentation if possible) which write data into the flash and read back the stored data.
i have tried a controller availbale on open cores but its not working
plz do help
keenly waiting for ur reponse[/b]
 

The SPI core in the opencore will work provided you should have a microcontroller or a microprocessor to give command. the SPI controller just provides the SPI interface. You have to give commands from the microprocessor or u have to write a state machine to give commands to the SPI controller
 

thanx sudhir
well i converted the open core flash controller into verilog
can please guide me in writing the main module for this controller
.... or if u have some sample code can u send me on engrkhurram@YAHOO.COM
....................ONE MORE THING IF I TRY TO WRITE MY OWN CONTROLLER WAT CHANGES SHOULD I MEET FROM THE OPENCORE CONTROLLER?
 

The Flash memory what u r using can work with two kind of interfaces.
1. I2C
2. SPI

These both are protocols and it will provide only an interface between Flash and FPGA. Since the SPI Controller in Opencores is wishbone compliant you can send commands to the SPI controller with your state machine or FSM.
(You have verilog version of SPI Controller also in Opencores. To send commands read the SPI controller datasheet given with the source code).

Now u r ultimate aim is to program the Flash Memory.

Refer to the Flash datasheet and check the flow chart on what commands u have to give to the Flash to program. for detailed inforamtion check the timing diagram given in the datasheet. (Please dont confuse with the commands that have to be given to flash and the command used to congigure the SPI Controler. Both are different)
 

thanx sudhir i have searced for verilog code on open cores but couldn't find is there any other link
 

tHANX THANX ALOT IAM DOWNLOADING it i will try and let u know..........
u were sugeesting i2c interface does serial flash m25p80 or m25p16 support i2c + does spartran 3a supports i2c interface usage?
 

yes. I2C can also be implemented in FPGA. you can get the core from Opencores.
 

hi sudhir h r u
well bro my boss is adamant on spi he rejected i2c,
he says try to solve the problem using spi interface
.well if do get successful in writing a controller and synthesiinzing it, will i have to use spi header given on the kit or my data can be stored vis jtag + wat abt the jumper settings which are given for fpga configuration via spi flash do i have to follow those steps as ima only storing user data not the configuration files of fpga
 

what board r u using. do u have a microcontroller in your board.

if yes u r work is easy. else if u have only FPGA and the SPI flash you have to implement a state machine where you should get the data from the memory and then send it to SPI Flash.

The memory can be internal memroy of fpga also.

See the SPI controller datasheet and the test bench what they have given with the code. go though the test bench on how they r programming the SPI slave.
 

i don't have a microcontroller
i have designed a state mchine but problems i s that iam finding difficult in managing different timing cycles of m25px80 instructions
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top