cancel
Showing results for 
Search instead for 
Did you mean: 

How to use an STM32 to flash a bios chip with a bin or hex file?

Dwait.1
Associate II

My old PC motherboard's bios chips were corrupted and it's an old 1155 socket so there were no available replacements.

I believe I have the necessary tools to attempt to erase and reprogram the chip, but I'm not sure what I need to do.

There isn't much STM32 resources online to guide me through this, but I'll post some useful links which I've found at the end.

But, due to COVID-19 and a nationwide lockdown, STM32 is all I can rely on.

I've already downloaded the bios' .bin file for my motherboard and converted it to a hex format with this online tool.

Attached is also my hex file. I can send my .bin if requested, but I can't upload it here as '.bin' is not supported.

Any assistance or alternative solutions would be much appreciated.

Motherboard: Gigabyte GA-H77M-D3H

BIOS: Winbond 26Q64FVSIG (SPI interface)

MCU: STM32F334R8

I also have a FT230XS USB-UART communication implemented.

YouTube Tutorial: Recover Bricked BIOS using FlashRom on a Raspberry Pi

YouTube Tutorial: How to unbrick or reset the BIOS password on nearly any modern laptop with a Raspberry Pi

GitHub API: W25QXX SPI FLASH Library for STM32

3 REPLIES 3

Pretty sure the .BIN / .HEX form isn't of much relevance, just going to be more decoding effort on the STM32 side.

You'd need to implement the chip level support on top of the SPI layer. If I were using a NUCLEO I'd probably just X-MODEM the binary over the VCP using a terminal app, into routines writing into the external FLASH device.

Not sure there's a simple video/script kiddie approach to this, if you've got some programming chops and can read/interpret the FLASH IC data sheet, perhaps an hour of effort.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Sorry, I'm quite a noob.

Do you mean that I can send the file to the STM32 via the USB and from there write an algorithm which can write to the BIOS via SPI?

I have read through the datasheet and I'll be able to read/write, but my confidence in how to actually send the correct bytes and that I'm over-complicating things is low,

> MCU: STM32F334R8

In what form?

And, probing the level of your "noobness": Can you compile the library you've linked to, program it into the STM32 and and e.g. read out the sFLASH ("BIOS") ID?

The problem here is, that we on this forum are not very keen to go explaining the details of what we consider as commonplace, as we use it in our everyday work; nor are we inclined to write a ready-made program for this. You may want to go e.g. to the microcontroller portion of eevblog forum, or other such site, where there may be more presence of application-oriented people.

JW