Dual SPI XIP mode doesn't work on HiFive1 RevB

I’m trying to speed up the flash interface and faced with a problem. When I configure the interface to use 0xBB command in regular mode (ffmt=0x00BB1447) everything works fine, but when I try to switch into AX mode all subsequent commands don’t contain an address part.

My setup sequence (everything is executed from RAM):
fctrl.en=0
ffmt=0xA0BB1447
fctrl.en=1
read 0x20000010, the result is ok
fctrl.en=0
ffmt=0xA0BB1446 – the same as above, but cmd_en=0
fctrl.en=1
read 0x2000_0004, the result is wrong

First read:

Second read:


The second read contains just 20 cycles (4 dummy cycles and 16 data cycles) instead of 32 cycles.

How I should set up SPI peripheral for this mode of operation? Is it a hardware bug?
Are there any example for Quad SPI flash mode configuration?

I have a version that uses the FQDO command instead of FQDIO. Running the SPI clock at 40 MHz, the NORD command took 350 microseconds to read 1 KiB to DTIM, with the FQDO command it takes 200 microseconds.

I would like to do quad mode, but I have not yet been able to alter the darn status register in the IS25LP032D, have to mess with it for a bit.

I placed the code at Free APEX Subset download | SourceForge.net. Click “browse code” button and choose “repository.” Over on the left, click on the develop branch, there is almost nothing in master, Then you will find it under proto/FQDO_example

1 Like

I’m sorry, typo. You will find the example not under proto/FQDO_example, but rather proto/FRDO_example