On Fri, Jun 10, 2016 at 8:57 PM, Nico Huber nico.h@gmx.de wrote:
Hi Potato,
On 07.06.2016 18:59, potato wrote:
I know that the programmer works, since I was able to make goods dumps of a MX25L8006 that was on a old router, but I was not able to detect a MX25L6405D that was on my Thinkpad X200 (it could not even find a chip). I know it is not a problem with the SOIC16 clip that I used since I was able to use it on a rayer_spi device.
The problem is not the flash chip itself but the circuitry surrounding it. Every device that you flash by ISP is a different story, especially when the device is not meant to be flashed by ISP. The X200 is one of those and particularly hard to flash. Presumably because of some capa- city on the CS line. So you need a programmer that can drive CS pretty strong, or work around by using a very low SPI clock or hack flashrom to assert CS earlier (that works for me using a FT2232H based program- mer). I've seen a Raspberry Pi 2 programming an X200 oob, supposedly it drives CS strong enough.
Here's a clumsy patch for flashrom that might help: http://paste.flashrom.org/view.php?id=2802 It adds dummy reads that might kind of pre-charge CS.
Urja, do you know a way to assert CS earlier on a CH341A?
Depends on for how long, but yes... https://github.com/flashrom/flashrom/blob/staging/ch341a_spi.c#L334 repeat that line for a delay of 750ns / line after the assertion, but reduce the limit in lines 343 and 344 for the amount usable for delay generation, since that packet is max 32 bytes (the comment there is pretty good).
For a longer delay than that about 20us, it'd need more complex mechanisms, but yeah doable.
Sorry if I caused any problems, Potato
No problems.
Nico