[U-Boot-Users] Unable to write to flash..

Jerry Van Baren gerald.vanbaren at smiths-aerospace.com
Mon Sep 17 14:29:14 CEST 2007


rags wrote:
> Hi,
> We've been having a strange problem during our board bringup. I have given a
> brief description about our board, the problem we are facing and
> investigation done so far. Would appreciate any comments/pointers for
> further investigations..
> I apologize in advance for the long post that follows..:-)
> 
> Regards
> Vijay
> 
> Board description:
> This is a MPC8360E based board with a S29GL01GP12T (16 bit) flash
> (size=128MB) and 256 MB DDRRam + other peripherals. We have a BDI2000 JTAG
> debugger connected to the board. Relevant sections of our BDI config file
> are given below,

[snip - I'm going to assume the BDI config is OK, I don't have time or 
expertise to check it]

> With this the processor halts at 0xFFF00100 on reset. We are able to read
> the system configuration registers at the relocated IMMR address and able to
> access the DDR Ram (starting at 0x00000000) and Flash starting at
> (0xF8000000). The flash contains some data that was pre-programmed (First
> sector contains HRCW and a U-boot image is also burned at another location).

Good.

> Problem description:
> We are able to read the contents of the flash, but unable to erase or
> program it (we have tried several combinations of sectors). We can confirm
> the read because of the pre-programmed content (HRCW + U-boot image). 

Read - good.  Not able to program - likely not using the right 
addresses, data.  Possibly hardware problems, but lower probability.

> Is it possible to isolate this to a HW/SW(config file) issue??

Yes.  ;-)

> Investigation done so far:
> We have done the following so far,
> 
> 1. We have probed the address and data lines along with other control
> signals (Chip select etc..). Also we have made sure that the  write protect
> remains high for the flash. All the address lines are toggling and data
> lines seem to be ok (since we are able to read stuff ok from the flash).
> Also chip select is getting issued properly at the correct time. (All these,
> as per our hw guys).

I presume the WR* line is toggling properly too???

> 2. We have tried mapping the flash at different addresses with the same
> result

Not useful.

> 3. We used the same flash on a Freescale MDS reference board (with the same
> configuration for Flash) and are able to read and write successfully. Also
> the U-boot image burned in the flash comes up.

Good, you have something to compare your hardware to.

> 4. We tried using the protocol defined in the datasheet to read the
> 'manufacturer id' using BDI MM/MD commands. But this seems to fail in both
> our board and the MDS board.

You need to figure this out.  If you figure this out, you will have the 
answer to your problem (99.98% probability).

Figure out how it works on the MDS board first, since that is know 
working, then do the same on your custom hardware.

Note the addresses (byte vs. word) in the 29GL10 data sheet (I'm looking 
at <http://www.spansion.com/datasheets/s29gl-p_00_a5_e.pdf>)
   Table 7.4 Autoselect Entry in System
Important points:
1) You need to use the word addresses column in the table.
2) You need to use the correct BDI command modifier to generate word (16 
bit) writes - this is VERY IMPORTANT.

The following is invalid syntax, but illustrates what I'm saying:
   mw.w Basex555 00aa
   mw.w Basex2AA 0055
   mw.w Basex555 0090
If that doesn't work, try a byte swap:
   mw.w Basex555 aa00
   mw.w Basex2AA 5500
   mw.w Basex555 9000

Good luck,
gvb




More information about the U-Boot mailing list