[flashrom] External programmers

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed May 5 04:30:13 CEST 2010


On 05.05.2010 02:26, fritz wrote:
> Carl-Daniel Hailfinger wrote:
>> 1. There was talk of an AVR-based new programmer using the serprog
>> protocol on IRC by someone with the nick "coldelectrons", but I have no
>> idea if he/she is reading this mail. IMHO more hardware using the
>> serprog protocol is always a good idea.
>>   
> That would be me, and yes, I am.
>
> I had a Willem clone at one time, but the software I received with it is
> far from current - and then I had to try and figure out which
> variant/version I had so I could try to download the right version....

Heh yes, I heard such complaints from various people, and that's why I
hope we can support Willem family programmers in flashrom soon.


> I'm using an Arduino Mega to speak the 'serprog' protocol, and to
> bitbang a parallel bus to a DIP32 socket.  The atmega1280 on the Mega
> has the capability of interfacing to an external SRAM, but I haven't had
> much luck in making that work in a breadboarding environment.  After all
> the IO used for the parallel bus, there is still enough IO left over
> (and dedicated functions) for rs232, SPI, and i2c.
>
> My current schematic only works for 5V-only chips.
>
> My problem thus far is that while I can read a chip and dump it to a
> file, I'm unable to detect or write to a chip.  From what I can tell,
> something doesn't jive between normal AM29F040 probing and the operation
> of a serprog programmer.  For one thing, you need to throw certain
> address/values at a 29F' and detect a response...while the serprog
> protocol buffers all writes to an operation buffer.  I don't think the
> probe routine ever 'executes' the buffer.  I've only been looking over
> the code for maybe 2 days, so I'm far from expert on it.

serprog_chip_readb() should cause a buffer flush, and every probe
sequence calls this function indirectly via chip_readb() to read the
chip response.


> Even as I received this email, I've been dicing up flashrom code into a
> python script that will hopefully talk to my ad-hoc programmer and flash
> my darn AM29F040 for me.

Can you post a verbose flashrom log for your programmer?

By the way, if the timing in your programmer is not accurate, chip
detection is guaranteed to fail, especially with such old flash chips.
Depending on the chip, it will need one microsecond or up to 20
milliseconds to start sending its ID, and if you're too slow, the chip
will have stopped sending its ID before you start reading. Some chips
already stop sending the ID before others even start, and that's the
reason flashrom has detailed timing info for pretty much every chip
stored in flashchips.c.
Modern chips are way more forgiving (zero delay to start sending the ID,
and they will send the ID forever).

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list