Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

CFI Flash Reset Command

Altera_Forum
Honored Contributor II
1,180 Views

I'm using the NIOS HAL CFI routines to access (read/write) an AMD FLASH. 

 

Looking at the waveforms, the HAL routines send the QUERY MODE command to the FLASH (write 0x98 to address 0x55) then proceed to get all the relevant information about the FLASH. 

 

The problem is that when it is done with the QUERY MODE it is supposed write the RESET command or the READ ARRAY command to return the device to regular access mode. The Altera HAL writes the command value 0xFF whereas my FLASH data sheet specifies this command value as 0xF0. My AMD FLASH model doesn't recognize the 0xFF command and stays in QUERY MODE. 

 

Who's "write"? 

 

My FLASH is: AM29LV160D 

I'm using NIOS II IDE v1.1.0 

The line which specifies the command to use in the NIOS IDE is in the file altera_avalon_cfi_flash_table.c:# define READ_ARRAY_MODE (alt_u8)0xFF 

 

Thanks, 

Nathan
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
495 Views

Actually the Spec http://www.amd.com/us-en/assets/content_ty...ets/cfi_r20.pdf (http://www.amd.com/us-en/assets/content_type/downloadableassets/cfi_r20.pdf) is ambiguous, version 2.0 of the CFI specification states that the command to return to read array mode can be 0xFF or 0XF0. A quick fix for you is to change the value of the# define READ_ARRAY_MODE in the file altera_avalon_flash_table.c

0 Kudos
Reply