[coreboot] Yet another idea of an SPI flash chip programmer

FENG Yu Ning fengyuning1984 at gmail.com
Tue Dec 23 14:16:02 CET 2008


On Mon, Dec 22, 2008 at 10:42 PM, Peter Stuge <peter at stuge.se> wrote:
> FENG Yu Ning wrote:
>> I would like a programmer to be:
>>
>>  * able to program SPI flash chips,
>>  * not slow (program 512k bytes in 3 mins),
>
> Can you specify your speed requirement? What would be acceptable?
> It's easier to calculate backwards then.

I do not have an accurate speed specification in my mind. I read in
the list recently that some programmer can take 7 mins to program a
chip. I just don't want to wait that long.

>>  * with a driver whose source code is available (or not difficult
>>    to write one),
>>  * simple, and
>>  * cheap.
>>
>> There is one that almost does the job,
>>
>>   http://www.malinov.com/Home/sergeys-projects/spi-flash-programmer
>>
>> but
>> [0] would it be very slow?
>
> Yes. It bitbangs SPI on the parallell port, which doesn't have very
> fast output drivers and is connected to the CPU through a slow bus.
>
> I thought a little bit more about the numbers I provided for doing
> this and depending on which opcodes are supported by the flash chip,
> bitbanging SPI could actually be faster than LPC, so 256kbyte would
> take maybe 3-4 minutes instead of the 5 minutes needed by LPC.

Hmm.. So programming a 512k byte chip still need quite some patience.

> The chip is surface mount with somewhat fine pitch (pins close
> together) but you can find ready-made modules with the chip that will
> make it very easy to build a programmer. FTDI make some modules, and
> there are also third-party modules. Modules using FT232 seem to be
> more common, but I'm not sure if they have the bitbanging capability.

Yes. Using modules will save me some effort.

>> [2] Is the programmer going to meet my requirement?
>
> It is an interesting question. USB has significantly more overhead
> per bit to be banged, but the bus is also much faster. It may
> actually be much faster.

Let me try. If I succeed with this idea, I will post its performance
to the list.

> To get the highest performance the SPI protocol has to be implemented
> in hardware.

Yes, I kept thinking about different ways of chip programming, and got
this conclusion also.

> I would recommend using a microcontroller with a fast
> SPI master peripheral. I think 16MHz SPI clock is safe for all flash
> chips, or is it 33MHz, but some chips can even run up to 75MHz.
>
> To drive the flash chip at those high speed will require the design
> to be more complicated, especially if you first need to download data
> from a PC somehow. Then you need 128 Mbits of RAM too, and a RAM
> controller..

I also came to something similar. I knew I needed storage for
buffering, easy to operate, and fast. However, going further is not so
easy. That's why I looked for an IC.

Thanks for your information. It helps.

yu ning




More information about the coreboot mailing list