fang-hacks icon indicating copy to clipboard operation
fang-hacks copied to clipboard

Reflash Xiaofang using CH431

Open Papadoma opened this issue 6 years ago • 10 comments

I have bricked my xiaofang camera by trying to flash the uboot of EliasKotlyar. I tried the serial access method, but didn't work. My only choice is to remove the flash memory, hook it up to a CH431 and program it. The flash memory is a GD25Q127.

I have the CH431 and the programmer working. As a binary file I used the one provided in the description of this video https://www.youtube.com/watch?v=DgIP_ey_138 However, the CH431A programmer fails to verify the contents. It says they do not match, yet it looks like it detects and erases the flash successfully. There is no option however for a GD25Q127 chip, so I selected the GD25Q128 instead. Not sure if that is the issue or if the binary file I used cannot be used in such a way.

Any ideas?

Papadoma avatar Jan 20 '19 00:01 Papadoma

bump

Papadoma avatar Feb 17 '19 21:02 Papadoma

Maybe better one esp32 and connect it with flash by SPI.

Verxuls avatar Mar 06 '19 23:03 Verxuls

I don't think there is any issue with the CH431. I think it is the image files as they do not content all necessary parts of the flash like the bootloader.

Papadoma avatar Mar 07 '19 08:03 Papadoma

I have the same issue. I am using CH341A Programmer 1.34 with a CH341A dongle. The target flash is GD25Q127 (printed on the chip) and the program detects it as GD25Q128. The writing process is 100% completed but the verification process says the contect is not match at 50%. I read the new data from the chip and had a binary comparison of the one I read at beginning. 30% of the data are mismatch. The errors are in sector (256 bytes) based location. some sectors are correct and some sectors are wrong. Not sure what happened.

johnny881386 avatar Dec 13 '19 04:12 johnny881386

I downloaded a new program tool called CH341A Programmer V1.4 and had a try. The problem goes away.

johnny881386 avatar Dec 13 '19 08:12 johnny881386

I am having the same problem, did you try the linux flashrom?

sudo flashrom -p ch341a_spi -n -V -c GD25Q128C --layout rom.layout --image boot -w fullflash.bin https://github.com/Dafang-Hacks/spiflasher

It flashes the rom but it doesn't boot. I will try the CH341A v1.4

sergioamr avatar Dec 24 '19 21:12 sergioamr

Just found that my VCC was not properly in contact, the Ch341A Programmer gave nice errors, the flashrom was saying everything was fine.

sergioamr avatar Dec 25 '19 11:12 sergioamr

guys, i havent the same trouble and SOLVED with AsProgrammer 2.1.0.13.

Download it and try! This software detect GD25Q127

eletronicajambeiro avatar Dec 15 '20 21:12 eletronicajambeiro

i create a account on this forum to help other peoples with same trouble.

eletronicajambeiro avatar Dec 15 '20 21:12 eletronicajambeiro

I think GD25Q128 settings is not compatible. AsProgrammer supports correct version.

treysis avatar Apr 01 '21 06:04 treysis