[flashrom] Micron N25Q512, or at least its lower quarter

David Madl flashrom.org at abanbytes.eu
Wed Mar 19 12:08:47 CET 2014


Hello Stefan,

thank you for the quick reply in the middle of the night :)

I have just checked the WP# pin connection again [1].

Here's a patch on top of flashrom v0.9.7, SVN r1767 (I didn't really
expect anyone to have the chip ready to test though).

The first 0x200 bytes got written correctly, they have changed from the
readout before to the correct data I want there.

The erase worked on the first 0x1000 bytes (equal to my setting of
eraseblocks size for spi_block_erase_20), because before, I had at
address 0x200:

00000200  04 02 00 10 00 02 1a 24  01 02 00 10 00 00 00 00

But now it is changed, 0x200-0xFFF is all FF (this is not the data I
tried to write there):

00000200  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
*
00001000  21 28 60 02 09 f8 20 03  21 30 20 02 10 00 bc 8f

Another piece is changed (was blanked to FF), at 0x6b00-0x6bff, which is
not any special boundary I'd expect. It isn't even any erase size! All
other contents have stayed the same like in the readout before I tried
to write.

Thanks,
David


[1]
WP# is connected to pin 6 (grey) on C232HM, like in
http://wiki.openwrt.org/doc/howto/generic.debrick#write.flash.chip.by.usb

I did not connect a pull-up resistor, but I've measured the voltage
levels before and it's 3.3 V all the time. I've also just tried writing
again, with an oscilloscope connected to WP#, it never triggers on a
falling edge, so the signal really stays 3.3 V (inverted logic, meaning
WP should be off).


On 19.03.2014 01:50, Stefan Tauner wrote:
> On Wed, 19 Mar 2014 01:00:41 +0100
> David Madl <flashrom.org at abanbytes.eu> wrote:
>
>> Hi,
>>
>> I have a new prototype development board here, with an 512 MBit Flash
>> chip, Micron N25Q512 (precise type is N25Q512A11G40). I managed to
>> create a config [1] that reads fine, but fails to write [2].
>>
>> I understand that flashrom cannot access chips larger than 16 MBytes,
>> but the chip should still be able to work in 3-byte addressing mode for
>> the lower 16 MBytes. This is what I have created in flashchips.c (copy &
>> pasted, then adapted from the part N25Q128, assuming with a bit of good
>> faith and some datasheet comparison that they should behave alike).
>>
>> Has anyone ever successfully written to a small part of a 4-byte flash chip?
>> […]
>> Erasing and writing flash chip... Trying erase function 0...
>> 0x000000-0x000fff:W, 0x001000-0x001fff:E
>> FAILED at 0x00001000! Expected=0xff, Found=0x00, failed byte count from
>> 0x00001000-0x00001fff: 0x1000
>> ERASE FAILED!
>> Reading current flash chip contents...
>> done. Looking for another erase function.
>> Trying erase function 1... 0x000000-0x00ffff:E
>> FAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from
>> 0x00000000-0x0000ffff: 0x10000
>> ERASE FAILED!
>> Reading current flash chip contents...
>> done. Looking for another erase function.
>> Trying erase function 2... 0x000000-0xffffff:E
>> FAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from
>> 0x00000000-0x00ffffff: 0x1000000
>> ERASE FAILED!
>> Looking for another erase function.
>> No usable erase functions left.
>> FAILED!
>> Uh oh. Erase/write failed. Checking if anything changed.
>> Your flash chip is in an unknown state.
>> Please report this on IRC at chat.freenode.net (channel #flashrom) or
>> mail flashrom at flashrom.org, thanks!
> Hi David,
>
> it is almost 2am here, so I wont write a long reply.
> The log looks to me as if you were not connecting the write protection
> pin correctly. Maybe that's all what's wrong :)
>
> PS: It would probably be worthwhile for you to look at how patch files
> work and how you can create them. That eases the communication of
> changes dramatically.
>





More information about the flashrom mailing list