[Guide] How to Use a CH341A SPI Programmer/Flasher (with Pictures!)

@_haru @Lost_N_BIOS I finally made linux detect the chip. Multiple try. Still erase failing.

Update. Program automatically erased but reporting unknown state

20200715_232702.jpg

20200715_235345.jpg

@everydaydealer - Please use edit instead of making multiple posts in a row, thanks

With ASProgrammer >> Select IC manually, hit unprotect icon (not drop out menu), then erase, blank check, then open file you want to write (unsure what that is while typing this, so this=general info), then write then verify.
What file are you trying to write, is it known good BIOS?

You may need to leave 24/8 pin connected to the board, or remove them, differs for various boards.
Unplug programmer and or remove power from board and wait a few minutes between failed attempts, try to leave clip in place when possible, less you have to reclip it the better, but sometimes it may take 10+ tries to get it on there perfect, so less movement = best

@Lost_N_BIOS My problem is Asrock mentioned that dont update the bios unless running Ryzen 3000 series processor but i did and it failed in between.

So it never post after that. I dont have any bios back up. Im using the bios from asrock website.

Finally, i found the magic position (not shaking it :)) now linux, 1.18. 1.29 and Asprogrammer all read and detects the chip fine but after erase and do blank check it says memory not null. Some or other message of same sort from different programs.

So i really dont know what to do. I will try exact steps for Asprogrammer and let you know


Edit:

I did erase and when i clicked blank check from dropdown of =verify thing. Im getting error. Basically it never erased fully i guess. Can i use the bios from asrock or not ?

Программатор SPI, I2C, Microwire FLASH/EEPROM v1.4.1
http://forum.easyelectronics.ru/viewtopic.php?f=17&t=10947
[email protected]
Current programmer: CH341
ID(9F): EF6018
ID(90): EF17
ID(AB): 17
ID(15): 6060
Current programmer: CH341
Old SREG: 00000000(0x00), 00000010(0x02)
New SREG: 00000000(0x00), 00000010(0x02)
Current programmer: CH341
5:45:04
Erasing memory…
Done
Execution time: 0:00:00
Current programmer: CH341
5:45:24
Verify memory…
Verification error on address: 00000000
Execution time: 0:00:00

@everydaydealer - Don’t use old version software, it will fail for sure, use ASProgrammer, it’s the only one I’ve seen proven compatible here with that chip (Or possibly new 1.38 below)
Yes, Memory not null means erase failed (ie software can’t properly write to this chip)

Do unprotect first, then erase, then blank check, then open BIOS file, write, verify.
Try these newer ASProgrammer versions, maybe work better for you, also 1.28 linked here too (have not used, or seen before, so new new new)
ASprogrammer (2.0.0a14) attached at last post here (You’ll have to join, or ask me to upload) - https://www.badcaps.net/forum/showthread.php?t=82992
CH341A 1.38 and ASProgrammer (2.1.0.13) in package here - https://www.mdclab.it/lab-usb-programmer-ch341a.html

Yes, use Asrock BIOS meant for your CPU, not the one you updated to that you shouldn’t have.

@Lost_N_BIOS

This is the one with 2.0.014 from the forum post. It failed in final verification. ( Update: Blank check failed too)

Программатор SPI, I2C, Microwire FLASH/EEPROM v2.0.0a14
http://forum.easyelectronics.ru/viewtopic.php?f=17&t=10947
[email protected]
Error connecting UsbAsp(Not found)
Current programmer: CH341
ID(9F): EF6018
ID(90): EF17
ID(AB): 17
ID(15): 6060
Current programmer: CH341
Old SREG: 00000000(0x00), 00000010(0x02)
New SREG: 00000000(0x00), 00000010(0x02)
Current programmer: CH341
2:18:13
Erasing memory…
The process can take more than a minute on large flash!
Done
Execution time: 0:00:00
Current programmer: CH341
2:18:22
Verify memory…
Verification error on address: 00000000
Execution time: 0:00:00
Current programmer: CH341
2:18:45
Programming memory…
Done
Execution time: 0:05:08
Current programmer: CH341
2:23:57
Verify memory…
Verification error on address: 00020000
Execution time: 0:00:02
Current programmer: CH341
2:24:52
Verify memory…
Verification error on address: 00020000
Execution time: 0:00:02


I will try the other ones. By the way should i have the CPU ? as the board right now doesnt have anything. Not even CMOS battery.

Where i can find the 1.28 you mentioned ?


Update: Asprogrammer 1.40 and 2.10.13 failed at verify blank state itself. Testing 341 programmer 1.38. This UI looks very different. So writing after erasing and no blank check option.

Update 2: 1.38 also failed in verification says buffer didnt match. Write was successful though.

