Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

AMD FLASH PROBLEM S29GL064M11TAIR0

AMD FLASH PROBLEM

because it was difficult to buy an AMD FLASH AM29LV065DU-120REI,

AMD recommended to use the newer S29GL064M11TAIR0, which is pin compatible and CFI

compliant.

Now we have some custom boards,where the NIOS FLASH Programmer does not

work with the S29GL064M11TAIR0 (boards with AM29LV065DU-120REI work fine)

QUARTUS 4.1 SP2

NIOSII V1.0 SP1

--------------------------------------------------------------------------------

make: Entering directory `/cygdrive/i/12DXI02_SOFTWARE/boot01/Debug'

nios2-flash-programmer --input=ext_flash.flash --sof=`C:/altera/quartus41/sopc_builder/bin/find_sopc_component_dir BOARD_12DIXI02`/system/BOARD_12DIXI02.sof --device=2 "--cable='USB-Blaster [USB-0]'" --base=0x00800000

13.01.2005 10:05:08 - (INFO) nios2-flash-programmer: Launching Quartus Programmer to download:

I:/12DXI02_FPGA/BOARD_12DIXI02/system/BOARD_12DIXI02.sof

Pre-Reading 125KBytes of data from D5:

|----.----+----.----|

********************* (1.016 sec).

Erasing 2 Sectors:

|----.----+----.----|

********************* (1.437 sec).

Writing 128KBytes :

|----.----+----.----|

****

Bad ack from Target.

Yikes!, Bad Acknowledge Command-Field,

Command-Packet Was:

+---Flash-Monitor Protocol Packet----------

| Command : W

| Flash-Base : 8388608

| Flash-Offset : 24576

| Command-Set : 2

| Flash Width : 1

| Flash Mode : 1

| payload size: 4096

| Payload :

| 00000000: 1E 05 00 10 17 00 80 E0 17 00 C0 E0 17 40 80 10 | .............@..

| 00000010: 17 41 00 19 3A E8 3E 10 17 00 80 E0 85 01 00 10 | .A..:.>.........

| 00000020: 17 00 80 E0 05 01 00 10 17 00 80 E0 03 01 80 10 | ................

| 00000030: 15 03 80 E0 17 03 C0 E0 E0 00 80 18 1E 4C 00 10 | .............L..

| 00000040: 17 03 C0 E0 08 01 80 18 1E 04 00 10 17 03 C0 E0 | ................

| 00000050: 3A 00 05 18 1E 08 00 10 06 ED 01 00 17 03 C0 E0 | :...............

| 00000060: 20 01 80 18 1E 9B 01 10 17 03 C0 E0 60 01 80 18 | ...........`...

| 00000070: 1E E3 01 10 06 E6 01 00 17 00 80 E0 03 11 80 10 | ................

| 00000080: 58 00 80 10 1E E2 01 10 17 00 80 E0 05 11 00 10 | X...............

| 00000090: 17 00 80 E0 15 08 00 10 17 00 80 E0 15 09 00 10 | ................

| ...

| 00000F70: 80 61 05 08 17 00 80 E0 8B 0E 80 10 B4 20 00 01 | .a........... ..

| 00000F80: 04 F3 31 21 3A 88 0B 10 80 61 05 08 17 00 80 E0 | ..1!:....a......

| 00000F90: 8B 04 80 10 B4 20 00 01 04 F9 31 21 3A 88 0B 10 | ..... ....1!:...

| 00000FA0: 80 61 05 08 17 00 80 E0 0B 0E 80 10 B4 20 00 01 | .a........... ..

| 00000FB0: 04 FF 31 21 3A 88 0B 10 80 61 05 08 17 00 80 E0 | ..1!:....a......

| 00000FC0: 8B 0F 80 10 B4 20 00 01 04 05 32 21 3A 88 0B 10 | ..... ....2!:...

| 00000FD0: 80 61 05 08 17 00 80 E0 0B 10 80 10 B4 20 00 01 | .a........... ..

| 00000FE0: 04 0B 32 21 3A 88 0B 10 80 61 05 08 17 00 80 E0 | ..2!:....a......

| 00000FF0: 8B 10 80 10 B4 20 00 01 04 11 32 21 3A 88 0B 10 | ..... ....2!:...

+------------------------------------------

Ack-Packet Was:

