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

EPC16, I can read it, but not write to it...

Altera_Forum
Honored Contributor II
1,543 Views

I have created a very simple SOPC system for testing out the capability to read and write to the flash inside the EPC16 on the same board as the Stratix II device (2S60, in this case). 

 

The SOPC system contains: 

-NIOS II (Standard) 

-JTAG UART 

-TRI-STATE BRIDGE 

-CFI FLASH 

-ONCHIP MEMORY 

 

I then ran the "hello world" example in IDE and debugged it so I could view the memory. I can see what is in the flash--FPGA configuration starting at offset 0x10000, if I add a .hex file at bottom boot, it shows up at offset 0x0.  

But when I try to write to it using IOWR(0x200000, 0, 0xA) where 0x200000 is the base address of the flash, I don't see anything change. I have tried many addresses within the flash without much luck. 

 

Is there some 'lock bit' that I need to clear, or is there something else inhibiting me from writing to the EPC16? 

 

Thanks, 

Brian
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
267 Views

Dunno about this device, but most flash devices do not support direct writing, except for a handful of registers. 

 

If you take a look at the CFI or EPCS drivers, you'll see what I mean. 

 

If I were you, I would run a 

 

nios2-flash-programmer --debug --base=0x0  

 

and see if it returns anything useful. I don't think the EPC devices are supported the way in which you'd like to use it, so it might not... 

 

Cheers, and Good luck! 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
267 Views

 

--- Quote Start ---  

originally posted by slacker@May 5 2006, 06:13 PM 

dunno about this device, but most flash devices do not support direct writing, except for a handful of registers. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15092) 

--- quote end ---  

 

--- Quote End ---  

 

 

Thanks, I got a response from the Altera FAE, and it sounds like you are correct. It&#39;s not going to be as easy as I had hoped. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
0 Kudos
Altera_Forum
Honored Contributor II
267 Views

As a very late follow-up, I would like to note that we did get the flash in the EPC16 working. The key was to simply follow the instructions on the Sharp/Intel datasheet for the flash on how to erase/write to them. Now, we can create a .hexout file and reprogram the EPC16 device with a new FPGA configuration sans ByteBlaster cable.

0 Kudos
Altera_Forum
Honored Contributor II
267 Views

 

--- Quote Start ---  

originally posted by bgrattan@Jul 18 2006, 09:43 PM 

as a very late follow-up, i would like to note that we did get the flash in the epc16 working.  the key was to simply follow the instructions on the sharp/intel datasheet for the flash on how to erase/write to them.  now, we can create a .hexout file and reprogram the epc16 device with a new fpga configuration sans byteblaster cable. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16991) 

--- quote end ---  

 

--- Quote End ---  

 

 

If you need a Nios module to write to an EPC device, look at my EPC module you can find inside the nios forum project section. 

 

Teo
0 Kudos
Reply