FW3A Firmware Flashing Guide

6 posts / 0 new
Last post
crgbt
Offline
Last seen: 6 days 11 hours ago
Joined: 07/28/2019 - 15:53
Posts: 1
FW3A Firmware Flashing Guide

Hi everyone,

 

I'm new to BLF, but have been a lurker over at CPF for many years. I recently signed up here after purchasing an FW3A, and then subsequently a D4V2 too - needless to say I've rediscovered the flashlight bug!

 

Whilst my FW3A was in transit, I noticed posts about the muggle mode bug in the FW3A firmware and set about finding out how the firmware is flashed on the FW3A. I couldn't find one single source of information, so I decided to pull together a post in a similar fashion to Terry Oregon's post on how to upgrade the firmware on a D4V2.

 

All comments, feedback & constructive criticism welcome Smile

 

Tools Required

 

This guide assumes you know how the various parts of the FW3A (or FW3C) flashlight, know how to solder, and have already de-soldered the positive and negative wires from the MCPCB and removed the driver board. If there is enough interest in a how-to for this, I may well add this into the guide.

 

On the side of the driver board without the spring, you will find an ATtiny85 AVR Microcontroller, located here on the board with the corresponding pin locations:

(Credit to fritz15 for the image)

 

The pins on the ATTiny85 are assigned as follows:

  1. RESET
  2. INP
  3. INP
  4. GROUND
  5. MOSI
  6. MISO
  7. SCK
  8. VCC (+)

 

Next, look at your USBASP Programmer. It will have a 10-pin connector, typically found on the top-right hand side of the board or mounted horizontally on the right-hand end of the board. The pin locations are typically as follows, however if in doubt check the markings on the top or bottom of the board, or the manual that came with your USBASP Programmer:

The pins on the USBASP Programmer are assigned as follows:

  1. MOSI
  2. VCC (+)
  3. GROUND
  4. NC
  5. RESET
  6. GROUND
  7. SCK
  8. GROUND
  9. MISO
  10. GROUND

 

Next, look at your SOIC Adapter. Depending on your model, you will either have bare pins at the top of the clip, cables going from the male pins to an 8-pin connector, or cables going from the male pins and male or female Dupont connectors on the end. On my adapter, these pins are labelled 1 through 8, with the cable connecting to 1 on both ends designated with a red colour.

 

You may need to use a multi meter to find out which pin is which if there are no markings. If you have one of the SOIC Adapters with bare pins on the top of the clip, these are mapped straight down to the bottom of the connector.

 

For flashing the FW3A (or FW3C) firmware, we are interested in the pins for MOSI, VCC (+), RESET, SCK, MISO and GROUND.

 

In order to make things simpler for myself, I’ve always stuck with the same pin/wire colour combination:

 

MOSI: Blue

VCC (+): Orange

RESET: Purple

SCK: Yellow

MISO: Green

GROUND: Grey

 

Next, using your Dupont wires, wire up the USBASP Programmer, SOIC Adapter and ATTiny85 microcontroller as follows:

This is all the wiring complete. Do not connect the SOIC connector to the ATtiny85 just yet.

 

 

Note: There is another fantastic guide to installing the USBASP Programmer driver and AVRDUDE written by Terry Oregon which covers many of the same steps I cover below but more in-depth, if you get stuck with my instructions you can find Terry’s guide here: http://budgetlightforum.com/node/68263

 

On your Windows machine, plug in the USBASP Programmer to a spare USB-A port, and then run Zadig from the folder you downloaded it to.

 

In the top menu, click Options and then select List All Devices. In the drop-down list, you should see USBasp. Select it.

 

You will see a window like this; however, you should see ‘None’ in the Driver field, and the ‘Reinstall Driver’ button should say ‘Install Driver’:

 

From the Driver field on the right, scroll down using the buttons until libusbK is selected, then click Install Driver.

 

The installation will take around a minute, after this has completed you can close Zadig.

 

Next, create the directory C:\AVRDUDE on your Windows machine, then launch the MHV AVR Tools installer from the folder you downloaded it to.

 

On the first screen of the Setup Wizard, click Next, and then click I Agree on the License Agreement page.

 

On the Choose Install Location page, click Browse…

 

Back on the Choose Install Location screen, click Next

 

On the Choose Components page, leave the defaults and click Next

 

The installer will now install MHV AVR Tools in C:\AVRDUDE. Once the installer completes, click Finish to close the installer.

 

Next, copy the FW3A firmware file from the folder you downloaded it to, to the C:\AVRDUDE\MHV AVR Tools\bin directory.

 

Open a Command Prompt as an Administrator (right-click on the Command Prompt icon, then select Run as administrator)

 

Change directory to C:\AVRDUDE\MHV AVR Tools\bin by using the command "cd 'C:\AVRDUDE\MHV AVR Tools\bin'"  (without double quotes) and then hitting enter.

 

