| Submitter | fritz |
|---|---|
| Date | 2010-05-28 16:48:55 |
| Message ID | <4BFFF3F7.6060303@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/1414/ |
| State | New |
| Headers | show |
Comments
Am Freitag, den 28.05.2010, 12:48 -0400 schrieb fritz: > The summary: > Flashrom (from svn) would detect the other chips using addresses 0x5555, > 0x2AAA, 0x5555 > Flashrom (from svn) would try to detect the Am29F040 using addresses > 0x0555, 0x02AA, 0x0555 - which is not according to the datasheet. You found a bug. If you send your patch with a sign-off http://www.coreboot.org/Development_Guidelines#Sign-off_Procedure the fix will be added with you as primary author. > Mine is not the only chip flashrom does that with: > http://pastebin.org/288436 Which is OK. Some flash chip data sheets specifiy to use the addresses 0x555, 0x2AA, 0x555 > For some reason, having FEATURE_ADDR_2AA set makes jedec.c screw up the > address. It's the intended effect of that FEATURE. It means that the chip it with this feature needs 0555/02AA/0555 instead of 5555/2AAA/5555. When we unified chip drivers, it seems we didn't read datasheet thouroughly enough, although we worked quite carefully on it, and got this chip wrong. We are very sorry for the time you wasted on that. I think we were in IRC contact. For some of us, finding this mistake would have been a couple-of-minute jobs (can be seen from flashrom -V output), so having asked about this undetected chip might have saved you hours of debugging. > I now have my chip programmed, and I didn't have to write an application > from scratch to do it. If it had gone smoother, I'd profess thanks, but > in my sleep-deprived state I think all you are going get out of me is a > grunt and a respectful nod :) But *we* do need to thank you for reporting the wrong flag. Regards, Michael Karcher
On 05/28/2010 12:48 PM, fritz wrote: > An update on my microcontroller-based external serial programmer: > > It works. > That's awesome! Great Work :-)
On Fri, May 28, 2010 at 9:48 AM, fritz <fritzlists@gmail.com> wrote: > An update on my microcontroller-based external serial programmer: > > It works. > > I can program 5V-only chips, in DIP32 form, or PLCC32 with an adapter. The > highest baud rate I've been able to make work is 115200, which makes things > pretty slow. Further experimentation may show that I could run a higher > baudrate and maybe remove most of the `noop` delays in my I/O routines - but > that's for another day. I was thinking of programming 2mbit flash chips with shift registers and an regular arduino and it didn't occur to me to use flashrom as software. When I get around to using them I might just have to spring for a megaduino. Sweet!
Hi, I have some success using flashrom >serprog _> own avr frimware. it needs some polishing the i will release schematics + source. i doupt shift regs is the way to go.. i used a 74act574 (8 bit latch) for the low 8 bits and dedicated io for the high bits (the other way around would have been better) if you used one 574/8 address bits you only need 8+<chip ctrl lines>+<(adresslines+7)/8)> io pins. best would be to use a whole port for the datapins.. i will do a arduino posrt shortly. greetings, Reinder Kyle Kienapfel wrote: > On Fri, May 28, 2010 at 9:48 AM, fritz <fritzlists@gmail.com> wrote: >> An update on my microcontroller-based external serial programmer: >> >> It works. >> >> I can program 5V-only chips, in DIP32 form, or PLCC32 with an adapter. The >> highest baud rate I've been able to make work is 115200, which makes things >> pretty slow. Further experimentation may show that I could run a higher >> baudrate and maybe remove most of the `noop` delays in my I/O routines - but >> that's for another day. > > > I was thinking of programming 2mbit flash chips with shift registers > and an regular arduino and it didn't occur to me to use flashrom as > software. When I get around to using them I might just have to spring > for a megaduino. Sweet! > > _______________________________________________ > flashrom mailing list > flashrom@flashrom.org > http://www.flashrom.org/mailman/listinfo/flashrom >
On 5/28/10 9:48 AM, fritz wrote: > However, the chip I wanted to program - Am29F040B - I could NOT detect. > > I'll spare you the in-depth story of the past twelve hours I've spent > working on it. > > The summary: > Flashrom (from svn) would detect the other chips using addresses > 0x5555, 0x2AAA, 0x5555 > Flashrom (from svn) would try to detect the Am29F040 using addresses > 0x0555, 0x02AA, 0x0555 - which is not according to the datasheet. > The Problem is the Am29F040B uses 0x2AA variant, but the Am29F040 uses 0x2AAA. What AMD/Spansion did was change the command addresses without changing the chip ids. Sadly there's no way to distinguish between the two.
Am Samstag, den 19.06.2010, 14:04 -0700 schrieb Sean Nelson: > > The summary: > > Flashrom (from svn) would detect the other chips using addresses > > 0x5555, 0x2AAA, 0x5555 > > Flashrom (from svn) would try to detect the Am29F040 using addresses > > 0x0555, 0x02AA, 0x0555 - which is not according to the datasheet. > The Problem is the Am29F040B uses 0x2AA variant, but the Am29F040 uses > 0x2AAA. What AMD/Spansion did was change the command addresses without Do we have a user with a Am29F040B that works with the 2AA variant? In that case have him/her test with the 2AAA variant. It is quite likely that the 2AAA variant works on all chips (the higher bits being ignored) by the 2AA chip. Regards, Michael Karcher
Patch
diff --git a/flashchips.c b/flashchips.c index b1af60a..4feabe8 100644 --- a/flashchips.c +++ b/flashchips.c @@ -178,7 +178,7 @@ struct flashchip flashchips[] = { .model_id = AM_29F040B, .total_size = 512, .page_size = 64 * 1024, - .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, + .feature_bits = FEATURE_SHORT_RESET, .tested = TEST_UNTESTED, .probe = probe_jedec, .probe_timing = TIMING_IGNORED, /* routine don't use