FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6514 Discussions

Generic QUAD SPI controller II

EBers
Beginner
3,050 Views

I am using a Micron MT25QL256 flash (replacing EPC256) and can't write protect sectors. I issue the command with the appropriate bits set but nothing is updated in the status register. I have externally mastered the SPI bus and issue the write enable (06h) and write status (01h) commands that then protect the flash. The generic quad SPI interface will then show the protected status. I suspect there is a missing write enable command in the IP.

0 Kudos
4 Replies
YuanLi_S_Intel
Employee
2,652 Views

Hi Eric,

 

Seems like there is some problem with the IP or the connection between FPGA and the flash memory. Can i check with you whether you have set MSEL pins for ASx4 configuration scheme?

 

For more information about the IP, you may refer to link below:

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_embedded_ip.pdf (page 247)

 

Regards,

YL

0 Kudos
EBers
Beginner
2,652 Views

Hi YL,

 

I have MSEL set to ASx4 and I am using Quartus 18.1 with a patch to support the Micron MT25QL256 device.

 

Eric

0 Kudos
YuanLi_S_Intel
Employee
2,652 Views

Hi Eric,

 

It seems like it is due to Quartus design problem, just would like to check if you have connected the IP with the component as shown at link below?

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug-gen-sfi.pdf (Page 12)

 

Have you tried other command and see if it can be executed properly?

 

Regards,

YL

 

0 Kudos
Muhammad_Ahsan_Razaq
2,406 Views

I have got the same issue. I can not write any data on MT25QL256. I am using the functions defined in the header file  "altera_generic_quad_spi_controller2.h".

i.e. 

int alt_qspi_controller2_read(alt_flash_dev *flash_info, int offset, void *dest_addr, int length);

int alt_qspi_controller2_get_info(alt_flash_fd *fd, flash_region **info, int *number_of_regions);

int alt_qspi_controller2_erase_block(alt_flash_dev *flash_info, int block_offset);

int alt_qspi_controller2_write_block(alt_flash_dev *flash_info, int block_offset, int data_offset, const void *data, int length);

int alt_qspi_controller2_write(alt_flash_dev *flash_info, int offset, const void *src_addr, int length);

int alt_qspi_controller2_lock(alt_flash_dev *flash_info, alt_u32 sectors_to_lock);

 

P.S. The Flash gets programmed using the Quartus Programmer and I can read the data from Flash in NIOS which gets written using Programmer.

Regards,

AR

0 Kudos
Reply