Difference between revisions of "TIAO GBoard (ATMEGA32u4/FT231x) Manual"

From TIAO's Wiki
Jump to: navigation, search

10 PCS, 10cm x 10cm, 2 layers prototype for $38.80 shipped!
 
(4 intermediate revisions by the same user not shown)
Line 16: Line 16:
 
On Windows machines, you can load the firmware by using Flip or DFU-programmer.
 
On Windows machines, you can load the firmware by using Flip or DFU-programmer.
  
=== DFU Programmer ====
+
==== DFU Programmer ====
 
The easiest way to load firmware is the DFU programmer
 
The easiest way to load firmware is the DFU programmer
  
Line 29: Line 29:
 
# Run command "dfu-programmer atmega32u4 flash <path to hex> file" to load the firmware to the chip
 
# Run command "dfu-programmer atmega32u4 flash <path to hex> file" to load the firmware to the chip
 
# Run command "dfu-programmer atmega32u4 reset" to safely remove unplug the GBoard from your PC.  
 
# Run command "dfu-programmer atmega32u4 reset" to safely remove unplug the GBoard from your PC.  
 
+
[[image:Dfu-programmer-win.png|none]]
  
 
==== Flip from Atmel ====
 
==== Flip from Atmel ====
Line 50: Line 50:
  
  
=== Force into bootloader mode ===
+
=== Linux ===
 +
==== DFU-Programmer ====
 +
 
 +
On Linux machines, you can load the firmware by using DFU-programmer.  You can download DFU-Programmer directly or install it from the repository.
 +
I am using Ubuntu as an example.
 +
 
 +
# Install DFU-Programmer: "sudo apt-get install dfu-programmer"
 +
# Plug the GBoard to your Linux machine
 +
# Run command "dfu-programmer atmega32u4 erase" to empty the chip.
 +
# Run command "dfu-programmer atmega32u4 flash <path to hex> file" to load the firmware to the chip
 +
# Run command "dfu-programmer atmega32u4 reset" to safely remove unplug the GBoard from your PC.
 +
 
 +
