Tutorial  Updated

How to flash the HWFLY Clone chips

See below for updates.

IF YOU BREAK YOUR BOOT0 PIN. DO NOT DM ME ASKING FOR HELP. THAT'S IT. YOU BREAK THAT PIN AND YOU CANT FLASH. YOUR CHIP IS STUCK WITH WHATEVER HWFLY PUT ON IT


Pre-requisites:




  • Raspberry Pi Zero W
    • You may use another flasher if you desire.
  • Pinout Diagram
  • Modchip Diagram
  • FULL_CHIP_STOCK.bin
  • Modchip Diagram, find the PA9(TX) and the PA10(RX) pins on your modchip, and do the following:
    • Connect GPIO14(TX) on your Raspberry Pi Zero W to the PA10(RX) pin on your modchip.
    • Connect GPIO15(RX) on your Raspberry Pi Zero W to the PA9(TX) pin on your modchip.

  1. Solder a wire to each of the following pinouts on the Raspberry Pi Zero W:
    • 3.3V
    • Ground
    • GPIO 14 (UART TX)
    • GPIO 15 (UART RX)
  2. Do the following to prepare the modchip:
    1. Lift pin 44 (also known as BOOT0).
    2. You will need a way to power the chip, so you need to find two 3.3v points. It can be on a MOSFET, but it will differ based on the revision of the modchip.
    3. Connect Ground on your Raspberry Pi Zero W to the Ground pin on your modchip.
    4. Check the Modchip Diagram, find the PA9(TX) and the PA10(RX) pins on your modchip, and do the following:
      • Connect GPIO14(TX) on your Raspberry Pi Zero W to the PA10(RX) pin on your modchip.
      • Connect GPIO15(RX) on your Raspberry Pi Zero W to the PA9(TX) pin on your modchip.
  3. Boot your Raspberry Pi Zero W and do the following:
    1. In the terminal, type the following command, and press enter:
      Bash:
      sudo nano /boot/config.txt
    2. Add the following line to the end of the file:
      INI:
      dtoverlay=pi3-miniuart-bt
    3. Press CTRL + X to save and exit the editor.
    4. In the terminal, type the following command, and press enter:
      Bash:
      sudo nano /boot/cmdline.txt
    5. Remove the following line from the file:
      INI:
      console=serial0,115200
    6. Press CTRL + X to save and exit the editor.
    7. Restart your Raspberry Pi with this command
      Bash:
      sudo /sbin/reboot
    8. In the terminal, type the following commands, and press enter after each command:

      Bash:
      git clone https://github.com/Pheeeeenom/stm32flash.git
      cd stm32flash
      sudo make install
  4. Now you will flash the modchip.
    Note: This will remove read protection, and the modchip will wipe itself (that is what we want).
    1. In the terminal, type the following command, and press enter:
      Bash:
      stm32flash -k /dev/serial0
    2. Now to flash Spacecraft-NX Version 0.2.0, type the following, and press enter:
      Bash:
      stm32flash -v -w ./FULL_CHIP_STOCK.bin /dev/serial0
  5. Once you're done flashing your modchip, remove the wiring from the modchip, and restore the 3.3v pin on the modchip to its original position.

Please post pictures of your work here to further the identification of the different board revisions!


UPDATE: So it seems like stitching the spacecraft bootloader and firmware together from the repo causes unstable glitching behaviors. For now, consistent glitching behavior works with this bootload/firmware combo.
This is the original file on the OLED variant chip which has 0.2.0 spacecraft. As for glitching, I'll figure it out, give me some time...unless someone else wants to hop in and reverse the differences.

For now, this at least solves the 0.1.0 HWFLY gen 3 issue. More to come.

UPDATE 2: This is only going to work on some HWFLY chips. Older ones use higher protection than the new revisions that seem to use the QFN FPGA.

UPDATE 3: This should fully work on OLED modchips with the QFN FPGA. https://github.com/Pheeeeenom/firmware
 
Last edited by Mena,

mocthulang

Member
Newcomer
Joined
Jan 21, 2022
Messages
13
Trophies
0
Age
42
XP
100
Country
Vietnam
Yay! Got my v3 chip in the mail today, along with 99.9% IPA. Now I need the rest of the stuff to arrive… like the 0.1mm enameled wire and thermal paste and solder mask and stuff. So I can’t dig into the installation yet. This sucker is so tiny! Glad I asked the seller to get me the instruction page, because what you see here, is what you get. No instructions, or even a receipt in the box. No links to firmware or software. Confirmed it comes with the USB dongle though...

View attachment 295212
do you have alixpress link?
 

