[Guide] Using CH341A-based programmer to flash SPI EEPROM

Hi, I was successfully able to recover my ASUS X470-Pro with CH341A + 1.8V adapter using latest flashrom from git (Linux). Thanks for the guides!

The latest BIOS updates are a bit problematic though and I’d like to downgrade to AGESA 1006 (BIOS 4207). Problem is: latest BIOS udpates are 32MB, earlier are 16MB. BIOS chip is Macronix MX25U25645 (32MB). Unfortunately, I don’t have a full dump of 4207 and flashrom won’t let me flash 16MB file to 32MB chip.

Does anyone know, how to flash 16MB BIOS to 32MB chip? Do I need to fill up the empty space with "0"s?

@tolga9009 - Solution = don’t use flashrom = problem solved
Here is CH341A general software, 1.34 version has your chip ID - http://s000.tinyupload.com/index.php?fil…257455007472602
This will let you write whatever you want, choose chip size, or only feed it 16MB file, after you erase and blank check 32MB (empty space after erase will be FF’s)

Thanks for your help! I have padded the image with 16MB of "FF"s and flashed with flashrom. Afterwards, I have flashed 4207 again via EZ Flash. Everything worked.

@tolga9009 - You’re welcome, and nice one, I didn’t even think of that with flashrom, good for you thinking outside the box too

Glad you were able to get it reflashed and sorted out

Hey! :slight_smile: It looks like I may get some answers here.

I’ve looked through the thread but I don’t see an answer to my specific question, so I’ll go ahead on here and ask away.

I’ve the CH341A but I’ve not been able to flash my dz77bh-55k.

I believe I have an issue with BH0100.BIO being too large for the chip.

( I did ignore the error message and proceeded to flash.
But without the bios file being completely flashed, I am unable to post. )

Can anyone help, perhaps with a bios-trim or have any other work around?

Thank you immensely

-

MXIC MX25L6406E M2I-12G

https://downloadcenter.intel.com/downloa…te-BHZ7710H-86A-

Try this.

ROM.zip (5.92 MB)


Hey! Was this intended for me?

I tried it anyway and still I have a file length error, and I still get the same no post.


CH341A Programmer identifies the chip as:
MX25L6405D though
MX25L6406E is on the chip

Thank you

@ZeroOne

Did you try ASProgrammer in order to flash eeprom ?

@Sylar76

I was able to select the correct chip in the ch341a programmer. This didn’t allow a complete flash though.

The file you sent to me is 9.68mb and the chip size is 8.00mb.

I haven’t used the AsProgrammer.


I am irritated that I don’t understand why there is an issue with file size. I would naturally assume that a bios file for a specific mobo chip would indeed be a correct size. It’s a mystery I want to solve.

Thanks



Here are some solutions you could try :

1) https://www.bios-downloads.com/product/i…z77bh-55k-bios/ (They’re offering bios dump you need for programmer but you’ve to pay and register yourself on their own site).

2) Try to find 8 Mbyte bios dump elsewhere (friends for example).

@ZeroOne - BIOS posted by Intel are images of several things into one file, and it’s not a complete BIOS in there either, this is not something you can just program into a BIOS

The first thing you should have done, which you probably did not do, is to dump the BIOS chip contents and then have someone check to confirm those are valid before you erase or write anything to the chip.
This does two things, first it lets you be able to find the correct/working software version and or chip ID to use with your BIOS chip, not all software versions may work and not always is exact ID best to use.
If this is not done, you loose all your board specific details that could have possibly been saved from your corrupted BIOS (NVRAM, Serial, UUID, LAN MAC ID etc). And, without doing this, you never know if your write operation is being done correctly, without dumping after and then comparing that to confirm

So, did you dump your BIOS chip before you did anything? If yes, please upload a copy of what you dumped off the chip.
If you did not, we need to find a dump of this same model, so at least you have a valid starting point.

Maybe this user would send us his BIOS dump, lets ask and see @rsfdpn

Did you already try recovery methods like this
https://forums.intel.com/s/question/0D50…?language=en_US

If no luck with normal recovery, this is the only programmable BIOS I was able to find for your model.
This is proven tested and working, however you will loose your board specific info as mentioned above, unless you have a backup you can send to me and then I can put your info into this one. MAC (Ethernet) will not be valid until you put in your proper MAC ID, so no wired internet.
You may be able to find this info on a sticker on your board, if you need me to put in BIOS, show me images of all stickers on the board front and back and be sure to check sides of 24pin, top/bottom sides of PCI/PCIE slots, and on/around the metal LAN/audio block area.
http://s000.tinyupload.com/index.php?fil…658628264954051

@Sylar76 - above file ^^ for your reference/storage

I programmed the bios file that you shared to me and powered on. PostCode32 is now displaying on the LED display. (The Motherboard WAS bricked…) Thank you, we are getting somewhere.

I did not make a backup but there are stickers for MAC and S/N on the motherboard. Should I post them here?

Any idea what could be causing the PostCode32? Is it related to the bios I wrote or something else?

( I tried the RAM shuffle but with no luck )

@Lost_N_BIOS

@Sylar76

Thanks for your help!


This version and all others in this topic flashrom for Windows does not work. Tested on WinXP 32-bit, WinXP 64-bit, Win7 64-bit. The same error on every Windows:

1
2
3
4
5
6
7
8
9
 
flashrom
flashrom v0.9.9-86-gd051d86 on Windows 5.2 (x86)
flashrom is free software, get the source code at https://flashrom.org
 