@everydaydealer - Leave in CMOS battery always, also, connect main power cables (both) and test again << Sometimes boards need that, other times they need to be removed, since you’ve had zero luck it may be something like that, since original ASProgrammer 1.40 or 1.41 works for this chip without issue.

Write probably not successful either, since you can’t read or erase (ie can’t write). Sorry, that was typo, I meant the 1.38 I linked below that comment, not 1.28.
ASProgrammer 1.40/1.41 works for this chip, many users have used it here without issue, so something in your setup/method is the issue, not software or version.

@Lost_N_BIOS Thank you. I will try that. @Lost_n_bios what about clear cmos jumper. Does it matter?

Update: thanks a lot. With battery and power 1.41 asprogrammer did flash perfectly. Need to test the board now.

I did read and save after flash and did hex compare with rom I flashed. It’s identical. Good chances that it will post


You rock man. Thanks a lot. My system did POST successfully

@everydaydealer - You can clear CMOS later if you want, do not put jumper on while programming BIOS. After starting, be sure to load optimal BIOS defaults, then save and reboot back to BIOS to make any changes you want.
Ohh! Great to hear you were able to now flash properly and successfully!!

Awesome news, and you’re welcome!

@Lost_N_BIOS I never thought I would request for your help again, but yet I find myself with a BIOS problem I just can’t seem to figure out.

I have a cometlake notebook here which I tried to flash with an updated GOP driver. I disabled the BIOS lock but FPT always kept throwing an error when I tried to flash. So after a couple of tries I decided to try to flash the modded bios from within Windows using the WIN64 FPT version. To my amazement it actually started flashing, but after powering off the notebook and restarting it, it automatically powered off again.

At this point I was still positive because before I flashed the modded bios I dumped the full bios and the bios region with FPT as a backup.

So I opened up the notebook and reflashed the bios chip using my CH341A programmer with the original dumped bios.
The BIOS chip is a MXIC MX25L12872F.
It took numerous tries to get the clip on correctly and after some failed attempts to flash using CH341A programm v1.34, I figured out that I had to use ASProgrammer 1.41 or CH341 Programmer v1.1.1.32 for this chip.
With ASProgrammer the flash finally succeeded, but the result is still the same. When I boot up the laptop it powers back off by itself.

Do you have any idea what I’m doing wrong?
Do I need to select another chip ID maybe?

For your info, I always use chip ID MX25L12873F as 72F is not in the list, but I can always read and write to the chip just fine.
ASProgrammer always says “possible protection is enabled. press unprotect and check datasheet” but it writes the chip anyway. When I read the content again after flashing it’s exactly the same as what I wrote to it, so it seems to work.

@snixel - It’s OK, we all need help sometimes, even I reach out often to others for help on issues, how to do stuff etc!
Please link me to the BIOS download page for this system, and provide me with your BIOS region and “Full” backup in zip too.

It may be due to using FPT 64 version, I always advise NOT to use it. Or, it may be your full backup from FPT is not a full backup, if there is any FD restrictions in place for read then FPT would not be able to dump that region (mainly thinking ME region here)
For MX25L12873F we have to use CH341A v1.31(1.4) (CH341AFree) (This is the name of the folder), ASProgrammer 1.4 or 1.41, or CH341A v1.1.1.32 - So I assume MX25L12873F probably similar, but sounds like you are using something that should work, so probably issue as mentioned above.

Read/write/verify to the chip “just fine” does not always mean all OK. If you want to be 100% sure, you have to erase, blank check, open file, write/verify.
Then without powering on, close app, open app, read, verify, save and then hex compare that with the file you wrote, if 100% match then OK write is 100% OK (Sounds like you did that, but maybe not 100% correctly)?

Probably missing ME FW region in FPT dump

@Lost_N_BIOS I was already thinking it had something to do with the ME region.
I’ve uploaded a zip file containing the manufacturer bios as well as the full bios dump and bios region dump I took with FPT.
You can download it through this wetransfer link: https://we.tl/t-23IYm2Bd9e

Note: the ME version in the bios dumps is newer than the ME version in the manufacturer BIOS because I updated the ME to the latest available version using FWUpdate before I bricked it :slight_smile:

So you are saying I could replace the bios region in the manufacturer BIOS with my dumped bios region and that should make a full bios image with a working ME region?

@snixel - What brand/model is this? If your FPT dump is complete BIOS dumped when system was working, you should be able to directly program that back. BIOS region would not have anything missing in any FPT Dump (Full or BIOS region only dump)
So, if that is complete FPT Dump and you wrote it back with programmer and it’s failing, then that means your write is not working properly with programmer (do as I mentioned above)

