09-16-2019 10:51 PM
I have Artix 7 FPGA with Quad SPI flash memory. I have configured the flash memory device before it works fine. suddenly it showed this error(refer the image) and memory is not programmed. please help me to resolve this error
09-17-2019 05:14 PM
So this flash had been successfully programmed and then configured FPGA right? You were trying to assign a flash image to it and then this error popped up? Can bitstream download to A7 as expected?
If this is the case, first double check the hardware. Connections might got broken, such as ESD.
The second error might be caused by some tool or implementation issue; anyhow the first one means Vivado can no longer access the flash.
09-20-2019 04:48 AM
09-25-2019 05:01 PM
10-14-2019 03:31 AM
It's annoying, but quite possible, to place a flash chip into a state where it doesn't understand SPI commands. I actually do this all the time. For example if you can activate the QSPI mode, you can immediately issue an address, wait 6 SCK cycles, and then get data out without needing to add an additional 8 SCK cycles to issue a command. The problem with this mode is that another controller that isn't familiar with what you are doing (Vivado for example) might then struggle to place the flash into a known good state.
I personally solved this problem in my own flash controller by sending an 16'bit all-ones SPI command to the flash. 1) There's no such command implemented on most flash devices, so it doesn't do anything, and 2) if the flash is in this QSPI mode it then releases it once the CS pin is released. From that point I can use the flash no matter which mode it's in.
While I'm not quite certain how Vivado programs a flash chip, it's important that you don't try to send SPI commands while you are still in a QSPI mode. An easy solution to this might be to power down the flash (i.e. the whole board) before attempting to write to it. That *should* return the flash to a known mode.
Except ... Micron.
The Micron flash chip used on the initial Arty designs had a "feature" where it could power up directly into this mode if so enabled in the Non-volatile Configuration register. Doing so, however, would be very likely to confuse any flash programmer. (I could be wrong here ...) I know that the flash chip on the Arty has been changed now several times, so its not necessarily clear which flash chip you are working with, but it might be something worth checking.
Were this my own design, I'd load an image into the FPGA and start querying the flash myself. First, I'd start with the ID command (I think it's a 0x9f ...) and read the manufacturers ID off of the part. If that didn't work, I'd send some all ones SPI commands to the flash (MOSI pin only!) and try again. Watch out for the fact that chips like Micron may not respond in the number of cycles you are expecting. (Incidentally, this is probably where Vivado is having troubles ... although it is possible your Vivado is out of date, and that this is a newer flash chip than Vivado recognizes ...) Look up the part number, find the data sheet for your flash chip, and start querying the various configuration registers to see what's going on. Yes, there are some chips with configuration registers that cannot be reset.
You can read more about my own flash hassles--with the Arty even, and how I eventually solved them, here.