cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
4,135 Views
Registered: ‎01-05-2010

SPARTAN 3AN Internal System Flash

Hello,

I am using X3S200AN specifically because of the internal system flash that it has.

i am able to easily read the data from the flash correctly, however having a small problem with writing to it.

I am using the power of 2 addressing mode and have verified that it is working as well.

let's say i want to write register 0x69080 without deleting the whole page.

this is the algorithm i am using:

  1. Write 0x82 : Command
  2. write 0x06 : Start Of Address
  3. write 0x90
  4. write 0x80 : End of Address
  5. Write Byte
  6. Poll the status register until the internal ISF is ready.

However, it seems that the data i write always gets written to the desired register + 1, so the actual value is written to 0x69081, which is weird. and this is happening with all the isf registers.

Has anyone experienced a simialr problem ? or have worked with ISF before ?

 

Thank you

Bernard

0 Kudos
4 Replies
Highlighted
Xilinx Employee
Xilinx Employee
4,042 Views
Registered: ‎08-28-2007

Maybe there is an issue with a register in the pipeline, what values are written in the address you intended?

0 Kudos
Highlighted
Contributor
Contributor
4,006 Views
Registered: ‎01-05-2010

In the address i intended, the value is kept the same.

Actually i am having some real problems with the ISF and i don't know if it is damaged or no.

 

Previously, i substracted 1 from the register i wanted to write to in hardware and it worked for 2 months. i stopped working on it. Now, i am working on it again and it seems that for some cases it is writing, for the others it is not. And here is the weird part:

If i download the file using the .bit as program the FPGA only, the writing works fine. however, if i download the image to the FPGA as Program Flash than load FPGA, the writing doesn't work anymore, sometimes it does, but rarely so i am not seeing any pattern for it. i am really confused and i am considering the fact that the ISF might be damaged.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
4,003 Views
Registered: ‎08-28-2007

That is strange. After configuring from the ISF, try a "Read Status Register " and ensure the End of startup has completed. Also do you see the same behaviour after a POR and a PROG pulse?

0 Kudos
Highlighted
Contributor
Contributor
3,994 Views
Registered: ‎01-05-2010

This is really really strange, i also downloaded the same image on another board, and nothing is being written to the ISF.

i have read the status register and End of Startup is completed. i haven't tried after PROG Pulse, but i think power cycling has the same effect.

i have created a way to read the data from the ISF, if i write to ISF, and read back, the data is correct, if i power cycle the old data comes up. sometimes it writes the new data, sometimes it doesn't. i am really surprised that this is happening.

0 Kudos