I checked, and yes, that FPT dump is complete. Both that, and the stock BIOS programmed as-is would be bootable, once properly written to the chip.
But, looks like Boot Guard is probably enabled here, since it’s set to FVME #5 in the ME FW side, so probably key burned in at PCH - you may not be able to write back the FPT Dump due to this, but should be able to boot with the stock untouched BIOS programmed in properly
You can edit that padding file in middle of BIOS region, at 490000h copy from FPT dump and place at 490000h exact write over current FF’ content, to put back in your sys specific info, this is not covered by boot guard.
If you want to test and confirm getting the write proper and nothing else being an issue, then write in the stock untouched BIOS only, using info above, until it boots.

@Lost_N_BIOS it’s a brand new MSI GS66 Stealth 10SGS, so it would be a real bummer if I can’t fix it.

I’m pretty sure the Boot guard option was disabled in the bios when I took a look in the the hidden menu’s (you can access the hidden menus on a MSI bios through a special key combo), but the signs the motherboard is showing sure point in that direction.

I will try your suggestion in a couple of days (I will be abroad for work on monday and tuesday) and report back.
Thank you for your assistance so far!

@snixel - Boot Guard and BIOS Guard are two very different things, and Intel Boot Guard is not something there is a BIOS setting for
This is set in ME FW and if enabled with key burned into the PCH you can’t edit any area of the BIOS that is covered by boot guard (at all) - This can only be checked with MEINFO once system is running again.
It should be OK to edit where I mentioned though, that is not covered by boot guard. But, go ahead and test programming in the stock BIOS as it is, then manually confirm the write is OK as mentioned at post #250, then we’ll fix the system info later via FPT



@flashrom What other information do I need that we don’t already have? I just got a reply back from ITE themselves who told me they are very sorry, but that document is covered by NDA for manufactory.

The guide involves interfacing with the chip through the J_KB1 keyboard connector. Looking at the pins used in the guide for that different chip, I matched up the same KSI numbers to the IT8587 and J_KB1 pins.

The only unknown is if those KSI numbers, and therefore the connected pins, have the same function. The guide specifically calls for CS (Chip Select), CLK (Serial Clock Input), MOSI/DI (Serial Data Input), MISO/DO (Serial Data Output) & GND (Ground/Enable EDI).

Edit: I just found some info on KSI/KSO as a whole. It’s related to the key matrix, which I’m assuming differs between models? https://www.ti.com/lit/ug/tidu521/tidu521.pdf (P6+)

@Lost_N_BIOS you did it again :slight_smile:

I programmed the stock BIOS with my sysinfo copied over at address 490000h and the laptop finally booted again. Is there any other unique system info I need to put back? I didn’t see my MAC address in there, but all looks ok.

And indeed the setting in the BIOS was called “BIOS guard” and not Boot Guard (my mistake).

I assume I cannot disable this boot guard function? Is there any way in finding out which part of the bios region is ‘protected’?

@Lost_N_BIOS I checked with MEIinfo and I can see ‘Force Boot Guard ACM’ is Enabled.

Is there any way I can baypass this and still flash modified content? Would it maybe work if I modify the stock manufacturer BIOS and flash it through the build in UEFI BIOS update tool like I normally would with an official BIOS release?

Hey, I have bought 4 bios chips from different vendors, model MX25L12873F to replace my faulty one.
They all report the same:
“Possible protection is enabled. Press “Unprotect” and check datasheet” (that’s why I got 4 of them because I thought initially I bought a faulty bios chip and ordered more from different vendors just to be sure)
By now I’m pretty sure all those chips are not faulty, ASProgrammer seems to not work on them.
When trying to flash it using ASProgrammer, I’m using the original BIOS. I have read somewhere that when this message is displayed [“Possible protection is enabled. Press “Unprotect” and check datasheet”], it means it will not work. Any idea how to overcome that problem?

I offer 100$ to whoever is able to help me getting this fixed

@Lost_N_BIOS Hello, can you help me?

I have a asusk55vd laptop, it had bios chip problems it usually loses track of the time, that’s how I know its a bad chip, so yesterday I changed my cpu of the PC and started normal without any problems but after a restart by windows to update win 10 PC stuck with choose a bootable disk option I had 2 disks so I went bios and picked the one with win 10 and saved changes but then pc never booted. Stuck on a black screen with no nothing I searced and figured its bios chip corrupted.

So i bought the cha341 a programmer and downloaded bios file from asus’s site and renamed it to bin since it had 411 extension. And reprogrammed my chip with success, i even verified but now my pc wont even boot there is no led lights or whatsoever it has the power on motherboard but nothing happens with battery or anything i don’t understand why this happened? i don’t think the motherboard is dead since it was working perfectly but now nothing happens even when i plug ac the battery light is not on. Can you help me please.