Forum Discussion

RPind1's avatar
RPind1
Icon for New Contributor rankNew Contributor
5 years ago

No output from Generic Serial Flash Interface Intel FPGA IP from basic commands.

I can not get any responses from the MT25QL512 using the Generic Serial Flash Interface.

I am using a MT25QL512 using a 10Mhz clock and running the following NIOS commands:

//enable chip
 
 IOWR_32DIRECT(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,FLASH_REG_CONTROL,0x01);
 
 
 
         unsigned int number_bytes = 4;//5bit
 
	 unsigned int dummy_cycles = 0;//4bit
 
	 unsigned int opcode = 0x9f;
 
 
 
	 regvalue = (dummy_cycles << 16) |
 
	 		      (number_bytes << 12) |
 
			      (config_flash_cmd_data_type_read << 11) |
 
			       (config_flash_cmd_address_bytes_0 << 8) |
 
                                    opcode ;
 
IOWR_32DIRECT(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,FLASH_REG_CMD_SETTING,regvalue);
 
IOWR_32DIRECT(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,FLASH_REG_CMD_CONTROL,1);
 
printf("\n Write Command : %x  \n" , regvalue);
 
printf("\n       ->: %x\n",IORD(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,FLASH_REG_RD_DATA0) );
 
printf("\n       ->: %x\n",IORD(INTEL_GENERIC_SERIAL_FLASH_INTERFACE_TOP_0_AVL_CSR_BASE,FLASH_REG_RD_DATA1) );

Previously , I was successfully in using this chip with the Serial Flash Controller II IP and was able to boot to flash and use it for ASMI.

Other things to note.

This is a single chip with chip select hardwired to on.