Unable to write to MT25QU2G from Arria 10 SOM
I am using module Arria 10 SOM by iWave with IC Flash MT25QU256. I am trying to read and write from NIOS II processor to different sectors of this flash.
Currently, I'm using the IP Core Generic Quad SPI Controller II from Quartus Prime 18.1 Standard IP Core. In NIOS II software program, I'm using APIs from HAL (alt_qspi_controller2_write and alt_qspi_controller2_read) to read and write to this flash. My simple program writes a value (0x1234578) to sector 504 (the flash contains 512 sectors with 64KB each) and reads back from this sector. But the result from the reading returns 0xFFFFFFFF, so that I think that I didn't write to the flash successfully. Also I tried to write different sectors with the same method but still returns the same result.
Is this an error from the IP Core ? I read from the core user guide that it is compatible with Micron's flash devices. So if it really is, what IP Core should I use to read and write to Micron's flash devices ?