Difference between revisions of "Sync Box Firmware Upgrade using dfu-programmer"
Line 16: | Line 16: | ||
Connect the sync box to the computer over USB. '''Don't do what [http://www.phas.ubc.ca/~mce/mcedocs/hardware/tech_description/SyncBox_UserGuide_S589_502.pdf the manual] says:''' it's wrong! Instead to enable programming, do the following: | Connect the sync box to the computer over USB. '''Don't do what [http://www.phas.ubc.ca/~mce/mcedocs/hardware/tech_description/SyncBox_UserGuide_S589_502.pdf the manual] says:''' it's wrong! Instead to enable programming, do the following: | ||
# Start with the sync box powered off and disconnected from USB | # Start with the sync box powered off and disconnected from USB | ||
− | # Depress ''both'' the RESET switch and the | + | # Depress ''both'' the RESET switch and the PS_EN switch |
# Power on the sync box | # Power on the sync box | ||
# Release the RESET switch | # Release the RESET switch |
Revision as of 17:04, 4 November 2016
This describes how to upgrade Sync Box Firmware using the free dfu-programmer on linux. This only applies to the microprocessor; often it is also necessary to upgrade the CPLD.
The dfu-programmer software can be installed in Ubuntu like this:
sudo apt-get install dfu-programmer
Make sure your version supports the sync box device (at89c5131):
$ dfu-programmer --version dfu-programmer 0.6.1 $ dfu-programmer --targets targets: at89c51snd1c at89c51snd2c at89c5130 at89c5131 at89c5132 at90usb1287 at90usb1286 at90usb1287-4k ...
Connect the sync box to the computer over USB. Don't do what the manual says: it's wrong! Instead to enable programming, do the following:
- Start with the sync box powered off and disconnected from USB
- Depress both the RESET switch and the PS_EN switch
- Power on the sync box
- Release the RESET switch
- Release the PS_EN switch
- Plug in the USB cable
When the device is properly detected it will show up in lsusb as something like:
$ lsusb Bus 002 Device 049: ID 03eb:2ffd Atmel Corp. at89c5130/c5131 DFU bootloader
To prove things are working, dump the contents of the device into a file:
$ sudo dfu-programmer at89c5131:<USB_BUS>,<USB_DEVNUM> dump > part_dump.bin
where <USB_BUS> is the bus number from lsusb and <USB_DEVNUM> is the device number from lsusb. For the example lsusb output above, this would give us:
$ sudo dfu-programmer at89c5131:2,49 dump > part_dump.bin
The contents of part_dump.bin can then be inspected with hexdump -C to confirm it's the sync box code and not some other nonsense.
Then to program the device the syntax is:
act@wilson:~$ sudo dfu-programmer at89c5131:<USB_BUS>,<USB_DEVNUM> flash sync_box_v22_26sept2014.hex