Forum Discussion

EBers's avatar
EBers
Icon for New Contributor rankNew Contributor
6 years ago

Generic QUAD SPI controller II

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.

4 Replies

    • EBers's avatar
      EBers
      Icon for New Contributor rankNew Contributor

      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

  • 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