Now, connect the SOIC Adapter to the ATtiny85 microcontroller, ensuring that the adapter is in the correct orientation so that the pins are in the correct order.

 

Back in the Command Prompt Window, run the command "avrdude -p t85 -c usbasp -n" (without double quotes). If your wiring is correct and the SOIC adapter is connected correctly, you will see an output like the following:

C:\AVRDUDE\MHV AVR Tools\bin>avrdude -p t85 -c usbasp -n

 

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions

 

Reading | ################################################## | 100% 0.01s

 

avrdude: Device signature = 0x1e930b

 

avrdude: safemode: Fuses OK (H:FF, E:DE, L:E2)

 

avrdude done.  Thank you.

 

If the above test passes, you are ready to flash your FW3A (or FW3C) with the latest firmware.

 

At the same Command Prompt you ran the previous test in, run the command "avrdude -p t85 -c usbasp -Uflash:w:anduril.2019-08-05.fw3a.hex" (without double quotes), replacing anduril.2019-08-05.fw3a.hex with the name of your firmware file.

 

You will then see an output like the following:

C:\AVRDUDE\MHV AVR Tools\bin>avrdude -p t85 -c usbasp -Uflash:w:anduril.2019-08-05.fw3a.hex

 

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions

 

Reading | ################################################## | 100% 0.01s

 

avrdude: Device signature = 0x1e930b

avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.

avrdude: erasing chip

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: reading input file "anduril.2019-08-05.fw3a.hex"

avrdude: input file anduril.2019-08-05.fw3a.hex auto detected as Intel Hex

avrdude: writing flash (7760 bytes):

 

Writing | ################################################## | 100% 5.11s

 

avrdude: 7760 bytes of flash written

avrdude: verifying flash memory against anduril.2019-08-05.fw3a.hex:

avrdude: load data flash data from input file anduril.2019-08-05.fw3a.hex:

avrdude: input file anduril.2019-08-05.fw3a.hex auto detected as Intel Hex

avrdude: input file anduril.2019-08-05.fw3a.hex contains 7760 bytes

avrdude: reading on-chip flash data:

 

Reading | ################################################## | 100% 4.18s

 

avrdude: verifying ...

avrdude: 7760 bytes of flash verified

 

avrdude: safemode: Fuses OK (H:FF, E:DE, L:E2)

 

avrdude done.  Thank you.

 

You have now successfully flashed your FW3A (or FW3C)! You can now disconnect the SOIC Adapter from the ATtiny85 microcontroller and re-assemble your flashlight.

 

It is highly recommended to perform a factory reset on the flashlight following an update. You can do this by letting the flashlight settle to room temperature, then hold in the tail button whilst tightening the tail cap to connect power, whilst holding the tail button for around 3 seconds until the flashlight emits a bright flash. You can also perform a factory reset by doing 13 clicks from off.

 

I hope this has helped someone. If you run into any issues feel free to reply and I'll do my best to troubleshoot with you.

 

Thanks,

crgbt

Edited by: crgbt on 08/09/2019 - 16:38
Anthon
Offline
Last seen: 6 hours 11 min ago
Joined: 09/07/2015 - 10:33
Posts: 518

Thanks a lot for this useful thread, now I don’t have a reason to not flashing the latest anduril build in my FW3’S

Nicolicous
Nicolicous's picture
Offline
Last seen: 1 hour 4 min ago
Joined: 04/16/2016 - 08:28
Posts: 1436
Location: Australia
:ARROW-RIGHT: Beer

Nico -.-

KevinZA1988
KevinZA1988's picture
Online
Last seen: 4 min 15 sec ago
Joined: 02/26/2018 - 02:26
Posts: 515
Location: South Africa

Thank you for this. I’m definitely gonna attempt to flash mine!

Acebeam L16, BLF Q8, BLF A6, BLF FW3A, BLF FW3C, Convoy L2, Convoy L6, Convoy C8+ , Convoy S3, Convoy M21A, Convoy S11, Emisar D4, Fireflies E07, Jaxman E2L, Olight S1R Baton II special edition series, S2R Baton II, Nitecore HC65, Olight H1R Nova.

chops728
Offline
Last seen: 2 hours 6 min ago
Joined: 08/30/2014 - 16:00
Posts: 877
Location: Swampland,La

Thanks SB

SammysHP
SammysHP's picture
Offline
Last seen: 9 hours 37 min ago
Joined: 06/25/2019 - 14:35
Posts: 36
Location: Germany
Quote:
Whilst my FW3A was in transit, I noticed posts about the muggle mode bug in the FW3A firmware and set about finding out how the firmware is flashed on the FW3A. I couldn’t find one single source of information, so I decided to pull together a post in a similar fashion to Terry Oregon’s post on how to upgrade the firmware on a D4V2.

There is no muggle mode bug in the FW3A. That bug was specific to the D4V2.