QSPI Flash Programming

Hi everyone,

I’m having some issues regarding the QSPI flash on the Arria10 SoC DevKit. I’m following this guide : https://rocketboards.org/foswiki/Documentation/A10Gsrd161QspiBoot . After having issues creating the Kernel, I gave up and used the pre-compiled files to create the QSPI image. I am unable to program the flash with my image. Below is the event log from the terminal:

Info: Command: quartus_hps -c 1 -o PV -a 0x0 uboot_w_dtb-mkpimage.bin
Current hardware is: USB-BlasterII [3-3]
Successfully change hardware frequency to 16Mhz
Found HPS at device 2
Double check JTAG chain
Warning: Overwrite HIR => 11, HDR => 2
HPS Device IDCODE: 0x4BA00477
AHB Port is located at port 0
APB Port is located at port 1
Double check device identification …
Warning: Device is Arria 10 SoC
Setup non-secure transaction …
Boot Info: 1.8V QSPI Flash
Clock Select: 0
Start HPS Quad SPI flash programming …
Initialize QSPI peripheral and flash controller …
Assuming QSPI controller system clock is 50Mhz
QSPI controller baudrate setting: 32 (15)
Read Silicon ID of Quad SPI flash …
Quad SPI Flash silicon ID is 0xFFFFFFFF
Error: Not able to map flash ID from flash database
Error: Quartus Prime Programmer was unsuccessful. 0 errors, 0 warnings

Things I’ve tried:
Changing Boot Select between 1.8V and 3.0V.
Changing to Active Serial Programming mode on SW4 MSEL pins.
Both instruction sets (Writing U-Boot and RBF and Booting U-Boot & Writing Full QSPI image and Booting Linux)

I get the same issue regarding the Flash Silicon ID in each instance. I’ve read somewhere that the Flash might be bricked; I certainly hope that’s not the case and there’s some setting I’m missing that can get the programmer working. If anyone can point me in the right direction please let me know.

Thanks,
Bogdan

Oooh, that’s familiar.

I’ve had a similar issue when I flashed a sd-card image on the SPI by mistake. After that the u-boot would configure the Arria 10 for SD boot as soon as the chip was powered up and then the flasher would fail with this error.

After a bit of hair pulling we opted for a rather ugly hack: we soldered a switch onto the SPI daughterboard to manually reset it:

Then we’d just hold the button while powering up the board (so that the A10 ROM would fail to load u-boot) then after a second or so you can release it and reflash the SPI correctly. You can use a similar hack for the NAND by the way.

Now there’s probably a more elegant solution, technically with the JTAG you should be able to override U-boot’s config to put the A10 back in SPI mode to let the flash go through but soldering two wires was quicker than figuring that out…

Hope that helps.

Hi Lionel,

Thanks to your reply, I realized that I didn’t have the QSPI Flash daughtercard mounted. I mistakenly thought the Flash was pre-soldered to the board. So that’s one problem down.

I’m still getting “Quad SPI Flash silicon ID is 0xFFFFFFFF , Error: Not able to map flash ID from flash database”. I just loaded a fresh daughtercard so there shouldn’t be any preexisting images causing the flasher to fail as in your case. I do believe you have the right idea with the uboot causing an issue. I’ve read in another tutorial that “If the QSPI does not contain a valid bootloader the HPS will boot from FPGA as fall back.”

I’m already deviating from the steps in the guide form my original post. It doesn’t mention shifting the location of the boot select pins. If I leave them in SD mode, I can stop uboot as I can see it loading in the terminal window, but the HPS programmer wont work as the BSEL pins aren’t in QSPI or NAND config. If I change BSEL to QSPI, I can get the flash programmer to run to the error I originally posted, but there’s no activity in the serial terminal to stop the u-boot process. I have no idea if this is the issue, I have to keep testing.

Thanks,
Bogdan