fragged

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
229
Trophies
0
Age
38
XP
1,249
Country
United States
The price keeps going up. It's expensive for a modchip, but keep that in mind (and make sure you've selected OLED before adding it to your cart)...

https://www.aliexpress.com/item/1005003698689759.html?spm=a2g0o.9042311.0.0.38084c4daBs39f
At least the newer OLED Clone chips are cheaper than the old stock V1, and SpaceCraft-NX v0.1.0 HWFLY Lite's that sellers liike Ming were selling as "V3 works with OLED" for $170. Mine shipped out of China & last tracked on Dec 7, not a thing since, I have a feeling that it fell into the ocean on it's way over to the US. I'm just waiting till I can finallly file a dispute on Feb 15th to get my money back from these sellers who don't even know what they hell they are talking about & sending out.

I wonder how many OLED's they are responsible for killing after being powered on right after an install to verify that it works by seeing the splash screen, or no screen after having those old chips fry the new OLED Switch.

Link is out of stock however, maybe someone can post another link from where they got a verified known good working OLED chip?
 
  • Like
Reactions: platanos

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,716
Trophies
2
Age
48
Location
Japan
XP
3,593
Country
United States
Well, maybe it's all for the best that it's out of stock. I got impatient and tried to flash a newer firmware to it without it being installed (I swear I saw a video of that being done, so it should have worked, right?). But... I got a red light instead of yellow, which according to the install&update video posted here, means that it can't be flashed with USB as-is.

So... can someone look at my pic and tell me whether I need a GD-LINK or an STM-Link? And are there instructions for doing the SWD thing on this particular model yet? pic on page 10: https://gbatemp.net/threads/tutorial-how-to-flash-the-hwfly-clone-chips.606008/post-9728860
 
Last edited by urherenow,

xdMatthewbx

Well-Known Member
Newcomer
Joined
Nov 9, 2017
Messages
52
Trophies
0
Age
53
XP
407
Country
Canada
At least the newer OLED Clone chips are cheaper than the old stock V1, and SpaceCraft-NX v0.1.0 HWFLY Lite's that sellers liike Ming were selling as "V3 works with OLED" for $170. Mine shipped out of China & last tracked on Dec 7, not a thing since, I have a feeling that it fell into the ocean on it's way over to the US. I'm just waiting till I can finallly file a dispute on Feb 15th to get my money back from these sellers who don't even know what they hell they are talking about & sending out.

I wonder how many OLED's they are responsible for killing after being powered on right after an install to verify that it works by seeing the splash screen, or no screen after having those old chips fry the new OLED Switch.

Link is out of stock however, maybe someone can post another link from where they got a verified known good working OLED chip?
To be fair, most people didn't know the Lites damaged OLEDs until recently, and using a Lite chip in an OLED won't immediately kill it, it takes some time. That being said, these sellers are charging a lot more than is reasonable considering these chips can't cost more than 30$ to make (and that's assuming they're making bad purchase decisions), so I wouldn't say criticising them is wrong, just do it for the right reason.

EDIT: Also, I have a working OLED chip. It's the arch flex, not the long flex. I haven't flashed it yet but when I plug in USB I get a yellow lite. The payload checker says it's safe. It only gives me NO SD every several boots. Glitch time is noticeably worse than the Lite and Core (I have an original of both), but not a deal breaker. I'll be flashing the new firmware once my programmer arrives in case something goes wrong.
 

lufeig

Well-Known Member
Member
Joined
Oct 22, 2009
Messages
306
Trophies
1
Age
45
Location
São Paulo, Brazil
XP
1,057
Country
Brazil
To be fair, most people didn't know the Lites damaged OLEDs until recently, and using a Lite chip in an OLED won't immediately kill it, it takes some time. That being said, these sellers are charging a lot more than is reasonable considering these chips can't cost more than 30$ to make (and that's assuming they're making bad purchase decisions), so I wouldn't say criticising them is wrong, just do it for the right reason.

EDIT: Also, I have a working OLED chip. It's the arch flex, not the long flex. I haven't flashed it yet but when I plug in USB I get a yellow lite. The payload checker says it's safe. It only gives me NO SD every several boots. Glitch time is noticeably worse than the Lite and Core (I have an original of both), but not a deal breaker. I'll be flashing the new firmware once my programmer arrives in case something goes wrong.
I flashed firmware r021 from sthetix on my OLED modchip w/ USB and glitching times improved a lot. But debugging seems to be broken on that release.

Mena is investigating, I hope he can manage to have better glitching times on his fw version too, with working debugging on USB.
 

xdMatthewbx

