Forum Discussion

RShal4's avatar
RShal4
Icon for Occasional Contributor rankOccasional Contributor
6 years ago

write to flash return OK, but does nothing !

Hello,

We are trying to access qspi (MT25QL512ABB8E12), which is the boot device. Booting the application works just fine.

We also see that erase and read is functional from drivers (reading the section of application, shows the expected info), also the write does an erase, but on getting to writing the data (after erase) , the memory remains fffff... (seen from memory view!), i.e. write returns success but does not write the new data into flash !

Our test application is the same one provided in NIOS software developer handbook (just writes and reads 1024 bytes) as shown here.

(just changed device name to "/dev/qspi_0_avl_mem", all the rest is the same ).

I suspected that it is write-protect issue, but even adding unlock ( alt_lock_flash(dev, 0) ) did not change anything.

More information:

nios clock is 100Mhz

EPCQ clock is 25Mhz

see qsys image

I also tried to debug altera driver alt_qspi_controller_write_block():

I see that memcpy is done, no error from controller are recieved according to function, ( "check whether write triggered a illegal write interrupt ") , yet the memory remains 0xffff (memory view)...

Is it some bug in quartus 15.1 IP/drivers ?

Any suggestion why it fails and how to debug it will help!

Thank you,

ranran

4 Replies