Problems using SPI Flash

Saxo/-L & Xylo/-EM/-L/-LM boards

Problems using SPI Flash

Postby mrks » Wed Jun 08, 2011 6:12 pm

Hi everyone,

I tried to access the SPI Flash which is used by the FPGA for its configuration.
For my tests I used an easy setup:
The configuration on the FPGA connects the SPI bus of the ARM processor with the corresponding configuration pins of the FPGA. On the ARM processor I configured the PINSEL and the SPI registers, did a chip select and tried to communicate with the SPI, without any success. The SPI mode (polarity and phase) matches the configuration given in the M25P40 datasheet.
This is an excerpt of what I tried next:
* I connected a bus pirate in SPI sniffing mode to the intermediate pins. All I could see were the commands I sent, but there was nothing returned by the flash.
* I discarded the SPI controller and wrote a program to drive the PINs by myself, having some more control over the clock etc. Same thing - the flash does not return anything
* I thought that maybe the flash was in deep power down mode, even the xilinx documents do not mention this, but the "return from deep power down" command did not solve anything

Finally, I soldered some wires to the flash and connected a logic analyzer:
* I can see the FPGA reading its configuration from the FPGA
* I can see iMPACT communicating with the flash (and iMPACT itself uses a dedicated FPGA configuration for that purpose but I just cannot figure out if they did any magic in that configuration)
* I can see all my commands which are generated by the ARM SPI controller or by the bus pirate or by myself controlling the GPIO pins (I desperately tried all 3 again) but the MISO pin just stays low all the time.

Either the flash does not get my commands (which is questionable since I can see them on the logic analyzer) or it doesn't interprete them (which is also questionable since I send the RES command and wait long enough until selecting the device again) or the flash does not respond (why?).
Maybe the FPGA ties the pin to ground, but I only use it as an input pin in this (very simple) design. I even tried constraints like PULLUP and PULLDOWN in the ucf (but all PULLUP did was rising the pin high so I only read 1-bits instead of 0-bits all the time). I also tried not using the pin at all in the design and setting the unused pins to float, but still no reaction on the screen.

So, any help would be appreciated
mrks
 
Posts: 2
Joined: Wed Jun 08, 2011 4:55 pm

Return to FX2 FPGA boards