+---Flash-Monitor Protocol Packet----------

| Command : !

| Flash-Base : 8388608

| Flash-Offset : 24576

| Command-Set : 2

| Flash Width : 1

| Flash Mode : 1

| payload size: 0

| Payload :

+------------------------------------------

Unable to send write-packet @24576

buffer-chunk write failed @24576

erase-block write failed @24576

write failed @0

13.01.2005 10:05:19 - (SCHWERWIEGEND) nios2-flash-programmer: Unable to write to flash

13.01.2005 10:05:19 - (SCHWERWIEGEND) nios2-flash-programmer: Error: Write-operation failed on device. - exiting.

make: *** [ext_flash_programflash] Error 8

make: Leaving directory `/cygdrive/i/12DXI02_SOFTWARE/boot01/Debug'

--------------------------------------------------------------------------------

make: Entering directory `/cygdrive/i/12DXI02_SOFTWARE/boot01/Debug'

nios2-flash-programmer --input=ext_flash.flash --sof=`C:/altera/quartus41/sopc_builder/bin/find_sopc_component_dir BOARD_12DIXI02`/system/BOARD_12DIXI02.sof --device=2 "--cable='USB-Blaster [USB-0]'" --base=0x00800000

13.01.2005 12:54:26 - (INFO) nios2-flash-programmer: Launching Quartus Programmer to download:

I:/12DXI02_FPGA/BOARD_12DIXI02/system/BOARD_12DIXI02.sof

Pre-Reading 125KBytes of data from D5:

|----.----+----.----|

********************* (1.031 sec).

Erasing 2 Sectors:

|----.----+----.----|

********************* (1.531 sec).

Writing 128KBytes :

|----.----+----.----|

****Unable to send write-packet @24576

buffer-chunk write failed @24576

erase-block write failed @24576

write failed @0

13.01.2005 12:54:41 - (SCHWERWIEGEND) nios2-flash-programmer: Unable to write to flash

13.01.2005 12:54:41 - (SCHWERWIEGEND) nios2-flash-programmer: Error: Write-operation failed on device. - exiting.

make: *** [ext_flash_programflash] Error 8

make: Leaving directory `/cygdrive/i/12DXI02_SOFTWARE/boot01/Debug'

I'm not a flash expert, but

having a look at the datasheet of S29GL064M11TAIR0 does not show the

single word program command which is used by the following function

(write to buffer and program buffer)

/*

* alt_program_amd

*

* Program a block (or part of one)

*

* Use the old fashioned word at a time program method

* that way it will work on all devices

*

* There is another mechanism which puts the device into a mode and

* then writes Addr, Data Addr, Data etc.

*/

int alt_program_amd(alt_flash_dev* flash_info, int block_offset,

int offset, const void* src_addr,

int length)

{

...

- will this flash type (S29GL064M11TAIR0) be supported by altera ?

- which newer FLASH devices can be used with NIOSII and the flash programmer ?

- how can the flash programmer be modified to support other flash devices ?

thanks

12 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    We haven't quite made it to the stage where we would be able to test this implementation.

    It is indeed part of our plan, because AMD themselves have recommended using this Spansion branded flash chip (S29GL128M) over some of their earlier AMD flash chips.

    We are also running uClinux and plan to use JFFS2 for our flash system, so we have a lot to test and configure.

    1) Support for flash chip on Avalon bus.

    2) Support for flash chip with the flash programmer tool.

    3) Support for flash chip under the Linux mtd drivers.

    4) Support for the flash chip under the Linux JFFS2 filesystem.

    If we can get all of these items working, then our flash choice will work. Our contingency plan will be to move back to a 8MB flash chip and simply use the one that is on the Microtronix uKit board.

    We will be putting forth some good effort towards getting the S29GL128M flash chip to work. Our only enemy will be time. If we can't get things resolved quick enough, we will have to resort to the older flash.

    I will post our progress so others may benefit.

    Since we haven't implemented it yet, we would also like to know if anyone else has made it further down this path.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello,

    do you have more information, about the support for the S29GL128M from AMD ? I plan to use a S29GL256M, and I would like to know wheter the Flash programmer can be used (and the MTD driver under uClinux).

    Another question : Since I want to set a JFFS2 on that flash, what will give me the best performance : using it in byte mode or in word mode ?

    Thanks for you answer,

    pod