Well-Known Member
Newcomer
Joined
Nov 9, 2017
Messages
52
Trophies
0
Age
53
XP
407
Country
Canada
I flashed firmware r021 from sthetix on my OLED modchip w/ USB and glitching times improved a lot. But debugging seems to be broken on that release.

Mena is investigating, I hope he can manage to have better glitching times on his fw version too, with working debugging on USB.
Yeah I'll wait for USB to be fixed on that. Don't want to be locked out of future improvements
 

lufeig

Well-Known Member
Member
Joined
Oct 22, 2009
Messages
306
Trophies
1
Age
45
Location
São Paulo, Brazil
XP
1,057
Country
Brazil
USB works fine for firmware flashing.

Only debug mode is broken.

Personally, I don’t use debug mode at all, fast glitching is more useful for me, that’s why I’m keeping r021 by now.

Better sd compatibility is also included on that fw, among other features.
 

boston909

Member
Newcomer
Joined
Jan 10, 2022
Messages
11
Trophies
0
Age
35
XP
55
Country
United Kingdom
USB works fine for firmware flashing.

Only debug mode is broken.

Personally, I don’t use debug mode at all, fast glitching is more useful for me, that’s why I’m keeping r021 by now.

Better sd compatibility is also included on that fw, among other features.
Thanks lufeig, I'm getting my OLED-chip installed tomorrow and just watched the video on youtube by sthetix about the OLED installation / r021 flashing... so would you advise that my modder should flash firmware r021 to the chip? I can stick with Samsung cards either way, but it would be good to get your take on the r021 firmware and how stable it seems to you.
 

lufeig

Well-Known Member
Member
Joined
Oct 22, 2009
Messages
306
Trophies
1
Age
45
Location
São Paulo, Brazil
XP
1,057
Country
Brazil
Thanks lufeig, I'm getting my OLED-chip installed tomorrow and just watched the video on youtube by sthetix about the OLED installation / r021 flashing... so would you advise that my modder should flash firmware r021 to the chip? I can stick with Samsung cards either way, but it would be good to get your take on the r021 firmware and how stable it seems to you.
1 consider that there are some OLED modchips w/ USB that are not compatible with this method (https://gbatemp.net/threads/tutorial-how-to-flash-the-hwfly-clone-chips.606008/post-9726794)

2 I can’t comment on sd card compatibility, I have a 512GB Lexar and never had any problem, never got a single NOSD screen

3 glitching times with r021 are consistently better on my Switch. same behavior is observed on the Switch of another user here, in fact I flashed r021 following his report about it

4 I don’t feel comfortable to recommend flashing r021 because there are still risks involved in the process. Glitching on stock fw works, but on r021 it is optimized. I did it because I know I wouldn’t sleep well if I didn’t. LOL. But considering the risks, I would say it’s up to you to decide if it’s worth it or not. 😉
 

sleepyouwill

New Member
Newbie
Joined
Jan 24, 2022
Messages
2
Trophies
0
Age
33
XP
330
Country
United States
Is anyone running into problems updating the firmware to the latest version (0.2.0.ChinaSDCardCompat) from the SD card / .force_update file?
I do see that the LED turns on and stays a solid green color and I let it run for over 5 minutes.

I unfortunately have an OLED switch that boots into a black screen so I don't know if it's failing, stuck or reporting an error.

Rebooting the switch doesn't cause the chip to brick so I'm assuming it never gets a chance to write the firmware?
 

lufeig

Well-Known Member
Member
Joined
Oct 22, 2009
Messages
306
Trophies
1
Age
45
Location
São Paulo, Brazil
XP
1,057
Country
Brazil
Although the .force_update method is known to work with vanilla spacecraft, it was never mentioned or recommended to be used with this fork, so I just used the method mentioned on this thread: through USB port and a Windows PC.
 
  • Like
Reactions: sleepyouwill

JaRocker

Well-Known Member
Member
Joined
May 3, 2018
Messages
341
Trophies
0
XP
1,486
Country
Jamaica
hey where can i find the cmd point in the older switch motherboard.
I don't know which one it is I'm trying to use this board as a donor for my OLED
 

Attachments

  • Screenshot_3.png
    Screenshot_3.png
    969.3 KB · Views: 64
  • Screenshot_1.png
    Screenshot_1.png
    805.5 KB · Views: 49

JaRocker

Well-Known Member
Member
Joined
May 3, 2018
Messages
341
Trophies
0
XP
1,486
Country
Jamaica
I assume you mean the modchip? Otherwise this just won't work.
the point where the cmd goes to from the modcip. i think its

47kΩ ±1% 0.05W 0201. so where trying to find the​

47kΩ ±1% 0.05W 0201 on the older switch so i can take it off and put it on my oled​

 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: ssssey ioBtneicnA@