<p>Thank you for your response.</p>
<p>The erase/write operations was finally done but the verify operation failed. But the difference was not so big and the board is booting again. I'm lucky.</p>
<p>The patch I sent to you should not be considered because it relies on a modification of the ftdi.h header file witch is part of the libftdi-dev(el) package and not flashrom. So the definition of TYPE_232H should be checked during the configure phase of the build. I know that the flashrom build does not compile ft2232_spi programmer support if the file  ftdi.h is not found. So further test could be considered.</p>

<p>But I think it should be  easier to wait for the libftdi project to add support to the FT232H chip. </p>
<p>I was helped in my work by a nice project called libmpsse found on <a href="http://code.google.com">code.google.com</a>. It's a SPI/I2C api build on top of libftdi, using the MPSSE engine and it  works fine. When I run the samples of this project I see a red led lighting on the cable during operation. I never saw this led with any other tools, even those of FTDI. I think this code does a good job on initialisation/de-initialisation of the MPSSE engine of the FT232H chip. The python binding is also inpressive. With a few lines of code once can read a flash memory.</p>

<p>Sorry, i'm not an electronic expert and I think the quality of the links was very poor.</p>
<p>Thank you.</p>
<div class="gmail_quote">Le 19 juil. 2012 12:51, "Stefan Tauner" <<a href="mailto:stefan.tauner@student.tuwien.ac.at">stefan.tauner@student.tuwien.ac.at</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, 19 Jul 2012 04:19:32 +0200<br>
Miloud Malagouen <<a href="mailto:miloud.malagouen@gmail.com">miloud.malagouen@gmail.com</a>> wrote:<br>
<br>
<br>
> I bricked a MSI MS-7302 motherboard with a bad coreboot image. I'm trying<br>
> to flash the bios with a C232HM-DDHSL-0 FTDI USB<br>
> cable<<a href="http://www.ftdichip.com/Products/Cables/USBMPSSE.htm" target="_blank">http://www.ftdichip.com/Products/Cables/USBMPSSE.htm</a>>using the<br>
> MSI JSPI1 Header <<a href="http://www.coreboot.org/MSI_JSPI1" target="_blank">http://www.coreboot.org/MSI_JSPI1</a>> present on the board<br>
> for SPI connection. The FTDI cable uses a FT232H chip witch is capable of<br>
> providing a USB to SPI, I2C or JTAG interface.<br>
><br>
> The FTDI D2XX Linux driver cited that the FT232H chip has type number 6<br>
> (while the FT4232H has type 5), so i had to modify the file<br>
> */usr/include/ftdi.h* and change the ftdi_chip_type enumeration definition:<br>
><br>
> /** FTDI chip type */<br>
> enum ftdi_chip_type { TYPE_AM=0, TYPE_BM=1, TYPE_2232C=2, TYPE_R=3,<br>
> TYPE_2232H=4, TYPE_4232H=5,*TYPE_232H=6* };<br>
<br>
there is probably a way around this, we will have to investigate that.<br>
<br>
> I had to add support to the FT232H chip (vid=0403 pid=6014) in the *<br>
> ft2232_spi* programmer of flashrom. I's very simple. Here is the patch of<br>
> file ft2232_spi.c:<br>
<br>
thanks for the patch, i'll review it in detail later.<br>
two things certainly need to be changed before this can enter our<br>
repository though:<br>
- man page needs to be updated<br>
- the patch has to be signed off, see<br>
<a href="http://www.coreboot.org/Development_Guidelines#Sign-off_Procedure" target="_blank">http://www.coreboot.org/Development_Guidelines#Sign-off_Procedure</a><br>
<br>
> =======================BEGIN DIFF================================<br>
> --- flashrom/ft2232_spi.c    2012-07-19 03:43:28.866724677 +0200<br>
> +++ flashrom-0.9.5.2-r1547/ft2232_spi.c    2012-07-16 05:16:53.000000000<br>
> +0200<br>
> […]<br>
> =======================END DIFF==================================<br>
><br>
><br>
> The flash memory is probed correctly but erase an write operations failed.<br>
> Here is flashrom command (bold) and output:<br>
> ____________________________________________________________________________________<br>
><br>
> *flashrom   -p ft2232_spi:type=232H,port=A -w A7302AMS.160*<br>
> flashrom v0.9.5.2-runknown on Linux 3.4.4-5.fc17.i686.PAE (i686)<br>
> flashrom is free software, get the source code at <a href="http://www.flashrom.org" target="_blank">http://www.flashrom.org</a><br>
><br>
> […]<br>
><br>
> The chip is powered with an external PSU (3.3V orange cable of an ATX PSU).<br>
> I will try with a 1200F capacitor on the VCC link. I hope this is just<br>
> a magnetic noise issue.<br>
<br>
Are all pins connected correctly? especially the #WP pin could introduce<br>
the problem, but all others should be connected as specified in the<br>
datasheet too (e.g. hold pin if available).<br>
<br>
--<br>
Kind regards/Mit freundlichen Grüßen, Stefan Tauner<br>
</blockquote></div>