Am Freitag 30 Juli 2010, 00:17:48 schrieben Sie:
> On Thursday, July 29, 2010 15:35:55 Michael Walle wrote:
> > there is a bug in the intel.c flash program routine.
> > 
> > After you write CFI_INTEL_CMD_WRITE_TO_BUFFER, you are just polling the
> > SR_READY in the status register. But according the the datasheet [1]
> > p.24, you have to reissue the CMD_WRITE_TO_BUFFER command to let the
> > status register update its SR_READY bit.
> 
> lemme preface this with "i'm no CFI expert" ... hell, i'm not even
> "adequate", but at any rate ...
> 
> looking at say the U-Boot CFI driver, it doesnt seem to do this.  instead,
> it writes the command FLASH_STATUS_DONE before attempting to read back the
> status word to see if SR_READY is set.  and it does that in a loop. 
> sounds like constantly re-issuing a "write buffer" command is a bad idea.
i'm looking into this tomorrow, for now im going to bed ;)

The datasheet states the following:
 When the Buffered Programming Setup command is issued, Status Register
 information is updated and reflects the availability of the buffer. SR.7
 indicates buffer availability: if set, the buffer is available; if cleared,
 the buffer is not available. To retry, issue the Buffered Programming Setup
 command again, and re-check SR.7. When SR.7 is set, the buffer is ready for
 loading.

btw, the datasheet you pointed to below, states the same (pg. 30, section 
8.3).

> what flash are you working with ?  the only part i have ready access to is
> a PC28F128P33T85, so i can test with that ... but i recall the current
> driver already working.  i'd have to retest real quick.
> http://www.numonyx.com/Documents/Datasheets/306666_P30_Discrete_DS.pdf
i'm using the JS28F256. I used it with the prototype bus driver, which was 
working out of the box. using the fjmem driver (with spartan6), the driver 
wasn't working anymore. likely to be a timing issue.

in the latter case, the status register wasn't updated.

-- 
  michael

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to