Calibrating delay loop... OK.
libusb: warning [windows_get_device_list] could not retrieve port number for device '\\.\USB#VID_1A86&PID_5512#5&2A7FCFE4&0&1', skipping: [13] The data is invalid.
libusb: warning [windows_get_device_list] '\\.\USB#VID_1A86&PID_5512#5&2A7FCFE4&0&1' was only detected in late pass (newly connected device?) - ignoring
No usable CH341A USB device found.
Error: Programmer initialization failed.
 
Zitat von Gelip im Beitrag #373
This version and all others in this topic flashrom for Windows does not work. [...]
1
2
3
4
5
 
flashrom
libusb: warning [windows_get_device_list] could not retrieve port number for device '\\.\USB#VID_1A86&PID_5512#5&2A7FCFE4&0&1', skipping: [13] The data is invalid.
libusb: warning [windows_get_device_list] '\\.\USB#VID_1A86&PID_5512#5&2A7FCFE4&0&1' was only detected in late pass (newly connected device?) - ignoring
No usable CH341A USB device found.
Error: Programmer initialization failed.
 

Latest is p1.0-109-g3bcd922 by @flashrom. It definitely works. I attached all 3 versions to an earlier post: [quote="Outsyde, post:353, topic:30834"] I recommend using the latest version by @flashrom from #214 linked above but if anyone needs it I am attaching a single ZIP with all the 3 versions that were posted in this thread so far: p1.0-109-g3bcd922 (newest), 0.9.9-97-g29333a0 (previous), and v0.9.9-r1954 (oldest). [/quote] Must be something about your local setup.
  • Is the driver installed (need to go around signature enforcement)?
  • Can you see it in Device Manager?
  • Did you connect to a separate USB port, not through any hub?
  • Is the SPI flash chip properly connected (it'd also show this error if it weren't)?
  • From my experience the last thing is the most likely reason but I've also never got this kind of error message like you quoted, so if it's not any of the 3 things above, then maybe this discussion will help: https://github.com/libusb/libusb/issues/...mment-368224551

@ZeroOne - so sorry I missed your post in July! Did you get this sorted out yet, or do you still need help?
Error 32 is recovery or memory, so you now may be able to use other recovery methods. This is probably due to the BIOS I found was too old for your current CPU or other hardware, or not exact one for your board revision, hard to know for sure.
If you have SB CPU try that instead of Ivy one, if you don’t have SB CPU, get the cheapest Celeron or Pentium you can find on ebay, usually $3-5
This may be same reason, he was on 57 and updated to BIOS 98, then hit 32 error - https://www.youtube.com/watch?v=Qzyr9yGpvM0
So could be similar issue too, just buggy BIOS I found, doesn’t work with your hardware. We need to find other dump and that would let us know for sure.

@Gelip - sorry, I have no idea how to help you with this, I’ve never used flashrom software.
Just use the windows version CH341A softwares instead (if the above doesn’t help) - http://s000.tinyupload.com/index.php?fil…257455007472602

Must be something about your local setup.

  • Is the driver installed (need to go around signature enforcement)?
  • Can you see it in Device Manager?
  • Did you connect to a separate USB port, not through any hub?
  • Is the SPI flash chip properly connected (it’d also show this error if it weren’t)?
  • From my experience the last thing is the most likely reason but I’ve also never got this kind of error message like you quoted, so if it’s not any of the 3 things above, then maybe this discussion will help: https://github.com/libusb/libusb/issues/…mment-368224551



What exactly version of Windows does it work on ???
Answers to questions:
  • driver installed
  • I see in Device Manager
  • connect to direct USB (no HUB)
  • SPI flash chip properly connected - Windows CH341A v1.34 programmer detect and work OK

I used it on 7.0 SP1, 8.1, 10.14393 (RS1) and now 10.17763 (RS5), all 64-bit only.

I think this is the reason why you can’t get it to work. For Flashrom you need a different driver installed: the one that comes with Flashrom. That Chinese GUI utility uses the CH341PAR (parallel port) driver, and only one driver can be installed at a time. So if you had the right one, it wouldn’t work.

To confirm, is this the driver you have installed?

Hi ,
my chip is Winbond 25Q128JVSQ and there is no such type in software, I tried versions 1.18, 1.29, 1.34
Is it a matter and which type to choose or use autodetect?

Moreover, if I read the chip by CH341A programmer and then run check (i.e. in software I press Read button and then Verify button), verification passed only with 1.18 ver. while under 1.29 and 1.34 it says that chip is in disagreement

Please advise, before I proceed with flashing, how to be 100% sure that I have a proper dump and which software to use?

@Hyppo - Try 1.30 and 1.34, use ID W25Q128FV, then do same in ASProgrammer 1.40, compare all three dumps in hex, or send to me.

If you can’t get it, the only one I’ve found that has all the JV variants in it’s programmer list is FlyPro, you can get these on ebay I’m pretty sure

FlyPro-W25Q128JV.png


http://www.sofi-tech.com/English/Product/Programmer/

* Edit - it’s also in this ones list - REVELPROG
https://www.reveltronics.com/en/products…-programmer-usb

More info here, on use with programmers and these chips
https://github.com/flashrom/flashrom/issues/79

@Lost_N_BIOS
It looks like there is a bug in 1.34 version?

I tried following combinations
AsProgrammer_1.4.0 with W25Q128BV profile
AsProgrammer_1.4.0 with W25Q128FV
AsProgrammer_1.4.1 with W25Q128BV
AsProgrammer_1.4.1 with W25Q128FV
CH341A_1.18 with W25Q128BV
CH341A_1.34 with W25Q128BV
CH341A_1.34 with W25Q128FV

And as I see in Winmerge only dumps from 1.34 are different and in addition they don’t pass verification. While all other dumps from 1.18 and 1.4.0/1.4.1 are identical.

Does it mean that I’m good to go with 1.18 dump?

Thanks