If you see "dfu-programmer: no device present", then it means your Linux box cannot find Atmega32u4.  This is likely to be a DFU / Linux kernel issue on autosuspend ([https://sourceforge.net/p/dfu-programmer/mailman/message/504454/]).  The solution is to disable autosuspend on Atmega32u4: "echo -n -1 > /sys/module/usbcore/parameters/autosuspend".  Otherwise the steps are the sane wuth DFU-Programmer on Windows.
 +
 
 +
 
 +
== Force into bootloader mode ==
 
If your have previously programmed your ATMEGA32U4 and you would like to flash a new firmware, you can do this easily.  By holding the S1 button on the board before you plug it to your PC, then release it, the device will be forced into bootloader mode, and then you can program the chip again.
 
If your have previously programmed your ATMEGA32U4 and you would like to flash a new firmware, you can do this easily.  By holding the S1 button on the board before you plug it to your PC, then release it, the device will be forced into bootloader mode, and then you can program the chip again.

Latest revision as of 02:58, 17 February 2016

TIAO GBoard is a development board for rapid AVR development.

Th GBoard is powered by an ATMEGA32U4 and FT231x. The ATMEGA32U4 pre-programmed with the AVR's DFU bootloader which allows code to be programmed inside the chip without any external programmer.

Inspect hardware

The GBoard can work in 5V mode or 3.3V mode. The default voltage is 5V, which is configurable via jumper J5. Short J5's 1-2 for 5V mode, short J5's 2-3 for 3.3V mode.

If you are using the GBoard for GMIX development, please make sure the jumper is at 5V (1-2 on J5).

Make sure no jumpers on J1 and J2 for now.

Load firmware to ATMEGA32U4

Windows

On Windows machines, you can load the firmware by using Flip or DFU-programmer.

DFU Programmer

The easiest way to load firmware is the DFU programmer

  1. Do not plug the GBoard yet
  2. Download the DFU Programmer from [1]
  3. Unzip the downloaded zip file to a folder, e.g. c:/temp/driver
  4. Plug the GBoard's ATMEGA32U4 USB connector to your computer using a USB A to Mini USB B cable. There are 2 Mini USB connectors on the GBoard, one is for FT231x and one is for ATMEGA32U. The ATMEGA32U one is next to S1 switch.
  5. Go to device manager, you should see Atmega32u, right mouse click on it and select "Update driver software"
  6. The downloaded DFU-programmer contains windows drivers for ATMEGA32U, point the driver location to c:/temp/driver/dfu-prog-usb-1.2.2, then select Next to continue the installation of the driver.
  7. Once the driver is installed, open a DOS command prompt window, change the current directory to the directory you have decompressed the DFU programmer zip file
  8. Run command "dfu-programmer atmega32u4 erase" to empty the chip.
  9. Run command "dfu-programmer atmega32u4 flash <path to hex> file" to load the firmware to the chip
  10. Run command "dfu-programmer atmega32u4 reset" to safely remove unplug the GBoard from your PC.
Dfu-programmer-win.png

Flip from Atmel

Flip is a Java program provided by Ateml.

  1. Do not plug the GBoard to your Windows machine yet, as there is no driver at this moment.
  2. Download the Flip software from [2]. If you do not have Java installed on your Windows, download the package with embedded java version, otherwise download the smaller package one.
  3. Install the Flip software. The installation is straightforward. This will also install the drivers for AVR microchips, so when you connect the GBoard to your computer you have drivers to install.
  4. Plug the GBoard's ATMEGA32U4 USB connector to your computer using a USB A to Mini USB B cable. There are 2 Mini USB connectors on the GBoard, one is for FT231x and one is for ATMEGA32U. The ATMEGA32U one is next to S1 switch.
  5. Windows should pop up a 'Found new hardware" dialog.
    Newdevice.png
    Click on it to install the driver. If you do not see this, go to control panel, and open device manager, you should see something like:
    Atmega32u4-dm.png
    , right mouse click and select update driver software.
  6. Select browse my computer for driver software:
    Updatedriver.png
  7. The driver software is installed under Flip installation directory: "C:\Program Files (x86)\Atmel\Flip 3.4.7\usb":
    Driverlocation.png
    click "Next".
  8. Windows may pop up a dialog windows similar to this:
    Driverwarning.png
    , select "Install".
  9. After driver is successfully installed, you will see this:
    Dirverdone.png
    . Click "Close" to close the dialog
  10. Now launch Atmel Flip, click the target device icon:
    Fliptargerdeivce.png
    then select ATMEGA32U4 in the target device list:
    Flipatmega32u4.png
    Click OK
  11. Select USB as the communication medium:
    Flipcomm.png
    and click Open:
    Flipcommopen.png
  12. Load HEX:
    Fliploadhex.png
    Select corresponding firmware for ATMEGA32U4. Since I am going to use it for PS3, I select EMUPS3/atmega32u4.hex:
    Flipselectfw.png
  13. Make sure Erase, Blank Check, Program and Verify is checked, then click Run:
    Fliprun.png
  14. Now you have loaded the firmware to your GBoard:
    Flipdone.png


Linux

DFU-Programmer

On Linux machines, you can load the firmware by using DFU-programmer. You can download DFU-Programmer directly or install it from the repository. I am using Ubuntu as an example.

  1. Install DFU-Programmer: "sudo apt-get install dfu-programmer"
  2. Plug the GBoard to your Linux machine
  3. Run command "dfu-programmer atmega32u4 erase" to empty the chip.
  4. Run command "dfu-programmer atmega32u4 flash <path to hex> file" to load the firmware to the chip
  5. Run command "dfu-programmer atmega32u4 reset" to safely remove unplug the GBoard from your PC.

If you see "dfu-programmer: no device present", then it means your Linux box cannot find Atmega32u4. This is likely to be a DFU / Linux kernel issue on autosuspend ([3]). The solution is to disable autosuspend on Atmega32u4: "echo -n -1 > /sys/module/usbcore/parameters/autosuspend". Otherwise the steps are the sane wuth DFU-Programmer on Windows.


Force into bootloader mode

If your have previously programmed your ATMEGA32U4 and you would like to flash a new firmware, you can do this easily. By holding the S1 button on the board before you plug it to your PC, then release it, the device will be forced into bootloader mode, and then you can program the chip again.



10 PCS, 10cm x 10cm, 2 layers prototype for $38.80 shipped!