Atmel AVR32 USB Board Programming
Latest AVR32 IDE + dfu-programmer
AVR32 Studio
Install the AVR32 Studio Beta/RC version from:
Unlike in the previous releases of AVR32 Studio, the GNU Compiler+Toolchain is already included in the AVR32 Studio 2.6...
dfu-programmer
Get and compile the latest dfu-programmer from the SVN repository on:
SVN checkout:
svn checkout https://dfu-programmer.svn.sourceforge.net/svnroot/dfu-programmer
Compile:
...
Getting the Avr32 Studio and GNU Toolchain
AVR32 Studio Resources
- AVR32 Studio Getting Started Guide: http://www.atmel.com/dyn/resources/prod_documents/doc32086.pdf
- For the UC3B you need to include the so called trampoline code to bypass the DFU bootloader.
This is described in: http://support.atmel.no/bin/customer?=&action=viewKbEntry&id=309
- For this extract the attachment:boot.tgz into your project, then run File->Refresh
- Also you need to go to your project settings (Alt-Enter). Then:
- Select Confuguration to [All Configurations]
- select C/C++Build -> Settings
- In Tool Settings go to AVR32/GNU C Linker -> Miscellaneous and:
- Add this: -Wl,-e,_trampoline to the Linker Flags field.
dfu-programmer
Installation
build and install the attached dfu-programmer: attachment:dfu-programmer-svn95a.tgz
# remove any dfu-programmer already installed using dpkg: sudo dpkg -P dfu-programmer # install build dependencies: sudo apt-get install libusb-dev build-essential automake autoconf tar zxf dfu-programmer-svn95a.tgz cd dfu-programmer-svn95a ./bootstrap.sh ./configure --prefix=/usr/local/ make sudo make install
Programming a device
Create a .hex file from your .elf
avr32-objcopy -O ihex xyz.elf xyz.hex
Connect your board to your computer while pressing the DFU button
Erase and flash your device:
dfu-programmer at32uc3b1256 erase dfu-programmer at32uc3b1256 flash --suppress-bootloader-mem xyz.hex dfu-programmer at32uc3b1256 reset
Programming a device on Windows
Go to the link: " http://www.atmel.com/dyn/resources/prod_documents/doc7745.pdf" and type the commands listed on Page 17 (Figure 7-1) in the command window.
Courtsey : Georgios Petrou
Basic Firmware 0: Some GPIO testing
Firmware source: attachment:gpio-toggle.zip
This firmware:
- configures PA10, PA11 & PA12 (labeled 10, 11, 12 on the PCB) as GPIO outputs
- drives PA10 low
- drives PA11 high
- toggles PA12 forever...
It does drive these three pins ONLY! For electrical testing we would want all pins to be toggled...
Basic Firmware 1: Electrical Testing all I/Os
Firmware source: attachment:gpio-toggle-all.zip
This firmware toggles all GPIOs which are available on the copper board.
Drive strength of the GPIOs is 4mA with the exception of the high drive pins PA20 to PA23 which have 8mA drive strength.
To test your GPIOs, attach a 220 Ohm resistor to the scope probe so that we have some load on the pins when we test them.
You should see a rectangular signal with 0.9V amplitude. Of course the high-drive pins will have 1.8V amplitude respectively.
Basic Firmware 2: RGB LED controller from your computer
Basic Firmware 3: LDR light sensor read-out on your computer
Attachments
-
dfu-programmer-svn95a.tgz
(56.6 KB) - added by dfasnacht
23 months ago.
working dfu-programmer
-
gpio-toggle.zip
(80.4 KB) - added by dfasnacht
23 months ago.
gpio-toggle firmware source
-
gpio-toggle-all.zip
(82.2 KB) - added by dfasnacht
22 months ago.
v2 toggling all GPIOs of the copper board…
-
boot.tgz
(2.5 KB) - added by dfasnacht
22 months ago.
files needed to support the DFU bootloader
