Skip to main content
Topic: dose flashrom support BP v4? (Read 13477 times) previous topic - next topic

dose flashrom support BP v4?

I tried to flash a SPI eeprom(on board) with flashrom 0.9.6.1(windows version) + BP v4, but flashrom hang! ;-(
Dose flashrom support BP v4 now?

PS. the windows driver for BP v4 was installed normally.
thanx in advanced

Re: dose flashrom support BP v4?

Reply #1
flashrom v0.9.6.1-r1575 is the last version which works with the Bus Pirate v4. Later versions fail. You're the first person to report that problem. I only have two Bus Pirates v3, but no v4, that's why I didn't see the problem before.

flashrom newer than v0.9.6.1-r1575 performs a Bus Pirate reset during init to get the Bus Pirate firmware version and work around. Unfortunately, that kills the USB-serial connection and makes further communication impossible. I'll try to get the firmware fixed.
If you have any flashrom problems, please mail flashrom@flashrom.org and include "Bus Pirate" in the subject line. As an alternative, you can send me a private message.
It is recommended to use at least flashrom 0.9.2 or later, and latest flashrom from svn if you want a 3x speedup.

Re: dose flashrom support BP v4?

Reply #2
If anyone is willing to test a flashrom patch to detect the Bus Pirate v4 issue, please post here or send an email to [email:]flashrom@flashrom.org[/email:]. I hope to detect this BPv4 issue in the flashrom code so flashrom can print a warning and suggest a BPv4 firmware upgrade.
If you have any flashrom problems, please mail flashrom@flashrom.org and include "Bus Pirate" in the subject line. As an alternative, you can send me a private message.
It is recommended to use at least flashrom 0.9.2 or later, and latest flashrom from svn if you want a 3x speedup.

Re: dose flashrom support BP v4?

Reply #3
Hi, I just received a BP v4 and I'm trying to use Flashrom with it.  I'm using 0.9.7 currently and in SPI mode...it initializes fine...sees the buspirate and calibrates the delay loop successfully....but it hangs on 'baud rate is 115200'  or sometimes on 'Raw SPI mode 1' 

Was there a version other than 0.9.6.1 r1575 that works with v4 now ? 

I would be willing test any patches you may need.  I am new to all of this but I will help out if I can.

Also, where is version 0.9.6.1 r1575 ?  is it the 0.9.6.1 download on flashrom's site ?  I tried to compile 0.9.6.1 from flashrom using make, but I get a libpci error even though I have pciutils installed.  I'm running ubuntu 13.04.

( I found the snapshots folder on flashrom...but I only see a r1675...r1554 is the highest in 15xx release....was that 1575 a typo ?)

Thanks for any help.....

PS. the cables I'm using are about 15 cm...could this be the cause of the hang..... also I'm using Sandbox Electronics version which is identical except for removing 2 LED's.

Re: dose flashrom support BP v4?

Reply #4
Update:

I downgraded to 0.9.6.1 r1563....I just get a bunch of 'Empty Read'  that goes forever when I try to initialize the BP v4.

I'm gonna try to compile 0.9.6.1 r1675 and see how that works...I still cannot find 0.9.6.1 r 1575......


Update:

I successfully complied and installed  0.9.6.1 r1675...but I still get the same hang

Code: [Select]
^Cx@Toshiba-Laptop:~$ sudo flashrom -V -p buspirate_spi:dev=/dev/ttyACM0
flashrom v0.9.6.1-r1675 on Linux 3.8.0-31-generic (x86_64)
flashrom is free software, get the source code at

flashrom was built with libpci 3.1.9, GCC 4.7.3, little endian
Command line (3 args): flashrom -V -p buspirate_spi:dev=/dev/ttyACM0
Calibrating delay loop... OS timer resolution is 2 usecs, 2874M loops per second, 10 myus = 10 us, 100 myus = 100 us, 1000 myus = 994 us, 10000 myus = 10022 us, 8 myus = 12 us, OK.
Initializing buspirate_spi programmer
Baud rate is 115200.
Detected Bus Pirate hardware v4
Detected Bus Pirate firmware 6.2
Using SPI command set v2.
SPI speed is 8MHz
Raw bitbang mode version 1
Raw SPI mode version 1

Then it just hangs there....

I'm trying to flash a SST25VF032B 32Mbit SPi chip

Re: dose flashrom support BP v4?

Reply #5
Hi grasshopper, can you please post a full log with flashrom 0.9.7? Simply use the --output parameter for flashrom to get a log file with sufficient verbosity. If you post the contents of logfile.txt in here, I can take a look.

Code: [Select]
flashrom -p buspirate_spi:dev=foobar --output logfile.txt
If you have any flashrom problems, please mail flashrom@flashrom.org and include "Bus Pirate" in the subject line. As an alternative, you can send me a private message.
It is recommended to use at least flashrom 0.9.2 or later, and latest flashrom from svn if you want a 3x speedup.

Re: dose flashrom support BP v4?

Reply #6
Hi Biosflasher,

Code: [Select]
flashrom v0.9.6.1-r1675 on Linux 3.8.0-31-generic (x86_64)
flashrom was built with libpci 3.1.9, GCC 4.7.3, little endian
Command line (4 args): flashrom -p buspirate_spi:dev=foobar --output /home/x/Desktop/logfile.txt
Calibrating delay loop... OS timer resolution is 1 usecs, 3061M loops per second, 10 myus = 11 us, 100 myus = 101 us, 1000 myus = 991 us, 10000 myus = 10065 us, 4 myus = 5 us, OK.
Initializing buspirate_spi programmer
Error: Cannot open serial port: No such file or directory
Error: Programmer initialization failed.


My connections:

Chip  ----- BusPirate

(1)CE# ----- CS
(2)SO  ----- MISO
(3)WP# ----- (not connected)
(4)VSS ----- GND
(5)SI  ----- MOSI
(6)SCK ----- CLK
(7)HOLD----- (not connected)
(8)VDD ----- 3.3V

Re: dose flashrom support BP v4?

Reply #7
Sorry, forgot to mention: Please replace foobar with your serial device as usual.
If you have any flashrom problems, please mail flashrom@flashrom.org and include "Bus Pirate" in the subject line. As an alternative, you can send me a private message.
It is recommended to use at least flashrom 0.9.2 or later, and latest flashrom from svn if you want a 3x speedup.

Re: dose flashrom support BP v4?

Reply #8
Code: [Select]
flashrom v0.9.6.1-r1675 on Linux 3.8.0-31-generic (x86_64)
flashrom was built with libpci 3.1.9, GCC 4.7.3, little endian
Command line (4 args): flashrom -p buspirate_spi:dev=/dev/ttyACM0 --output /home/x/Desktop/logfile.txt
Calibrating delay loop... OS timer resolution is 1 usecs, 3055M loops per second, 10 myus = 11 us, 100 myus = 101 us, 1000 myus = 990 us, 10000 myus = 10022 us, 4 myus = 5 us, OK.
Initializing buspirate_spi programmer
Baud rate is 115200.

it just hangs there.....


sometimes it makes it to ' Raw SPI mode 1'

then hangs there.....

maybe it's my wiring ?  Should I connect all 8 pins ?

Re: dose flashrom support BP v4?

Reply #9
UPDATE

It had to have been my wiring....I'm not sure though...now it reads the chip.  I changed to a shorter USB cord...not sure of that was it and repositioned the SOIC clip...

now I get:

Code: [Select]
x@Toshiba-Laptop:~$ sudo flashrom -V -p buspirate_spi:dev=/dev/ttyACM0
flashrom v0.9.6.1-r1675 on Linux 3.8.0-31-generic (x86_64)
flashrom is free software, get the source code at flashrom

flashrom was built with libpci 3.1.9, GCC 4.7.3, little endian
Command line (3 args): flashrom -V -p buspirate_spi:dev=/dev/ttyACM0
Calibrating delay loop... OS timer resolution is 1 usecs, 3061M loops per second, 10 myus = 11 us, 100 myus = 121 us, 1000 myus = 1018 us, 10000 myus = 10068 us, 4 myus = 6 us, OK.
Initializing buspirate_spi programmer
Baud rate is 115200.
Detected Bus Pirate hardware v4
Detected Bus Pirate firmware 6.2
Using SPI command set v2.
SPI speed is 8MHz
Raw bitbang mode version 1
Raw SPI mode version 1
The following protocols are supported: SPI.
Found SST flash chip "SST25VF032B" (4096 kB, SPI).
No operations were specified.
Raw bitbang mode version 1
Bus Pirate shutdown completed.

Just one more question...was it r1675 you were referring to earlier in this post that works with BP v4 ? or r1575 ?

Thanks biosflasher for responding so quickly....

Re: dose flashrom support BP v4?

Reply #10
Did you upgrade the Bus Pirate firmware since your first try? Older BPv4 firmware (sometime before firmware 6.2) is known broken because it handles the reset command in an unexpected way and causes flashrom to hang.

In theory, current flashrom in combination with BP (v3 or v4) firmware 6.2 (or newer) should work fine without any problems.
If you can reproduce the hang in any way with BPv4 firmware 6.2 or newer and current flashrom 0.9.7-r1710 or newer, please tell me so I can investigate further.
If you have any flashrom problems, please mail flashrom@flashrom.org and include "Bus Pirate" in the subject line. As an alternative, you can send me a private message.
It is recommended to use at least flashrom 0.9.2 or later, and latest flashrom from svn if you want a 3x speedup.

Re: dose flashrom support BP v4?

Reply #11
Yes, I did upgrade to FW 6.2....

I'm gonna try to upgrade Flashrom back to 0.9.7 and test again...I think I had a bad connection with the SOIC clip....

thanks biosflasher for the help...I'll report back after the update....

one last question, non-flashrom related, I am trying to flash the downloaded .scap file from the firmware file for this chip...but, the size does not match the dump or the chip.

Flashrom says:

Code: [Select]
Error: Image size (4260464 B) doesn't match the flash chip's size (4194304 B)!
Raw bitbang mode version 1
Bus Pirate shutdown completed.

any clues as to how to to match up the size ?  I'm going through it in a hex editor to see if I can spot anything ....

thanks again...

UPDATE

I think I found the extra information...at the very end of the .scap file is about 100mb of info...can I just cut that out and resave the .scap and flash ? I'm using wxHeditor

Re: dose flashrom support BP v4?

Reply #12
Yes, should work. Either with dd (replace old.img and new.img with the filenames of the old (downloaded) and new (to-be-written) file) or with your favourite hex editor.
Code: [Select]
dd if=old.img of=new.img bs=4194304 count=1
If you have any flashrom problems, please mail flashrom@flashrom.org and include "Bus Pirate" in the subject line. As an alternative, you can send me a private message.
It is recommended to use at least flashrom 0.9.2 or later, and latest flashrom from svn if you want a 3x speedup.

Re: dose flashrom support BP v4?

Reply #13
Hello again,

I have a MX25L6406E Macronix chip I'm trying to read.  It seems to hang on RAW SPI mode version 1.

Code: [Select]
x@Toshiba-Laptop:~$ flashrom -V -p buspirate_spi:dev=/dev/ttyACM0 -c MX25L6406E/MX25L6436E
flashrom v0.9.7-r1762 on Linux 3.8.0-32-generic (x86_64)
flashrom is free software, get the source code at http://www.flashrom.org

flashrom was built with libpci 3.1.9, GCC 4.7.3, little endian
Command line (5 args): flashrom -V -p buspirate_spi:dev=/dev/ttyACM0 -c MX25L6406E/MX25L6436E
Calibrating delay loop... OS timer resolution is 1 usecs, 3073M loops per second, 10 myus = 11 us, 100 myus = 121 us, 1000 myus = 1015 us, 10000 myus = 10072 us, 4 myus = 6 us, OK.
Initializing buspirate_spi programmer
Baud rate is 115200 now.
Detected Bus Pirate hardware v4
Detected Bus Pirate firmware 6.2
Using SPI command set v2.
SPI speed is 8MHz
Raw bitbang mode version 1
Raw SPI mode version 1

Do WP and HOLD need to be connected normally ?  I left them both unconnected .....

UPDATE:

I think it has to be the connection.  I'm using a SOIC 8 clip which worked before...without connecting the soic clip the buspirate initializes fine...

as soon as I connect the soic clip I get the hang...I've re-positioned many times but still it hangs...I have a BP v4 so I connected the WP and HOLD to the AUX and AUX1 pins on the BP and still it hangs.

This is exactly what happened before on the other Macronix chip ... I just dont know what I did to get it to read last time... I will try to downgrade to 9.6.1 (1675) again and see if that works....

Re: dose flashrom support BP v4?

Reply #14
[quote author="grasshopper"]Hello again,
Do WP and HOLD need to be connected normally ?  I left them both unconnected .....
[/quote]

ALWAYS connect ALL input pins to some level. This is a very important rule for all ICs, not only flash chips. You can read up about related funny effects by looking up metastability.