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++
12745 Discussions

CFI component for 16 bit Flashs in 8 bit mode

Altera_Forum
Honored Contributor II
1,670 Views

Hello, 

 

A custom board of mine is equipped with a 16-bit Flash from Fujitsu (AMD compatible). The Flash is used in 8-bit mode. Unfortunately it seems that the CFI component does not support 16-bit Flashs that are used in 8-bit mode. Is there any information about this problem? The curious thing is hat the Flash Programmer of the IDE is working well but the CFI component not 

 

Bye, 

niosIIuser
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
829 Views

Hello niosIIuser. 

You wrote: 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

The curious thing is hat the Flash Programmer of the IDE is working well but the CFI component no[/b] 

--- Quote End ---  

 

Do you mean that the flash-programmer actually can FIND your custom board??? 

Because I have the same problem so I had to modify the CFI-component to support an 8-bit flash. 

But I keep getting the following error message when using the flash programmer on my custom board: 

 

Send (64) failed. Unable to synchronize with target. ..... make: *** Error 6 

 

...and that is AFTER making a custom board design as described in the flash programmer guide 

 

About the CFI-driver - you need to add the 8-bit write commands manually to the device driver in NIOS II IDE. 

 

Let me know how it works out for you. 

 

If you want I can mail you my modified CFI-driver. It works for me. Just not the flash programming part ;-) 

 

-- Goon --
0 Kudos
Altera_Forum
Honored Contributor II
829 Views

Hello Goon, 

 

Thank you for your reply. The Flash Programmer of the IDE is working well with the self made custom board. And that’s why I’m a little bit confused. Now I found out that is it necessary to multiply all command addresses by two when using the 16-bit flash in 8-bit mode. But I wonder why the Flash Programmer is working. Ok, I will modify the CFI component. 

 

That’s strange you have the opposite problem. What’s the manufacturer code of your flash? 

 

 

Bye, 

niosIIuser
0 Kudos
Altera_Forum
Honored Contributor II
829 Views

Hello niosIIuser. 

I have a MBM29LV160-flash but I don&#39;t know if it is the flash that causes the flash programmer to fail or if it is something else.  

And just like you I modified the flash device driver with the correct 8-bit commands to support 8-bit writing. 

 

-- Goon --
0 Kudos
Altera_Forum
Honored Contributor II
829 Views

 

--- Quote Start ---  

originally posted by niosiiuser@Sep 30 2004, 02:08 PM 

hello, 

 

a custom board of mine is equipped with a 16-bit flash from fujitsu (amd compatible). the flash is used in 8-bit mode. unfortunately it seems that the cfi component does not support 16-bit flashs that are used in 8-bit mode. is there any information about this problem? the curious thing is hat the flash programmer of the ide is working well but the cfi component not 

 

bye, 

niosiiuser 

--- Quote End ---  

 

niosIIuser, 

 

You&#39;re quite correct there was a problem in the CFI flash component, which has been fixed in the 1.01 release.  

 

The reason for a difference in behaviour between the component and the flash programmer, is that the flash programmer does not use the component. In the case of the flash programmer the code to read the CFI table is in the host based executable. The CFI flash component is used if you wish to program flashes from you code running on Nios 

 

Hope that helps
0 Kudos
Altera_Forum
Honored Contributor II
829 Views

Hello rugbybloke. 

You mention a "host based executable". Do you know if it is possible to see the source code for that? 

And you mention a update 1.01 does it fix the problem with the "host based executable" as well? 

 

Goon
0 Kudos
Altera_Forum
Honored Contributor II
829 Views

Yes the problem should be fixed for the flash programmer as well.

0 Kudos
Altera_Forum
Honored Contributor II
829 Views

Hello rugbybloke. 

Does 1.01 refer to the version of the NIOS II IDE?  

And if it does then where can I find an update because my NIOS II IDE is only version 1.0.0? 

 

Goon
0 Kudos
Altera_Forum
Honored Contributor II
829 Views

Hello, 

 

Now I got Nios II 1.0.1 from my distributor. I saw the additions for using a 16-bit flash in 8-bit mode in the source code of the CFI components but it didn’t worked too. After inserting a reset command before sending the query command (“altera_avalon_cfi_flash_table.c”, line 439) all is working fine. Here are my additions: 

 

/* 

* Check for 8/16 bit in byte wide mode 

*/ 

// Reset the device 

IOWR_8DIRECT(flash->dev.base_addr, 0x00, 0xF0); 

alt_write_flash_command_16bit_device_8bit_mode(flash->dev.base_addr, 0x55, QUERY_MODE); 

 

 

Thanks for Nios II 1.0.1! 

 

 

Bye, 

niosIIuser
0 Kudos
Reply