ASeif
New Contributor
6 years agoUsing memory other than EPCS/EPCQ
Hi,
I was wondering if anyone know that W25Q127JV memory is compatible with EPCQ128?
I use NIOS II and Serial Flash Controller II. This controller can read memory but it fails to perform a write protection or erase that memory.
When I try to do a protection it returns fail code [-46].
When I try to erase a block NOIS II hangs there and it seems that it change memory content, so it causes factory image to be lost.
Would you please let me know where is the problem?
More info:
Quartus V18.0
NIOS II
Serial Flash Programmer II
--[Memory is chosen as EPCQ128]
--[Actual Memory is W25Q128JV]
/**********************************************************************************************************/
//Code part for locking first 1Mb of Memory
ret_code = alt_lock_flash(fd, 0b01011); // 0b0001-0011 : Locking 0 to 0xFFFFF (1Mb)
//--------------------------------------------------------------------------------------------------
//Result: ret_code => -46
/**********************************************************************************************************/
/**********************************************************************************************************/
//Code part for erasing sector 16 of Memory
ret_code = alt_erase_flash_block(fd, 0x100000, 0x10000);
//--------------------------------------------------------------------------------------------------
/*Result: System stops {memory content has been changed therefore it is expected to stops working because it is running in-place */
/**********************************************************************************************************/
/**********************************************************************************************************/
//Code part that works fine
ret_code = alt_get_flash_info(fd, ®ions, &number_of_regions);
printf("Offset:%d\r\nRegion Size:%d\r\nBlocks Count:%d\r\nBlock Size:%d\r\n",
regions->offset, regions->region_size, regions->number_of_blocks, regions->block_size);
//--------------------------------------------------------------------------------------------------
/*Result:
Offset:0
Region Size:16777216
Blocks Count:256
Block Size:65536
*/
/**********************************************************************************************************/