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

Erase Flash through Avalon_CFI w/o NIOS!

Altera_Forum
Honored Contributor II
1,040 Views

Hi all. 

 

I was wondering if its possible to issue a chip erase command (or writes for that matter) through a state-machine driven custom Avalon Switched Fabric Master Bus?  

 

I have a microcontroller acting as my bus master through a custom bus interface (EMIF) and was hoping to plop down a single Common Flash Interface (CFI) core onto the Switched Fabric to simplify programming. However, now that I'm actually trying to build it, I'm not so sure its possible. The CFI componan'ts data sheet states the following 

 

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

--- Quote Start ---  

In general, any Avalon master in the system can read the flash chip directly as a memory device. For Nios II processor users, Altera provides HAL system library drivers that enable you to erase and write the flash memory using the HAL API functions.[/b] 

--- Quote End ---  

 

 

Now that doesn&#39;t specifically say it isn&#39;t possible. I&#39;ve tried writting the op codes necessary to erase the chip with no luck at all. Does anyone have any experience doing anything similar. 

 

My alternative is to put on a Nios core and embed the software into on-chip-memory, which would of course include all of the state machines necessary. However, my technical lead is against this idea, for reasons beyond me. Anyone have any suggestions? 

 

Regards, 

 

Kevin
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
294 Views

For the record, it is very much possible. If one does this, you just need to pay very close attention to endian of your devices as well as going between master and slaves of different data widths. The SOPC builder likes to play with your address values which reaks havok when you&#39;re trying to send write commands to specific Flash addresses. 

 

Kevin
0 Kudos
Reply