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,

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,728
Trophies
2
XP
8,521
Country
Tuvalu
Hello...
I have received a lite chip which I can not update.
It doesn't work via USB and I can't find a diagram for the ST-Linker.

Does it make sense to install this chip as it is or better not ?
I wonder if the sx lite chip I just bought on aliexpress is like this too... good luck.

-edit. I just realized saw you mentioned 'lite', and not 'sx lite', you probably are using an hwfly chip and I misunderstood. I think I have nothing to worry about :)
 
Last edited by cearp,
  • Like
Reactions: _Marco_

randy_w

Well-Known Member
Member
Joined
Feb 27, 2021
Messages
709
Trophies
0
Age
34
XP
1,373
Country
United States
Dang, I should have read this thread before ordering chips on aliexpress..
I ended up ordering the oled special chip which appears to be locked. Anyone installed this chip or using it right now? Since you can't flash it does it work as intended at least? Thought some people complained about stability issues with this oled special chip.

This is what I ordered btw:
Hwfly-core-lite-oled-3rd-generation-ic-both-support-v1-and-v2.jpg_640x640.jpg
 
  • Like
Reactions: Donnie-Burger

Donnie-Burger

Well-Known Member
Member
Joined
Oct 27, 2021
Messages
927
Trophies
0
Website
www.youtube.com
XP
1,799
Country
United States
Dang, I should have read this thread before ordering chips on aliexpress..
I ended up ordering the oled special chip which appears to be locked. Anyone installed this chip or using it right now? Since you can't flash it does it work as intended at least? Thought some people complained about stability issues with this oled special chip.

This is what I ordered btw:
View attachment 300968
Did one these last night and boots instantly. I prefer the other 6 wire model but this one aint bad like some thought. I run all 6 wires directly and dont use the qsb. The adapter is also better on other model.
 
  • Like
Reactions: randy_w

Mena

Well-Known Member
OP
Member
Joined
Oct 5, 2020
Messages
148
Trophies
0
Age
29
XP
1,032
Country
United States

JaRocker

Well-Known Member
Member
Joined
May 3, 2018
Messages
341
Trophies
0
XP
1,486
Country
Jamaica
It’s funny though when tx came out what the core/lite chips everyone was complaining that it was a ripoff at $50 usd, what would you call hwfly
 
  • Like
Reactions: cearp

mattyv

Member
Newcomer
Joined
May 28, 2009
Messages
20
Trophies
1
XP
1,429
Country
United States
I finally received my OLED HWFLY today. First thing I did was flash it with 0.6.2. The flash.bat completed without error. After installing the chip and booting the first time, it flashes orange. I left it run for about 10 minutes, but never changed to yellow or green. from the LED diagram, orange is supposed to be either writing payload to BOOT0 (during training) or an unknown error code. Has anyone come across this? I am not getting any red LED, so I believe all my solder points are good. Any help is appreciated.
 
  • Like
Reactions: Donnie-Burger

Donnie-Burger

Well-Known Member
Member
Joined
Oct 27, 2021
Messages
927
Trophies
0
Website
www.youtube.com
XP
1,799
Country
United States
I finally received my OLED HWFLY today. First thing I did was flash it with 0.6.2. The flash.bat completed without error. After installing the chip and booting the first time, it flashes orange. I left it run for about 10 minutes, but never changed to yellow or green. from the LED diagram, orange is supposed to be either writing payload to BOOT0 (during training) or an unknown error code. Has anyone come across this? I am not getting any red LED, so I believe all my solder points are good. Any help is appreciated.
Check all points with a multi meter in diode mode. Ground should beep and rest should give a value. If no value thats the point that needs attention. points C and or D I would assume.
 

mocthulang

Member
Newcomer
Joined
Jan 21, 2022
Messages
13
Trophies
0
Age
42
XP
100
Country
Vietnam
I finally received my OLED HWFLY today. First thing I did was flash it with 0.6.2. The flash.bat completed without error. After installing the chip and booting the first time, it flashes orange. I left it run for about 10 minutes, but never changed to yellow or green. from the LED diagram, orange is supposed to be either writing payload to BOOT0 (during training) or an unknown error code. Has anyone come across this? I am not getting any red LED, so I believe all my solder points are good. Any help is appreciated.
The first thing you need to do is successfully install it on oled. you were too hasty
 
  • Like
Reactions: Donnie-Burger

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    MrNoobNub @ MrNoobNub: why is everyone so horny