Home
deRFsoftware Programming User Manual
Contents
1. Can Windows connect to Windows Update to search for software C Yes this time only C Yes now and every time connect a device EN Aeseserdeuereeeseerererreeeedesereecl Cancel On the next screen choose Install from a list or specific location Advanced and press Next Figure 14 Figure 14 Install from a specific location Found New Hardware Wizard This wizard helps you install software for AT91 USB to Serial Converter If your hardware came with an installation CD lt 6 or floppy disk insert it now What do you want the wizard to do Install the software automatically Recommended Reaper esse Click Next to continue lt Back Cancel www dresden elektronik de Page 22 of 61 User Manual Version 1 5 ee Software Programming Select Don t search will choose the driver to install and press Next Figure 15 Figure 15 Choose driver manually Found New Hardware Wizard Please choose your search and installation options S C Search for the best driver in these locations Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed Search removable media floppy CD HOM f Include this location in the search C Documents and S ettings Owner Desktop 20110 e peer SE this option to select
2. e Signals available on screw terminals Product information https shop dresden elektronik de development boards and kits develooment boards stb sensor terminal board html User Manual and Datasheet http www dresden elektronik de funktechnik service downloads documentation www dresden elektronik de Page 21 of 61 User Manual Version 1 5 ee Software Programming 6 Drivers As most programmers and development boards use USB as communication interface and power supply the installation of a suitable driver is required prior to the microcontroller firmware update 6 1 AT91 USB to Serial Converter The AT91 USB to Serial Converter is a boot loader stored in the internal ROM of ARM based Atmel microcontrollers This ROM boot loader supports the firmware update via the microcontroller s native USB interface The installation process in Windows XP and Windows 7 is described in the two sections below 6 1 1 Driver Installation in Windows XP The first time you plug the USB stick in the Found New Hardware Wizard will pop up Please select No not this time and press Next Figure 13 Figure 13 Found New Hardware Wizard Found New Hardware Wizard Welcome to the Found New Hardware Wizard Windows will search for current and updated software by looking on your computer on the hardware installation CD or on the Windows Update Web site with your permission Read our privacy policy
3. Exit SAM BA now tries to connect to the USB stick This can take some seconds Finally a dialog window opens giving access to all the memories of the microcontroller The transfer of the firmware is analog to Section 9 3 2 With the update finished close SAM BA and unplug the USB stick After power on reset the new firmware will be executed 9 4 2 Erase USB stick For sticks with customer installed firmware and without JTAG connector and with a customer application that does not allow to reactivate the SAM BA boot loader mode only the full erasure of the entire microcontroller flash memory can reactive the SAM BA boot loader Although this can be achieved easily we recommend soldering a 10 pin header to the foot print on the USB stick and use the firmware update method via JTAG instead of erasing all flash content Attention The procedure described here should be considered as the absolute last resort and only executed if there is absolutely no other way as it deletes all data on the stick including valuable manufacturer data like the MAC address To erase any firmware the deRFusb stick needs to connect to an USB port While being powered the two metal contacts on the bottom side of the printed circuit board must be connected together for at least 1 second Figure 64 Figure 64 Bottom side deRFusb www dresden elektronik de Page 58 of 61 User Manual Version 1 5 i N S Software Programming e Now the SAM BA in
4. Show page on startup www dresden elektronik de Page 37 of 61 User Manual Version 1 5 GC Software Programming 7 6 2 Define tool device and interface At first define the used programmer on TOOL In this case chose AVRDRAGON The next step is the selection of the device target microcontroller here ATMEGA128RFA1 The connection interface is JTAG Figure 41 Figure 41 Studio 6 interface settings AVR Dragon 004200006766 Device Programming Tool Device Interface Device signature Target voltage AVR Dragon w ATmegal28RFA1 v TAG App Ox1EA701 Interface settings Use external reset Tool information use external reset Device information l JTAG Daisy chain settings Memories Target device is not part of a JTAG daisy chain Fuses O Daisy chain Lock bits Production file Reading device ID OK Reading device ID OK Close Press on READ to check if the chip ID matches the selected device In the case of an error check if the selected device is correctly defined and if the used hardware setup is OK The main power supply must be switch on Figure 42 Figure 42 Studio 6 device information AVR Dragon 004200006766 Device Programming Tool Device Interface Device signature Target voltage AVR Dragon w ATmegal28RFAl TAG el Apply OxiEA7OL Read 3 3v read Interface settings Detected Device Tool information Device name ATmega128RFA1 Device information Devi
5. 1 MHz and above However higher ISP frequency settings result in a faster firmware update At very low ISP frequencies the programming of 64 kB can take many minutes It is advisable to check the selected ISP frequency prior to any firmware update www dresden elektronik de Page 40 of 61 User Manual Version 1 5 ee Software Programming 7 7 3 Update firmware The new microcontroller firmware must be loaded into the internal flash Go to the program tab and choose the hex file for the flash Press on PROGRAM and wait till the update process is done The log history should show Leaving programming mode OK Now make a power on reset on the device target to ensure a correct start of the microcontroller firmware Figure 46 Note To correctly flash a new firmware the device needs to be erased first The AVR Studio 4 does this automatically if the Erase before flash programming check box Is active Attention A device erase for an AVR does erase the internals flash AND the internal EEPROM The EEPROM stores valuable manufacturing data such as the devices MAC address To prevent the erasure of the EEPROM content the fuse EESAVE must be active We therefore recommend checking the fuse settings before any firmware update Figure 46 Program device AVRISP mkll in ISP mode with ATmegal 28RFA1 Main Program Fuses LockBits Advanced Hw Settings HW Info Auto Device Erase Device Erase device before
6. 22102 deRFmega128 22M13 deRFmega256 23 100 deRFmega256 23 102 deRFmega256 23M13 www dresden elektronik de Page 31 of 61 User Manual Version 1 5 i N S Software Programming e 7 2 Required hardware and electrical connections A firmware update of an AVR radio module by dresden elektronik needs a few requirements that must be fulfilled e an AVR compatible programming tool see Section 2 e the AVR programmer see Section 3 e an available electrical connection see Section 4 and e the platform see Section 5 7 3 Preparation for programming At first ensure that the required programming tool and all drivers are installed on your workstation Connect the platform or baseboard on which the AVR radio module is plugged or soldered to an appropriate power supply Now the preferred programmer must be connected to the workstation in the most cases via USB and the JTAG or ISP header on the platform Often the programmer connector or cable has a marking for pin 1 Ensure that the polarization is correct The following sections give examples for programming of AVR evaluation radio modules via JTAG and ISP 7 4 Firmware update via JTAG using AVR Studio 4 7 4 1 Start programming tool This example shows a firmware update of a deRFmega128 radio module with AVR Studio 4 19 The programmer is an AVRDRAGON connected to the deRFnode platform by dresden elektronik At first follow the preparation of Section 7 3 Start th
7. 46 8 6 2 Update procedure cccccseccceecceececececuecceeecsuceceueeseeessueesseeseueessueeseeesaes 47 8 7 Firmware Update via JTAG using JLINK CGommander 47 8 7 1 Start programming Tool 47 B12 Update gelen OE EEE 48 8 8 Firmware Update via JTAG using Open 49 8 8 1 Flashing deRFarm7 radio module nsesnsnnennnnnnennsnnerrnerrrrrsrrerrrsrrerrennne 49 8 8 2 Flashing deRFsam3 radio module 51 8 9 Firmware update via USB using GAMPBA 52 ogl PIPA aO NE NO NE NE ESE 52 8 9 2 Update procedure KENNEN 53 J UWS e SUAS EE 54 BENTE VE 54 9 2 Required Hardware and electrical conpnechon 55 9 3 Firmware update via ITA 55 9 3 1 Preparation for lte rale te iia siexis exasietwst ctniexssexanvxwst ctaiexsiexaniviwsactnexsuersiiwsencas 55 9 3 2 Transferring firmware rrrnrrnnnrnnnrnnnrnnnrnnnnnnrrnnrnnnrnnrrnnnrnnnrnnnrnnennnsennennsnnee 57 9 4 Firmware update via USB ccccccccceececseecaeeeceeeceeceseeccseecaeeesseesceeeseeeesseeseeeesaees 57 9 4 1 Connecting SAM BA to the USB STICK rrrnnrrnnnrrvnnnrrnrnrrrnnnrernnrrrnnnrennnernnnn 58 OA EEB ae EEE E E E Ea E Ea 58 10 Manufacturing dala aa sian ete inn dete pa ana a Aa RERE 59 Wile FA Ar kade 60 www dresden elektronik de Page 4 of 61 User Manual Version 1 5 i N S Software Programming e Document history om en pern 2013 04 15 1 4 Including new sections e Firmware files Programming tool electrical connections programmer fuse settings NV R
8. Hw Settings HW Info Auto Device Erase Device Erase device before flash programming Verify device after programming Flash Input HEX File ents and Settings Administrator Desktop Application hex CJ EEPROM Input HEX File Ga ELF Production File Format Input ELF File LG Save From FLASH EEPROM _ FUSES LOCKBITS Fuses and lockbits settings must be specified before Setting device parameters OK Entering programming mode OK Reading fuses address 0 to 2 0x62 0499 OxFE OK Leaving programming mode OK 7 5 Firmware update via JTAG using AVRdude The AVRdude program supports a wide range of programmers This section will only cover the AVRDRAGON programmer If any other programmer is used the parameter following below must be customized to meet the programmer s condition Type in the command listed below to get a list of all supported programmers avrdude exe c In Table 1 all necessary parameters are listed to program the deRFmega modules from dresden elektronik Further information and details about the AVRdude commands are available on the corresponding homepage www dresden elektronik de Page 35 of 61 User Manual Version 1 5 i N S Software Programming e Table 1 AVRdude parameter Parameter Description p lt partno gt the target device which to program 0 Disable automatic verify check when uploading The port where the programmer is connected to c lt progra
9. N Nscriptsytargetvat9isam x512 cfg c arm H fast memory access enable c arm 9 dec downloads enable d c init c soft reset halt c halt 168 c flash write bank c application bin c reset run c shutdown pen On Chip Debugger 0 6 1 lt 2 12 1 87 198 34 gt icensed under GNU GPL v2 or bug reports read http openocd sourceforge net doc doxygen bugs html ebug_level dapter speed 1666 kHz rst only srst pulls trst srst gates jtag srst_open_drain ast memory access is enabled cc downloads are enabled equesting target halt and executing a soft reset arget state halted arget halted in ARM state due to debug request current mode Supervisor psr 6x 66806d3 pc Dann rote 92132 bytes from file c application bin to flash bank at offset 6x88006 66 in 13 578125s lt 6 626 KiB s hutdown command invoked Nopenocd 6 1Nbin gt S After a successful firmware update the GPNVM bit must be set to ensure the application start out of the internal flash Set GPNVM openocd 0 6 1 exe f scripts interface icprog openocd cfg f E E DUS Verge acolsam x512 crg G arm gt fast memory access enable arm 9 deo downloads enable O SE ECKE St TEE reser hale c at9lsam7 7 gpnvm 2 set c reset run c shutdown Execute the command Figure 53 Figure 53 OpenOCD Set GPNVM bit cv C WINDOWS system32 cmd exe openocd 6 1 bin gt openocd 6 1 exe f sc
10. and do not prevent the usage of standard programmers 4 1 JTAG 10 pin The most common JTAG interface Figure 8 10 pin JTAG connector for AVR microcontrollers is a 10 pin 100 mil header Some ARM programmers like OpenOCD use the _ 1 2 O eano same interface The signal description ms d 4 sm TT is shown in Figure 8 Ver G 0 7 8 C Pin 1 TCK Pin 2 GND Pin 3 TDO Pin 4 VCC Pin 5 TMS Pin 6 RESET Pin 7 VCC Pin 8 n c Pin 9 TDI Pin 10 GND The 10 pin header is supported by a lot of programmers such as e AVRDRAGON by Atmel e JTAGICEmkIl by Atmel e ICprog OpenOCD by In Circuit e AVR JTAG by OLIMEX 4 2 Small JTAG 10 pin The small JTAG interface connector Figure 9 Small 10 pin JTAG for microcontrollers is a 10 pin 50 mil header This connector is preferred for small baseboards by dresden gt VCC elektronik The signal description IS ce shown in Figure 9 The connector features the UART signals RXD and TXD additionally Pin 1 TCK Pin 2 GND Pin 3 TDO Pin 4 VCC Pin 5 TMS Pin 6 RESET Pin 7 VCC Pin 8 RXD Pin 9 TDI Pin 10 TXD The small 10 pin header needs an adapter to connect it with the programmer e JTAG Adapter by dresden elektronik and JTAGICEMKII programmer for a picture of the adapter see Section 3 2 e SAM ICE Adapter by dresden elektronik and SAM ICE programmer You can also refer to Section 4 5 and 4 6 for further information about the adapters www dres
11. device driver installation OpenOCD requires a configuration file which sets the programmer device parameters This includes how OpenOGCD shall access the programmer and JTAG timing parameters A minimalistic configuration file for the ICprog Open OCD programmer which is used for this example looks as follows interface interface Tt2232 ft2232 vid pid 0x0403 0x6010 EL Layout oocdlank JTAG clock speed adapter khz 1000 Choose a proper file name like icprog_openocd cfg and save it in the directory scripts interface A firmware programming example for a radio module is described in Section 8 8 7 AVR radio modules The update process of AVR radio modules by dresden elektronik will be demonstrated on one example device and is valid for all supported programmers and radio modules www dresden elektronik de Page 30 of 61 User Manual Version 1 5 8 Ce Software Programming e 7 1 Supported AVR radio modules The built in single chip microcontroller is the ATMEGA128RFA1 for evaluation and OEM modules A newer chip version with 256 kByte internal flash is only available in OEM radio modules with the ATMEGA256RFR2 Evaluation Modules deRFmega128 deRFmega1 28 deRFmega128 deRFmega128 22A00 22A02 22C00 22C02 OEM Modules deRFmega128 22M00 deRFmega128 22M10 deRFmega128 22M12 deRFmega256 23M00 deRFmega256 23M10 deRFmega256 23M12 OEM Modules with adapter deRFmega128 22100 deRFmega128
12. firmware upgrade HW Info programmer hardware revision and firmware version Auto automate user defined device target program processes www dresden elektronik de Page 33 of 61 User Manual Version 1 5 ee Software Programming 7 4 2 Define microcontroller At first define the correct microcontroller Figure 36 In this example the ATMEGA128RFA1 must be chosen Figure 36 AVR Studio 4 19 choose device AVR Dragon in JTAG mode with No device selected Main Program Fuses LockBits Advanced HW Settings HW Info Auto Device and Signature Bytes No device selected vi Erase Device AT90USBE46 ATSOUSBE47 r AT90USB82 ATA6289 ATmegal28 ATmegal 280 ATmega1281 AT magal 284 ATmegal284P ES ATmegal 284 e Daisy Chain Disabled Changes to daisy chain settings are only valid from the next time the programming dialog is opened Press on READ SIGNATURE to check if the chip ID matches the selected device Figure 37 In the case of an error check if the selected device is correctly defined and if the used hardware setup is OK The main power supply must be switch on Figure 37 AVR Studio 4 19 Signature read out AVR Dragon in JTAG mode with ATmegal 28RFA1 Gr z Main Program Fuses LockBits Advanced HW Settings Hw Info Auto Device and Signature Bytes ATmega128RFA1 J DE Ox amp 7 0x01 JTAG ID is 0x0A70103F Signature matches selected device Programming Mode and T
13. flash programming Verify device after programming Flash Input HEX File ents and Settings 4dministrator D esktop application hex CJ EEPROM Input HEX File Ga ELF Production File Format Input ELF File za Save From FLASH X EEPROM FUSES LOCKBITS Fuses and lockbits settings must be specified before Erasing device OK Programming FLASH OK Reading ELAGH OK FLASH contents is equal to file OK Leaving programming mode OK www dresden elektronik de Page 41 of 61 User Manual Version 1 5 i N S Software Programming e 7 8 Fuses The fuses of an AVR microcontroller are important and depending on the customer application The fuses can be changed in the programming tool with the programmer Figure 47 Figure 47 Fuse settings AVR Dragon in JTAG mode with ATmegal 28RFA1 a Main Program Fuses LockBits Advanced Hw Settings Hw Info Auto Fuse Value BODLEVEL Brown out detection at V C 1 8 Y OCDEN JTAGEN SPIEN WDTON EESAVE BOOTSZ oot Flash size 4096 words start address F 000 BOOTRST CKDIV8 v CKOUT i KOEI GIIT h BC Cen Charhun timer OK EE me EXTENDED OgFE HIGH 0x99 LOW Ox62 Auto read Smart warnings Verify after programming Setting device parameters OK Entering programming mode OK Reading fuses address 0 to 2 0x62 0x99 OxFE OK Leaving programming mode OK The ATMEGA128RFA1 has following fuses The recommended sett
14. following section gives examples for programming of ARM radio modules Attention Be careful with erasing the device target flash memory via pulling the ERASE pin high to VCC or by the programming tool Valuable manufacturing data such as the MAC address are saved within the internal flash memory and will be lost after an erase cycle via the erase pin or a chip erase 8 6 Firmware update via JTAG using SAM BA 8 6 1 Start programming tool Start the programming tool sam ba exe in the installation folder At first choose the programmer connection and the device target microcontroller This example uses the SAM ICE programmer by Segger selectable as jlink ARMO The target board is at91sam7 x ek for deRFarm radio modules and rf231usb rd for deRFusb radio sticks and deRFsams radio modules Press the button CONNECT Figure 49 www dresden elektronik de Page 46 of 61 User Manual Version 1 5 ee Software Programming Figure 49 Choose connection and device ind SAM BA 2 12 Select the connection fijlink ARMO Select your board fat91sam3s4 ek v JLink speed default JLink TimeoutMultiplier 0 v Customize lowlevel Connect Exit 8 6 2 Update procedure A new window appears The firmware must be load into the internal flash Choose the firmware file with the Send File Name browse button and press the SEND FILE button After a successful update process the scri
15. gmbh Enno Heidebroek StraBe 12 01237 dresden GERMANY Phone 49 351 31850 0 Fax 49 351 31850 10 Email wireless dresden elektronik de Trademarks and acknowledgements e 802 15 4 is a trademark of the Institute of Electrical and Electronics Engineers IEEE e Atmel and Atmel SAM BA are registered trademarks or trademarks of Atmel Corporation or its subsidiaries in the US and or other countries e Windows and others are registered trademarks or trademarks of Microsoft Corporation in U S and or other countries e ZigBee is a registered trademark of the ZigBee Alliance These trademarks are registered by their respective owners in certain countries only Other brands and their products are trademarks or registered trademarks of their respective holders and should be noted as such Disclaimer This note is provided as is and is subject to change without notice Except to the extent prohibited by law dresden elektronik ingenieurtechnik gmbh makes no express or implied warranty of any kind with regard to this guide and specifically disclaims the implied warranties and conditions of merchantability and fitness for a particular purpose dresden elektronik ingenieurtechnik gmbh shall not be liable for any errors or incidental or consequential damage in connection with the furnishing performance or use of this guide No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or any
16. means electronic or mechanical including photocopying and recording for any purpose other than the purchasers personal use without the written permission of dresden elektronik ingenieurtechnik gmbh Copyright 2013 dresden elektronik ingenieurtechnik gmbh All rights reserved www dresden elektronik de Page 61 of 61
17. now you will return again to the previous dialog Figure 19 Figure 19 Install from disk Continue with OK x Insert th facturer s installation disk and th dE Cancel Copy manufacturer s files from C Program Files 4TMEL Corporation sam ba_2 1 v i Now select the AT91 USB to Serial Converter and press Next The driver will be installed Figure 20 Figure 20 Continue with Next gt Found New Hardware Wizard Select the device driver you want to install for this hardware q Select the manufacturer and model of your hardware device and then click Next If you have a disk that contains the driver you want to install click Have Disk IV Show compatible hardware AT91 USB to Serial Converter A This driver is not digitally signed Have Disk Tell me why driver signing is important lt Back Cancel www dresden elektronik de Page 24 of 61 User Manual Version 1 5 ee Software Programming If a message box Driver is not digitally signed appears press Continue anyway The wizard will finish the driver installation Press Finish to close the wizard Figure 21 Figure 21 Finish the installation Found New Hardware Wizard Completing the Found New eS Hardware Wizard The wizard has finished installing the software for AT91 USB to Serial Converter Click Finish to close the wizard After succe
18. or e 10 pin header for JTAG with correct signal configuration see Section 4 1 www dresden elektronik de Page 18 of 61 User Manual Version 1 5 i N S Software Programming e Note Depending on the programmer it might be necessary to place pull up resistors to VCC on the signals RESET TDI TMS and TCK We recommend 100k ohms 5 2 Platforms by dresden elektronik Attention The listed platforms by dresden elektronik support only the pluggable AVR and ARM7 evaluation radio modules To use the smaller OEM radio module with these platforms the radio modules must be soldered onto an appropriate adapter Alternatively the already pre soldered adapter module combinations can be purchased from the dresden elektronik online store deRFbreakout Board e 10 pin and 20 pin JTAG connector e All signals available on screw terminals e Recommended for all radio modules Product information https shop dresden elektronik de development boards and kits develooment boards dert breakout board html Datasheet http www dresden elektronik de funktechnik service downloads documentation deRFgateway e 10 pin and 20 pin JTAG connector e Ethernet support e Recommended for ARM7 radio modules Product information https shop dresden elektronik de development boards and kits development boards gateway for arm html User Manual and Datasheet http www dresden elektronik de funktechnik service downloads documentation ww
19. the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware lt Back Cancel On the next dialog press the Have Disk button Figure 16 Figure 16 Select Have Disk Found New Hardware Wizard Select the device driver you want to install for this hardware DI Select the manufacturer and model of your hardware device and then click Next If you have a disk that contains the driver you want to install click Have Disk AT91 USB to Serial Converter A This driver is not digitally signed Tel DE Now click on Browse and locate the directory of your SAM BA installation it can be usually found under Program Files This installation directory contains a subdirectory drv Please select and enter this directory Figure 17 Figure 17 Choose location Browse x Insert the manufacturer s installation disk and then H make sure that the correct drive is selected below Cancel Copy manufacturer s files from Browse www dresden elektronik de Page 23 of 61 User Manual Version 1 5 GC Software Programming The file atm6124 cdc should pop up select it and press the Open button Figure 18 Figure 18 Locate File atm6124 cdc inf Look in E dry DI Q 3 gt Po File name atm6124_cde z Files of type Setup Information D inf Cancel pr By pressing OK
20. the preferred programmer to the USB port After completion of the setup start the application www dresden elektronik de Page 12 of 61 User Manual Version 1 5 i N S Software Programming e 2 7 Open OCD OpenOCbD is a low budget programming tool for ARM based and MIPS microcontrollers It hooks up to GDB and Eclipse and has good support for the low cost FTDI based USB adapters OpenOCD is either invoked on the command line or runs in background as a daemon there is no graphical user interface It can be used for flash programming as well as debugging and ships with an integrated GDB server There is a large community using and permanently improving OpenOCD For details please visit the project website http openocd sourceforge net Programming tool openOCD Open On Chip Debugger Version 0 6 1 Tested with programmers ICprog OpenOCD Supported device targets ARM7 and CORTEX M3 radio modules Tested on OS WinXP 32 bit Download http sourceforge net projects openocd Sources http www freddiechopin info en download category 4 openocd pre compiled Setup and Start Extract and compile according to the given instructions if the source version is used or extract to a chosen directory for pre compiled version Interconnect the programmer with the PC 3 Programmer This section lists programmers for AVR and ARM microcontrollers There are far more programmers available on the market but only the described bel
21. 00000 ox00418408 Flash NandFlash SRAM Download Upload File Send File Name C application bin Send File Receive File Name Receive File Address 0x400000 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Boot From Flash GPNYM1 Y Execute 0x9400 bytes written by applet Writing Ox66E8 bytes at 0x12800 buffer addr 0x20002750 Ox66E8 bytes written by applet Do not lock Gamba 2 12 1 FLASH ScriptGPNMY 2 I GPNYM1 set Gamba 2 12 1 jlink ARMO Board at9isam3s4 ek y 9 USB radio Sticks This section describes programming of deRFusb radio sticks by dresden elektronik The update process will be demonstrated on one example and is valid for all supported programmers and radio modules 9 1 Supported radio sticks The supported radio sticks are based on CORTEX M3 microcontroller AT91SAM3S4 and differs only in feature equipment like onboard 2 GByte flash memory and Small JTAG 10 pin connector 2 4 GHz USB Sticks deRFusb 23E00 deRFusb 23E00 deRFusb 23E06 deRFusb 23E06 JTAG JTAG www dresden elektronik de Page 54 of 61 User Manual Version 1 5 ee Software Programming Sub GHz USB Sticks deRFusb 13E00 deRFusb 13E00 deRFusb 13E06 deRFusb 13E06 JTAG JTAG 9 2 Required Hardware and electrical connection The firmware update of deRFusb radio sticks can be done using the JTAG interface or over the USB interface itself To program over the JTAG inte
22. AM Erase Pin Addition of new devices e AVR radio modules e ARM7 radio modules e CORTEX M3 radio modules Updated to SAM BA 2 12 2013 08 21 Update section Manufacturing Data and References www dresden elektronik de Page 5 of 61 User Manual Version 1 5 i N S Software Programming e Overview This Manual shows different ways how to update the firmware on radio modules and USB radio sticks from dresden elektronik The update will be described and executed with common programming tools The update process examples are demonstrated on three different microcontroller architectures Atmel AVR ATMEGA128RFA1 and ATMEGA256RFR2 Atmel ARM7 AT91SAM7X512 Atmel CORTEX MS8 ATSAM3S4A and ATSAM3S4B 1 Firmware Files The programming tools for AVR microcontrollers described and used within this document require a hex file for firmware updates of the internal flash and EEPROM The file extension is hex Other tools might accept other file formats as well The tool used to transfer the firmware to the internal flash of microcontrollers with ARM architecture use two file formats Depending on the tool either hex files and bin files are used The required firmware file format is usually generated after the compilation and linking of the source code files and objects by some post processing tool of the tool chain used for compilation To transfer the firmware to the internal flash or EEPROM of any microco
23. agmkII initialize lt gt warning OCDEN fuse not programmed single b te EEPROM updates not possible vrdude exe AUR device initialized and ready to accept instructions eading HHHHHHHHHHHHHHHHHHHHHHRHHHHHHHHHRHHHHHHHHHHHHHHHH 1 1002 0 02s vpdude exe Device signature xlea7 1 Ga mee NOTE FLASH memory has been specified an erase cycle will be perfo me To disable this feature specify the D option vrdude exe erasing chip vpdude exe jtagmklII initialize lt gt warning OCDEN fuse not programmed single b te EEPROM updates not possible exe reading input file application hex exe input file application hex auto detected as Intel Hex vpdude exe writing flash lt 26898 bytes riting H HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 1 1862 3 69s vrdude exe 26898 bytes of flash written vrdude exe safemode Fuses OK vrdude exe done Thank you NWinAVR 2 1 11 Nbin gt 7 6 Firmware update via JTAG using Atmel Studio 6 7 6 1 Start programming tool This section shows a firmware update of a deRFmega128 radio module with Atmel Studio 6 The programmer is an AVRDRAGON connected to the deRFnode platform by dresden elektronik At first follow the preparation on Section 7 3 and start the programming tool atmelstudio exe Open the programmer menu by TOOLS gt DEVICE PROGRAMMING Figure 40 Figure 40 Studio 6 Start Start Pape Atmelstudio Close page after project load
24. alled Atmel AVR Studio some steps have to be done previously as the AVR Studio installs the Jungo driver which is the USB driver system for all the programmers supported by AVR Studio Unfortunately AVRdude is not able to use the Jungo driver to down upload application firmware Therefore a filter USB driver is necessary This is offered by the libusb win32 driver software the name should not be confused this drivers also works under 64 Bit Windows systems 2 4 1 Using AVRdude without AVR Studio stand alone After installation of WinAVR it is necessary to install the programmer drivers In this example the AVRDRAGON is used The WinAVR package does not deliver suitable driver files for the AVRDRAGON The following steps show an inf file creation for the programmer as a libusb win32 device www dresden elektronik de Page 8 of 61 User Manual Version 1 5 i ee Software Programming Execute inf wizard exe Figure 1 in the WinAVR install directory utils libusb bin Figure 1 Execute inf wizard exe LibUSB Win32 INF File Wizard Information This program will create an inf file for your device Before clicking Next make sure that your device is connected to the system Cancel Choose the AVRDRAGON programmer Figure 2 Figure 2 Select the device LibUSB Win32 INF File Wizard Device Selection Select your device from the list of detected devices below If your device isn t listed then
25. arget Settings Daisy Chain Disabled Changes to daisy chain settings are only valid from the next time the programming dialog is opened Setting device parameters OK Entering programming mode OK Reading signature from device 0x1E 0x47 0x01 OK Leaving programming mode OK www dresden elektronik de Page 34 of 61 User Manual Version 1 5 i N S Software Programming e 7 4 3 Update firmware The new microcontroller firmware must be loaded into the internal flash Go to the program tab and choose the hex file for the flash Press on PROGRAM and wait till the update process is done The log history should show Leaving programming mode OK Figure 38 Now cycle the power of the device target to ensure a correct start of the microcontroller firmware Note To correctly flash a new firmware the device needs to be erased first The AVR Studio 4 does this automatically if the Erase before flash programming check box is active Attention A device erase for an AVR does erase the internals flash AND the internal EEPROM The EEPROM stores valuable manufacturing data such as the devices MAC address To prevent the erasure of the EEPROM content the fuse EESAVE must be active We therefore recommend checking the fuse settings before any firmware update Figure 38 AVR Studio 4 19 Programming done AVR Dragon in JTAG mode with ATmegal 28RFA1 Main Program Fuses LockBits Advanced
26. ation of AVR Studio 4 and install the AVR Jungo USB driver After completion of the setup start the application 2 2 AVR Studio 5 This tool will not be supported because of the replacement with Atmel Studio 6 2 3 Atmel Studio 6 Atmel Studio 6 is a software tool with an integrated tor IDE for writing debugging and deploying code to the M device target AVR and ARM architecture will be both M 29 supported i DT en VE 08 Version rosa Wind NT 511 2800 Serice Pack 3 Plat Wh2NT View Installed Components ARMGCC v Programming tool Atmel Studio 6 Bee CMSIS 2 10 Version 6 0 build 1996 Te sted with D rog rammers J TAG IC E m kl SE egener AVRDRAGON HelpUri AVRISPmklIl SAM ICE Supported device targets AVR CORTEX M3 radio modules Tested on OS WinXP 32 bit Win7 32 Bit Download http www Atmel com tools Atmelstudio aspx Registration necessary Setup and Start Execute the file as6installer 6 0 1996 net exe and confirm the license agreement The setup requires Microsoft NET Framework 4 0 Full Profile Microsoft Visual Studio Isolated Shell 10 0 and Atmel USB Driver The package includes these parts and will install them if necessary Select the install destination of Atmel Studio 6 and continue the setup After completion start the application Connect the preferred programmer to the USB port Note If the programmer cannot be installed correctly it could be necessary to install the Jung
27. c 0 ilash write Dank U lt path to BIN file gt U c reset run c shutdown www dresden elektronik de Page 51 of 61 User Manual Version 1 5 e ee Software Programming Set GPNVM openocd 0 6 1 exe f var NSGriptsInLerk oe 1LOprog Openocd crg f scripts target at9lsam3sXX cfg d0 0 Apne C Hale c at9lsam3 gpnvm set 1 c reset run c shutdown Clear GPNVM openocd 0 6 1 exe f scripts interface icprog openocd Cig f scripts target at9lsam3sXX cfg d0 0 IPL o hall c at9lsam3 gpnvm clear 1 c shutdown 8 9 Firmware update via USB using SAM BA This kind of firmware update process is only performable with ARM radio modules and is an exceptional case The controller must start in the SAM BA mode The entries in this mode are only available by setting the GPNVM bit to zero Booting from ROM or by pulling the microcontroller ERASE pin to supply voltage VCC The first method requires a JTAG connection which makes the firmware update by USB needless The second method erases the complete flash content including valuable manufacturing data like the MAC address and requires an access to the ERASE pin which is only given on USB sticks and OEM radio modules with CORTEX M3 controller Attention All software stacks and stack extensions of dresden elektronik require the manufacturing data to be correct Otherwise the firmware will stop with an alert Note I
28. ce signature Ox1EA701 Memories JTAG id 0x0A70103F Fuses Revision A Lock bits Datasheet Information Production file ATmegai28RFA1 CPU 8 bit AVR Flash size 128 Kbytes EEPROM size 4 Kbytes SRAM size 16 Kbytes VCC range 1 8 3 6 V Maximum speed N A External links Copy to dipboard Device Information dk Datasheets K Getting tool info OK Getting tool info OK Close www dresden elektronik de Page 38 of 61 User Manual Version 1 5 i N S Software Programming e 7 6 3 Update firmware The next step is the update process Go to the entry memories and define the new firmware file for the internal flash and press on button PROGRAM It is useful to activate the checkboxes Erase device and Verify Flash before programming After the programming process a positive result shows that the erasing programming and verifying of the flash are OK Figure 43 Note To correctly flash a new firmware the device needs to be erased first The ATMEL Studio 6 does this automatically if the Erase device check box is active Attention A device erase for an AVR does erase the internals flash AND the internal EEPROM The EEPROM stores valuable manufacturing data such as the devices MAC address To prevent the erasure of the EEPROM content the fuse EESAVE must be active We therefore recommend checking the fuse settings before any firmware update Figure 43 Studio 6 Device Programming AVR Dra
29. cted at first The application must be in binary format as SAM BA only accepts this type of file Select the firmware file via the Send File Name browse button and press SEND FILE After file transfer SAM BA will ask for locking the flash This is not necessary it can be omitted by pressing No Figure 62 Figure 62 Lock regions ing Lock region s Do you want to lock involved lock region s 0 to 6 ves Lock it After the firmware update the deRFusb stick is still in SAM BA mode This needs to be changed to let the microcontroller start from internal flash by executing the script Boot from Flash GPNVM1 from the drop down box Select the script and press Execute Now the update is finished Close SAM BA and unplug the USB stick After power on reset the new firmware will be executed 9 4 Firmware update via USB Most deRFusb sticks are delivered with preinstalled firmware not offering any software defined way to return to the SAM BA boot loader As all deRFusb sticks are equipped by default with the 10 pin JTAG header a firmware update via USB is not required All deRFusb sticks without JTAG header come without any preinstalled firmware and SAM BA boot loader activated The customer can ONCE flash a custom application and must ensure that this custom application is able to reactivate the SAM BA boot loader mode if further firmware updates are required Note ALWAYS include into your application a
30. d in Section 7 5 www dresden elektronik de Page 11 of 61 User Manual Version 1 5 ee Software Programming 2 5 SAM BA 2 12 SAM BA is an official Atmel in system programming tg tool for ARM microcontrollers by Atmel LD SAM BA 2 12 Programming tool SAM BA Copyright Atmel Corporation 2012 Version 2 12 Tested with programmers SAM ICE Supported device targets ARM7 and CORTEX M3 radio modules Tested on OS WinXP 32 Bit Download http www Atmel com tools AtmelSAM BAIN SYSTEMPROGRAMMER aspx Setup and Start Execute the file sam ba_2 12 exe and confirm the license agreement Choose the install destination of SAM BA and connect the preferred programmer to the USB port After completion of the setup start the application 2 6 JLinkCommander The JLinkCommander is a console based programming tool for ARM microcontrollers It is especially useful for automated firmware updates with h fil i S EGGER batch files SEGGER SEGGER J Flash ARM V4 60a l l Compiled 17 16 06 on Jan 16 2013 Programming tool JLinkARM V 4 60 c 1998 2013 i SEGGER Mi troller GmbH amp Co KG Version SAM ICE ep Tested with programmers ARM7 and CORTEX M3 Supported device targets radio modules Tested on OS WinXP 32 bit Download http www segger com jlink htmi Setup and Start Execute the file Setup JLINkARM V460a exe and confirm the license agreement Choose the install destination of JLinkARM and connect
31. d to the PC and the libusb win32 devel filter X X X x exe install process is finished a filter installer dialog as illustrated in Figure 6 will appear Figure 6 libusb win32 filter libusb win37 filter installer Information This program adds removes libusb win32 as a driver to an existing device installation The libusb win32 filter driver allows access to usb devices using the libusb win32 api while maintaining compatibility with software which uses the original driver Install Remove Device Filter s Install a device filter O Remove a device filter O Remove all device filters Cancel Select the AVRDRAGON and the button Install will create the USB filter driver Figure 7 Figure 7 Select device libusb win32 filter installer Device Selection Connect your device and select it from the list of unfiltered devices below If your device isn t listed it may already be filtered be in a driverless state or incompatible with the libusb win32 filter driver Hardware ID Description vid Oe0F pid 0003 rev 0101 mi 01 USB Human Interface Device vid Det pid 0003 rev 0101 mi 00 USB Human Interface Device id Det pid 0003 rev 0101 USB Composite Device vid 03eb pid 2107 rev 0100 AVR Dragon Now the AVRDRAGON will be displayed correctly in the system device manager and can be used with AVRdude and an AVR tools installation like AVR Studio A radio module firmware programming example is describe
32. den elektronik de Page 15 of 61 User Manual Version 1 5 ee Software Programming 4 3 JTAG 20 pin A 20 pin 100 mil JTAG interface Figure 10 20 pin JTAG connector is often used for ARM g P microcontrollers The signal VGC VCC description is shown in Figure 10 4 e gt lt w EH Pin 1 VCC Pin 2 VCC a st ae Pin 3 n c Pin 4 GND TOK 4 Bu Pin 5 TDI Pin 6 GND d 2 WT Pin 7 TMS Pin 8 GND eg ger Pin 9 TCK Pin 10 GND Z e e Pin 11 GND Pin 12 GND ER e gt Pin 13 TDO Pin 14 GND ele S Pin 15 RESET Pin 16 GND GND Pin 17 n c Pin 18 GND Pin 19 n c Pin 20 GND Note depending on the programmer it is necessary to place pull up resistors to VCC on the signals RESET TDI TMS and TCK We recommend 100 k ohms The 20 pin header programmer is supported for example by e SAM ICE by SEGGER e ARM JTAG by OLIMEX e ICprog OpenOCD by In Circuit 44 ISP 6 pin For serial programming interfaces of AVR microcontrollers a 6 pin 100 mil header is often used The signal Figure 11 6 pin ISP description is shown in Figure 11 PDO Pin 1 PDO Pin 2 VCC SOK i Pin 3 SCK Pin 4 PDI RSTN Pin 5 RESET Pin 6 GND The 6 pin header programmer is supported for example by e AVRISP by Atmel e AVRDRAGON by Atmel www dresden elektronik de Page 16 of 61 User Manual Version 1 5 ee Software Programming 4 5 JTAG Adapter The JTAG Adapter works in connection with JTAGICE
33. diately Tip To auto connect to the programmer used last time press the Programmer button on the toolbar Note that a tool cannot be used for programming as long as it is connected in a debugging session In that case select Stop Debugging first Disconnected Mode 7 7 2 Define microcontroller and programming mode At first define the correct microcontroller In this example the ATMEGA128RFA1 must be chosen Check if the ISP mode is active The default ISP frequency is 125 kHz Press on READ SIGNATURE to check if the chip ID matches the selected device Figure 45 In the case of an error check if the selected device is correctly defined and if the used hardware setup is OK The main power supply must be switch on Figure 45 Choose device programming mode and ID read out AVRISP mkll in ISP mode with ATmegal 28RFA1 Main Program Fuses LockBits Advanced Hw Settings HW Info Auto Device and Signature Bytes ATmega1 28RFA1 v Delt Gei Ox01 Signature matches selected device Programming Mode and Target Settings ISP Frequency 125 0 kHz Setting mode and device parameters OK Entering programming mode OK Reading signature from device Ox1E 0247 0x07 OK Leaving programming mode OK Note The ISP frequency must always be below 1 4 of the microcontroller clock speed Therefore 125 kHz is the best choice for many fuse settings as it will operate with microcontroller clock speeds of
34. dresden elektronik e User Manual Software Programming For Radio Modules and USB Sticks by dresden elektronik Document Version V1 5 2013 08 21 User Manual Version 1 5 ee Software Programming Table of contents 1 0 VE E E E EREE EAEE EAEE EaR 6 Pod O0 EE 6 ER NE 6 AE tele EE 7 ZOU Io HNO EEE 7 TP el re 8 2 4 1 Using AVRdude without AVR Studio Stand alone rrrnnrrnnnrrrnnnnrnnnrrennnrr 8 2 4 2 Using AVRdude together with AVR Studio rrrarrrrarernnrrvnnrrrnnernnrernnennnnennn 11 EE E E 12 2 Oc ll gelunn TE 12 E RE 13 Bregen 13 NR E LE E 13 PINE 14 SE E ora iais Seea aE E E E E EE EEEE E NE tas 14 TE 14 3 35 OpenOCD based DIOGrAMIMECNS Lursssanemsuemuseisvamminnnemanneseimdnd 14 Electrical programmer Copnnechons 14 EE D EE EE EN 15 ET ENE ON E 15 EEE EEE onelaciatis genes tpnaste N E 16 IP 16 E ME Ee EE NE NN eee 17 AO SANE AN Tenne 17 SEENEN 17 Keier and er o e ME 18 LNR 18 5 2 Platforms by dresden elekironik 19 www dresden elektronik de Page 2 of 61 User Manual ae Software Programming SEN RI 22 6 1 AT91 USB to Serial Converter rrrrnrrnnnnrrnnnnervnnrevnnnerrnnrernnnernanennnnnennasennnssennnsennnn 22 6 1 1 Driver Installation in Windows Ab 22 6 1 2 Driver Installation in Windows Vista and 25 6 2 J Link Driver for SEGGER SAM ICE eisen enden neen Eege 29 6 3 Jungo USB Driver for AVR programmer 29 6 4 Drivers and configuration of OpenOGCD Programme
35. e in Other devices Figure 24 Figure 24 Driver not found in Device Manager Z Device Manager L la ks File Action View Help e 9 5 8 S a g WIN TVMTPE7SK6R E Batteries cb Computer Ca Disk drives B Display adapters vg DVD CD ROM drives g Floppy disk drives Floppy drive controllers Og Human Interface Devices cg IDE ATA ATAPI controllers Sr Junge Keyboards D Mice and other pointing devices Monitors Kr Nebwork adanters a gt Other devices e Unknown device p OM amp LPT DI Processors Sound video and game controllers lt gt Storage controllers cb System devices Universal Serial Bus controllers Select the Unknown device open the context menu with a right mouse click Select Update Driver Software in the menu Figure 25 Figure 25 Update Driver Software Sr Network adapters 4 5 Other devices fy Unknown de 7 Ports COM amp L Update Driver Software D Processors Disable 3 Sound video an Uninstall lt gt Storage controll EE System devices Scan for hardware changes Universal Serial Properti AA S Now choose Browse my computer for driver software on the next dialog Figure 26 Figure 26 Browse computer for driver software D Update Driver Software Unknown Device How do you want to search for driver software gt Search automatically for updated driver software Windows will search your compu
36. e programming tool and quit the start up screen Select TOOLS gt PROGRAM AVR and press on CONNECT Figure 34 www dresden elektronik de Page 32 of 61 User Manual Version 1 5 ee Software Programming Select the used programmer platform and the connection port In this example an AVRDRAGON via USB is used Press on CONNECT Figure 35 Figure 35 AVR Studio 4 19 Programmer selection Select AVR Programmer Platform AVR ONE STKE00 QT600 AVRISP mkll STK500 Tip To auto connect to the programmer used last time press the Programmer Port C Baud rate Baud rate changes are _ active immediately button on the toolbar Note that a tool cannot be used for programming as long as it is connected in a debugging session In that case select Stop Debugging first Disconnected Mode The new window Figure 37 offers a lot of program and setup functions for the used device Main microcontroller and programming mode selection Program Update the internal flash or EEPROM Alternatively use the ELF production file format Fuses set the fuses see Section 7 8 Lock Bits use lock bits to enable a write and read write protection for the Boot Program section and Application Program Section of the internal Program Flash Memory see Section 7 9 Advanced Set the value of the Oscillator Calibration Byte HW Seitings Read out the target voltage achieve a programmer
37. ear GPNVM openocd 0 6 1 exe f scripts interface icprog openocd cfg f a SCripts target atolsam x512 cfg 0 arm gt Last memory access enable 0 arm 9 dec downloads enable d0 0 tip soit reset halt c at9lsam gpnvm 2 clear c reset run c shutdown The command output while executing the above command is shown in Figure 54 Figure 54 OpenOCD Clear GPNVM bit cv C WINDOWS system3 cmd exe SET 6 1iNbin gt openocd 6 1 exe f N scripts interface icprog _openocd g N scripts target at isam x512 cfg c arm _9 fast_memory_ access enable c arm 9 dec downloads ena eves SCH init c soft reset halt c at9isam gpnum 2 clear c reset run c shutdow pen On Chip Debugger 0 6 1 2612 16 67 18 34 gt icensed under GNU GPL v2 or bug reports read http openocd sourceforge net doc doxygen bugs html hutdown command invoke Nopenocd 6 1Nbin gt Note To start an application from internal flash for example after a firmware update the GPNVM bit must be set to 1 8 8 2 Flashing deRFsam3 radio module This example uses the same setup like before but now with the configuration for the AT91SAM3 microcontroller Type in the following commands without line break and confirm with lt ENTER gt Write the image openocd 0 6 1 exe f scripts interface icprog openocd cfg f N VscriptsytargetlVat9lsam3sXX cfg 00 InIT c he l
38. either connect it or just click Nest and enter your device description manually Vendor ID Product ID Description Ox0E OF 00003 USB Composite Device Ox0E OF 0x0002 Generic USB Hub Ox2107 AVRDRAGON The device inf file named avrdragon will be created in the following path Figure 3 Figure 3 inf file creation Savein O bin A avrisp2 jtagice2 My Recent Documents ter File name SE a Save as type mt My Network www dresden elektronik de Page 9 of 61 User Manual Version 1 5 ee Software Programming After the wizard is finished the programmer can be installed Update the programmer driver in the windows device manager and choose the created inf file avrdragon Figure 4 Figure 4 inf file path Found New Hardware Wizard Please choose your search and installation options ate Y Search for the best driver in these locations Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed C Search removable media floppy CD ROM Include this location in the search C WindVR 201001 1 O utils libusb bin Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware The AVRDRAGON m
39. f you erased the manufacturing information by accident you can refer to the application node for dresden elektronik manufacturing data Fehler Verweisquelle konnte nicht gefunden werden to restore the data manually The following example describes the flashing of a generated binary firmware file into the flash of a deRFsam3 radio module The electrical connection requirements for USB are listed in Section 4 7 8 9 1 Preparation Connect the device target to the host The device manager should show an entry like in Figure 55 The Atmel boot loader starts and the device register itself as AT91 USB to Serial Converter The COM port will be assigned automatically by the host in this example COMS www dresden elektronik de Page 52 of 61 User Manual Version 1 5 i ee Software Programming Figure 55 Atmel boot loader announcement Device Manager E GIK File Action View Help HS Gm 3 Se a ADMIN 2347F2CF8 w Batteries d Computer Disk drives id Display adapters DYD CD ROM drives 4 Floppy disk controllers J Floppy disk drives gy Human Interface Devices 1 IDE ATA ATAPI controllers Keyboards Mice and other pointing devices B Network adapters Y Ports COM amp LPT 4791 USB to Serial Converter COM3 EI Communications Port COM1 EI Communications Port COM2 3 Printer Port LPT1 SB Processors d SCSI and RAID controllers 9 Sound video and game controllers System de
40. g the internal memory Attention The following settings can affect that the device target memory is never again readable or programmable If memory protection is required set the lock bits always after the final firmware programming process Figure 48 Lock bits setting AVR Dragon in JTAG mode with ATmegal 28RFA1 Main Program Fuses LockBits Advanced Hw Settings Hw Info Auto Fuse Value LB No memory lock features enabled BLBO No lock on SPM and LPM in Application Section BLB1 No lock on SPM and LPM in Boot Section LOCKBIT Auto read Lockbits not read To clear lockbits use Erase Device on Main tab Smart warnings M Verify after programming Setting device parameters OK Entering programming mode OK Reading lockbits OxFF OK Leaving programming mode OK The default values of the lock bits and lock byte are listed in Table 4 and Table 5 Table 4 Lock fuses Fuse Default Setting LB No memory lock features enabled BLBO No lock on SPM and LPM in Application Section BLB1 No lock on SPM and LPM in Boot Section Table 5 Lock bits www dresden elektronik de Page 44 of 61 User Manual Version 1 5 i N S Software Programming e 8 ARM radio modules This section describes programming of ARM radio modules by dresden elektronik The update process will be demonstrated on one example and is valid for all supported programmers and radio modules 8 1 Supported ARM radio module
41. gon 004200006766 Device Programming Tool Device Interface Device signature Target Voltage AVR Dragon v ATmegal28RFAL v JTAG w 0x1EA701 Read 3 2v read Interface settings Device x S i Ki E TEE Erase Chip Erase now Flash 128KB C Documents and Settings Administrator Desktop Application hex Y Erase device before programming v verify Flash after programming EEPROM 4KB V verify EEPROM after programming Erasing device OK Programming Flash OK Verifying Flash OK Verifying Flash OK 7 7 Firmware update via ISP using AVR Studio 4 19 7 7 1 Start programming tool This section shows a firmware update of an AVR radio module with AVR Studio 4 19 The programmer is an AVRISPmMkII connected to a custom platform with the required connection shown in Section 4 4 At first follow the preparation on Section 7 3 Start the programming tool and quit the start up screen Select TOOLS gt PROGRAM AVR and press on CONNECT Select the used programmer platform and the connection port In this example an AVRISPmkll via USB is used Press on CONNECT Figure 44 www dresden elektronik de Page 39 of 61 User Manual Version 1 5 ee Software Programming Figure 44 Select AVR programmer Connect failed Select AVR Programmer Platform STK600 Connect QOT600 STK500 JTAGICE mkll AVR Dragon AVRISP M Baud rate Baud rate changes are active imme
42. ings are listed in Table 2 A detailed description is available in the microcontroller datasheet 1 Table 2 Recommended fuse setting Fuses Recommended Desorption BODLEVEL VCC 1 8 V Brown Out trigger level gt defined MCU reset behavior on low supply voltage event like an empty battery EESAVE Preserve EEPROM through chip erase cycle inng 1 vr mr ope BOOTSZ Boot flash size 4096 Select boot size words start address F000 Select clock source and start up time www dresden elektronik de Page 42 of 61 User Manual Version 1 5 i N S Software Programming e The fuses listed in Table 2 are mapped into three fuse bytes Table 3 The description of the fuse bytes are shown in the microcontroller datasheet 1 They were used in console based programming tools like AVRdude to set the fuses Table 3 Extend fuse bytes EXTENDED Extended fuse byte Attention Deactivating the JTAGEN and SPIEN fuse will affect that no firmware re programming is possible via JTAG or ISP interface This fact is valid for all evaluation radio modules by dresden elektronik OEM radio modules have a dedicated TST pin available which allows performing a firmware update via High Voltage Programming Mode www dresden elektronik de Page 43 of 61 User Manual Version 1 5 ee Software Programming 7 9 Lock Bits The lock bits of a microcontroller allow the customer to protect the radio module against reading and or writin
43. is done automatically Note Writing the flash does not destroy the manufacturing data block at the uppermost flash section as long as the flash image does not use this particular section e g is one flash page often 256 bytes smaller than the size of the internal flash 8 8 1 Flashing deRFarm7 radio module This example uses the OpenOCD version 0 6 1 and the ICprog OpenOCD programmer Therefore a configuration file must be generated see Section 6 4 In general the firmware update needs only two steps the first step is writing the image to the microcontroller s internal flash and the second step is setting the GPNVM bit to start the application out of the flash after power on reset Type in the following commands without line break and confirm with lt ENTER gt Write the image openocd 0 6 1 exe f scripts interface icprog openocd cfg f scripts target at9lsam 7x512 cfg arm 9 1880 memory access enable 6 arm 9 dec downloads enable JO 0 Init 0 SOEU FEL Nali o halt 100 c flash write bank 0 C application bin 0 c reset run c shutdown Executing the command starts the update process Figure 52 www dresden elektronik de Page 49 of 61 User Manual Version 1 5 ee Software Programming Figure 52 OpenOCD Write image ca C WINDOWS system3 cmd exe Nopenocd 6 1iNbin gt openocd 6 1 exe f scripts interface icprog_openocd g f
44. ktronik de Page 27 of 61 User Manual Version 1 5 GC Software Programming Figure 29 Continue with Next Update Driver Software Unknown Device Browse for driver software on your computer Search for driver software in this location C Program Files x86 ATMEL Corporation sam ba_2 11 drv VW Include subfolders gt Let me pick from a list of device drivers on my computer This list will show installed driver software compatible with the device and all driver software in the same category as the device Cancel lf a Windows Security message pops up choose Install this driver software anyway Figure 30 Figure 30 Choose Install this driver software anyway a L Windows Security m amp Windows can t verify the publisher of this driver software amp gt Don t install this driver software You should check your manufacturer s website for updated driver software for your device Install this driver software anyway i Only install driver software obtained from your manufacturer s website or disc Unsigned software from other sources may harm your computer or steal information i v See details You will see the installation progress Close the wizard after the installation is finished by pressing Close Figure 31 Figure 31 Successful installation of the driver se NG 1 Update Driver Software AT91 USB to Serial Converter COM3 Windows ha
45. mkIl programmer by Atmel The programmer has a 30 pin flat cable with a default 10 pin 100 mil adapter The default CG adapter must be replaced by the dresden elektronik JTAG adapter The flat cable is mechanically fixed in the 30 pin socket and can be manually unlocked Further information https shop dresden elektronik de accessories adapter jtag adapter html 4 6 SAM ICE Adapter The SAM ICE Adapter is useful in connection with the SAM ICE programmer via the 20 pin 100 mil socket and the programming of USB stick device targets by dresden elektronik The small 10 pin 50 mil JTAG connector features additionally two UART signals RXD and TXD see Section 4 2 which can be tapped on the 6 pin 100 mil header For direct connection to a host PC or laptop an assembled level shifter circuit is available with a suitable 9 pin Sub D socket Alternatively a custom level shifter can be connected to the 6 pin header Further information https shop dresden elektronik de accessories adapter sam ice adapter html 4 7 USB interface The Atmel ARM7 and CORTEX M3 microcontroller have an internal native USB controller They still need external components for proper functionality Figure 12 shows a schematic part from a native USB interface Beside a USB header an and optional diode array for line protection the necessary parts are the 1k5 pull up resistor R30 on USBDP the 330k pull down resistors R35 and R36 o
46. mmer id gt The lt programmer id gt identifies the selected programmer U lt mem gt lt op gt lt file gt lt format gt lt op gt down upload or verify the lt file gt to the specified memory lt mem gt location All the parameters could be hand over in one single line as demonstrated in the example below Using this line will program all dresden elektronik deRFmega128 radio modules with the Atmel AVRDRAGON programmer Figure 39 Type in the following commands without line break and confirm with lt ENTER gt avrdude exe p ml28rfal P usb 6 dragon Jtag U flash w application hex The firmware file application hex is located in the root directory where AVRdude is executed Note To correctly flash a new firmware the device needs to be erased first AVRdude does this automatically Attention A device erase for an AVR does erase the internals flash AND the internal EEPROM The EEPROM stores valuable manufacturing data such as the devices MAC address To prevent the erasure of the EEPROM content the fuse EESAVE must be active We therefore recommend checking the fuse settings before any firmware update www dresden elektronik de Page 36 of 61 User Manual Version 1 5 ee Software Programming Figure 39 Firmware update via AVRdude ca C WINDOWS system32 cmd exe WinAUR 26166116 bin gt avrdude exe p mi28rfai U P usb c dragon_jtag U flas zw application hex vpdude exe jt
47. n USBDP and USBDM and the low pass network on USBDP and USBDM consisting of 27R resistors R31 and R82 and 15pF capacitors C28 and C29 www dresden elektronik de Page 17 of 61 User Manual Version 1 5 ee Software Programming Figure 12 Native USB external components VBUS DGND R30 VRUS 1K50 Cog T 15pF VBUS ESCH ZS P ee fast USBDP ET EG di R36 C29 d eet 330k A Set 75 E Zs ZS si ZS E DGND DGND DGND ENAR APA DGND CH 5 h NYTT lte an ch 5 Platform and Baseboard The used radio module must be plugged or soldered to an appropriate platform or baseboard In most cases this platform is a custom one Section 5 1 includes the minimum requirements to establish a programming connection Development platforms by dresden elektronik Section 5 2 fulfill all requirements to update the firmware of the evaluation radio modules 5 1 Custom platforms A custom platform needs the following minimum hardware requirements to establish a connection to the programmer The header connection depends on the used programmer Refer to Section 3 for recommended programmers AVR radio modules e 10 pin header for JTAG with correct signal configuration see Section 4 1 or e 6 pin header for ISP with correct signal configuration see Section 4 4 ARM7 and CORTEX M3 radio modules e 20 pin header for JTAG with correct signal configuration see Section 4 3
48. ntroller a microcontroller specific programmer and programming tool are required 2 Programming tools For AVR and ARM architectures freeware tools but also licensed development environments IDE and tools exist on the market Often the microcontroller manufacturer offers own programming tools and programmers The features and the usability of those tools may vary vastly The customer can choose the tool that fulfills the requirements for prize performance stability and usability best The programming tools described in this manual are all freeware but may require a registration for download 2 1 AVR Studio 4 19 The main version is obsolete but still prevailed in the Hiis AVR community The AVR Studio 4 was replaced by AVR Studio 5 and as well as Atmel Studio 6 which is the actual programming tool for AVR and ARM microcontrollers by Atmel Copyright 1996 2011 Visit Atmel AVR site Version 4 19 Support mail ayr atmel com Programming tool AVR Studio 4 Version 4 19 Tested with programmers JTAGICEmkII AVRDRAGON AVRISPmkll Supported device targets AVR radio modules Tested on OS WinXP 32 bit Win7 32 bit www dresden elektronik de Page 6 of 61 User Manual Version 1 5 i N S Software Programming e Download http www Atmel com tools AVRSTUDIO4 aspx Registration necessary Setup and Start Execute the file AvrStudio419Setup exe and confirm the license agreement Choose the install destin
49. o USB driver manually Refer to the following Atmel support request http support Atmel com bin customer exe amp action viewKbEnitry amp id 1343 The install file wdreg exe must be executed in a command window with the extension wdreg exe log Atmelusb log inf windrvr6 inf install www dresden elektronik de Page 7 of 61 User Manual Version 1 5 i N S Software Programming e Note In the most cases the used programmer needs a firmware upgrade This will be done automatically by Atmel Studio 6 If a programmer communication error occurs it is also possible to do a manual firmware upgrade of the programmer Execute the file avrfwupgrade exe in the install directory Atmel Atmel Studio 6 0 extensions Utils bin Type the command below to get the syntax information avrfwupgrade exe h 2 4 AVRdude Programming tool AV Rdude Version 5 10 Tested with programmers AVRDRAGON Supported device targets AVR based radio modules Tested on OS WinXP 32Bit Download http savannah nongnu org projects avrdude http winavr sourceforge net Setup and Start The AVRdude is either available in source code which must compiled before usage see first download link but also available as binary as part of the WinAVR package WinAVR is a compiler collection for AVR controller The AVRdude does not need an installation as it is a single executable used via command line Using the AVRdude beside an already inst
50. on the target 8 7 Firmware Update via JTAG using JLink Commander The following procedure describes the flashing of a generated binary firmware file into the deRFsam3 radio module Follow the preparation steps in Section 8 5 8 7 1 Start programming tool At first start JLink exe console window will open and the JLink Commander automatically searches the SAM ICE programmer and identifies the connected microcontroller Figure 51 www dresden elektronik de Page 47 of 61 User Manual Version 1 5 i N S Software Programming e Figure 51 JLink Start up J J Link Commander EGGER J Link SEENEN U4 6 a for help 3 irmware J Link ARM U8 compiled Nov 14 2012 22 34 52 ardware UH Du N EM SAM IGE eature s gt RDI Target 3 2740 Info TotalIRLen 4 IRPrint x 1 Info Found Gortex M3 r2p Little endian Info TPIU fitted G devi tal IRLen 4 77 IRLen HA IRPrint xi CoreSight JTAG DP lt ARM gt ortex M3 identif ie TAG speed 1 kHz Link gt 8 7 2 Update procedure Type in the commands of Table 6 and execute each of them with lt ENTER gt Table 6 Update command procedure Reset the target SS 5 EE 3 Speed 1000 Set the JTAG speed to 1000 kHz exec Device AT91SAM3S4A Selects the device target microcontroller Halt the ARM core KAL ER loadbin C application bin 0x00000000 Load binary file into target memory Now the binary is flashed into the microcontrolle
51. onnect button SAM BA now tries to connect to the USB stick This can take some seconds Finally a dialog window opens giving access to all the memories of the microcontroller Figure 61 Figure 61 SAM BA GUI ind SAM BA 2 12 at91sam3s4 ek Belt File Script File Help l l at91sam3s4 Memory Display Start Address 0x20000000 Refresh Disney farmat Applet traces on DBGU pm ii bi bi bi linfos D Appl Size in byte s 0x100 C asii 8 bit 16 bit Ze 32 bit pply 0x20000000 0x20000010 0x20000020 0x20000030 0x20000040 0x00000064 0x20000018 Ox2000036C 0x00000000 0x00000000 Flash NandFlash SRAM Download Upload File Send File Name Receive File Name Address 0x400000 Scripts 0x01010114 0x00000000 0x200003D4 0x00000000 0x00000000 Size For Receive File 0x1000 Ox00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x00418300 0x20000304 0x00000000 0x00000000 0x00418408 SI SI i byte s Boot From Flash GPNYM1 Execute Compare sent file with memory A loading history file 0 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 sam ba 2 12 1 sam ba 2 12 1 www dresden elektronik de link ARMO Board at91sam3s4 ek Page 56 of 61 User Manual Version 1 5 i N S Software Programming e 9 3 2 Transferring firmware To transfer a new firmware to the USB stick the application binary file has to be sele
52. ot delivered with OpenOCD because of licensing issues Instead the libusb win32 should be used Install the drivers for the programmer For example the ICprog Open OCD programmer needs the libusb win32_ft2232_ driver In case of doubt use the manufacturer s drivers If an error occurs install the libusb filter driver See Section 2 4 2 for further information After proper driver installation the device manager should display entries for libusb win32 devices Figure 33 shows the entries for the ICprog Open OCD programmer Do not wondering about the two entries they are generated by the used programmer www dresden elektronik de Page 29 of 61 User Manual Version 1 5 ee Software Programming Figure 33 Libusb Win32 Device entries for ICprog Open OCD programmer Device Manager ia BIK File Action View Help D ere GR A E ADMIN 2347F2CF8 Ia Batteries d Computer sa Disk drives EI Display adapters 5 DVD CD ROM drives 4 Floppy disk controllers H Floppy disk drives gy Human Interface Devices 4 IDE ATA ATAPI controllers 5 Keyboards libusb win32 devices amp Dual R5232 Interface 0 Interface 0 dg Dual R5232 Interface 1 Interface 1 Mice and other pointing devices B Network adapters Y Ports COM amp LPT SB Processors amp SCSI and RAID controllers 6 Sound video and game controllers r System devices Universal Serial Bus controllers Besides the
53. ow are tested used and recommended by dresden elektronik dresden elektronik does not provide or sell any of the listed programmers Please refer to your local distributor for electrical components 3 1 AVRDRAGON The AVRDRAGON is a simple low cost programmer by Atmel It has a native USB interface and supports JTAG ISP and _ High Voltage Parallel programming Comprehensive information can be found in the web Default interfaces JTAG 10 Pin see Section 4 1 and ISP 6 Pin see Section 4 4 The official site is http Awww atmel com tools avrdragon aspx 1 Recommended version www dresden elektronik de Page 13 of 61 User Manual Version 1 5 i N S Software Programming e 3 2 JTAGICEmkII The AVR JTAGICEmMKII is a mid range programmer tool for Atmel AVR devices with on chip debugging tracing and device programming capabilities Default interface JTAG 10 Pin see Section 4 1 The official site is http www atmel com tools AVRJTAGICGEMKILaspx A JTAGIGCEmMKII target cable matching adapter for small 1 27mm pin header JTAG interfaces is available from dresden elektronik online store as accessories 3 3 AVRISP The AVRISP can program 8 Bit AVR microcontrollers with ISP or PDI interfaces Default interface ISP 6 Pin see Section 4 4 The official site is http www atmel com tools AVRISPMKII aspx 3 4 SAM ICE The SAM ICE is a JTAG programmer designed for Atmel SAM3 and SAM7 ARM based microcontrollers It only suppor
54. pt Boot from Flash GPNVM1 must be executed This will result in the GPNVM Bit is set to 1 Figure 50 The target device will now start out of the internal flash memory after a power on reset Otherwise the microcontroller will start the internal ROM boot loader again after a power on reset and the programmed firmware will not be run Figure 50 SAM BA update ks SAM BA 2 12 at91sam3s4 ek File Script File Help at91sam3s4 Memory Display Start Address Dx20000000 Refresh ener oe pre Secs ee Size in byte s 0x100 C ascii Sbt 16 bit Je 32 bit infos 7 apply 0x20000000 0x00000064 0x01010114 0x00000001 0x00418300 0x20000010 0x20000018 Ox00000000 Ox00000000 0x20000304 0x20000020 0x2000036C 0x200003D4 O0x00000000 0x00000000 0x20000030 0x00000000 Ox00000000 Ox00000000 0x00000000 0x20000040 0x00000000 Ox00000000 Ox00000000 0x00418408 7 Flash NandFlash SRAM Download Upload File Send File Name C application bin Send File Receive File Name Receive File Address 0x400000 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Boot from Flash GPNYM1 F Execute 0x9400 bytes written by applet Writing Ox66E8 bytes at 0x12800 buffer addr 0x20002750 0x66E8 bytes written by applet Do not lock sam ba 2 12 1 FLASH ScriptGPNMV 2 I GPNYMI set sam ba 2 12 1 jlink ARMO Board ataisam3s4 ek w Close the SAM BA tool and perform a power cycle
55. r 29 n AVR radio MOdUleS re 30 71 SUDDONEO AVR radio ue le EN 7 2 Required hardware and electrical connechons 32 Preparation for Pod EE 32 7 4 Firmware update via JTAG using AVR Studio A 32 74212 Start programming 100 EE 32 7 4 2 Define microcontroller ccc cece cecceccceeceeeceecaeeceeceeeceecaeecuesaeeceeseeseesaeesaes 34 7 4 3 Update Trmmware 35 7 5 Firmware update via JTAG using AVRdude rrrnnnvnnnnnvnnnrennnnrnnnrrennnrennnrrrrnnrennnerennn 35 7 6 Firmware update via JTAG using Atmel SGtudop cc ceccceeececeeeeeeeeeeeeeeesaeeeeeees 37 TOLL SEP MING 100 ae eserracesenese xen Er Tenera 37 7 6 2 Define tool device and mtertace cc cececeececeececeeeececeeeececeeeeeeeeeeeseeenaenes 38 16 EN 39 7 7 Firmware update via ISP using AVR Studio A 19 39 ee AE le d PhO Me MMIC TOO REE EEE ENE 39 7 2 Define microcontroller and programming mode 40 The Update EEE 41 TT vr 42 UK 44 8 ARM radio Be e ENT 45 8 1 Supported ARM radio modules rrranrnnnnnvanrnrnnnvnnrnranrnnnnnnnnnnnanennrnnanennnsnnanennnnennnen 45 VIN eee eee ee E eee res 45 EG TD E 45 8 4 Required Hardware and electrical CONNECTIONS ccccecccececececeeeceeeceeeseeseeeseeeees 46 8 5 Preparation for programming cccccceecceeeceeeeeeeeeeceeeseeeseeeseeeseeeseeeseeesseeseeeneeeneeenes 46 8 6 Firmware update via JTAG using GAMPBA 46 www dresden elektronik de Page 3 of 61 User Manual ee Software Programming 8 6 1 Start programming Tool
56. r and the application is running The syntax of the used commands of JLINK exe is described in the flashing tool Note You can automate those steps with scripts as the JLink Commander can be called with a script execution command line option The script syntax is the same as for the command line For detailed information please refer to Segger user manuals and support documentation www dresden elektronik de Page 48 of 61 User Manual Version 1 5 i N S Software Programming e 8 8 Firmware Update via JTAG using OpenOCD OpenOCD can be used in different ways This example describes the command line version It is also possible to put the command sequences into batch files or a makefile Invoking OpenOCD requires that two different configuration files are given one for the target platform and another one for the programming interface That is the reason why handling ARM7 and SAMS differs slightly In addition performing the same action i e flash writing requires command sequences individual for the target platform OpenOCD exe shall be in the path If you experience errors when accessing the target device try to reduce the JTAG clock speed at first and double check the wiring Note Besides flashing the microcontroller firmware OpenOCD might be used for setting and or clearing the GPNVM bit which tells the microcontroller to start from ROM or Flash Note There is no need to erase the MCUs flash before rewriting it This
57. rface the sticks must be connected via the small JTAG 10 pin header with a SAM ICE adapter by dresden elektronik Programming over USB requires only a common USB type A socket 9 3 Firmware update via JTAG The steps to update the firmware are equal for all Windows XP Vista and 7 Editions 9 3 1 Preparation for programming At first ensure that the required programming tool and all drivers are installed on your workstation Connect the preferred programmer to your workstation in the most cases via USB the programmers JTAG header to the adapter and the JTAG header of the adapter to the platform Ensure that the polarization is correct Refer to Figure 58 for an example Figure 58 USB dongle with attached SAM ICE and SAM ICE Adapter tO PC j SAM ICE SAM ICE Adapter www dresden elektronik de Page 55 of 61 User Manual Version 1 5 GC Software Programming Figure 59 Hardware setup block diagram Atmel SAM ICE PC USB Host JTAG 20 pin SAM ICE Adapter JTAG 10 pin deRFusb Start sam ba exe and select jlink ARMO as connection and choose rf231usb rd as board Figure 60 Figure 60 Choose board and connection Seles ang SAM BA 2 12 Select the connection hjlinkjARMO Select your board lat91sam3s4 ek JLink speed default ILink TimeoutMultiplier 0 Customize lowlevel Connect Exit Thereafter the connection can be established using the C
58. ripts interface icprog_openocd fg f scripts target at isam x512 cfg c arm 9 fast memory access enabl c arn 9 dee dovun loads enable d ze init c soft reset halt c at9isam gpnum 2 set c reset run c shutdow pen On Ghip Debugger 6 1 2612 16 Ers CH 34 icensed under GNU GPL v2 or bug reports read http openocd sourceforge net doc doxygen bugs html only one transport option autoselect jtag dapter speed 1606 kHz rst only srst pulls trst srst_gates_jtag srst_open_drain ast memory access is enabled cc downloads are enabled Info clock speed 1666 kHz Info JTAG tap sam x512 cpu tap device found x3f f f f lt mfg 6x787 part x fH ver x3 gt Info Embedded ICE version 1 Info sam x512 cpu hardware has 2 breakpoint watchpoint units equesting target halt and executing a soft reset arget state halted arget halted in ARM state due to debug request current mode Supervisor psr 6x 66606d3 pc BxB GBGGOG Info JTAG tap sam x512 cpu tap device found Ox3fBFHFBE lt mfg 6x787 part Bx OfO ver x3 gt hutdown command invoked Nopenocd 6 1Nbin gt vi If the device must be started in SAM BA mode the GPNVM bit has to be cleared The command output while executing the above command is shown in Figure 54 This is necessary for device firmware updates via USB interface www dresden elektronik de Page 50 of 61 User Manual Version 1 5 ee Software Programming Cl
59. s The supported ARM radio modules are based on two different microcontrollers At first the powerful AT91SAM7X512 ARM7 controller on evaluation radio modules and at last the low power ATSAM3S4 CORTEX M3 controller on OEM radio modules 8 2 ARM Evaluation Modules deRFarm7 25A00 deRFarm7 25A02 deRFarm7 15A02 8 3 CORTEX M3 OEM Modules deRFsam3 13M10 deRFsam3 23M10 2 deRFsam3 23M10 3 www dresden elektronik de Page 45 of 61 User Manual Version 1 5 ee Software Programming OEM Modules with adapter deRFsam3 131T02 deRFsam3 23102 2 deRFsam3 23102 3 8 4 Required Hardware and electrical connections A firmware update of an ARM7 or CORTEX M3 radio module by dresden elektronik needs a few requirements that must be fulfilled e anARMcompatible programming tool see Section 2 e the ARM programmer see Section 3 e an available electrical connection see Section 4 and e the platform see Section 5 8 5 Preparation for programming At first ensure that the required programming tool and all drivers are installed on your workstation Connect the platform or baseboard on which the ARM radio module is plugged or soldered to an appropriate power supply Now the preferred programmer must be connected to the workstation in the most cases via USB and the JTAG header on the platform Often the programmer connector or cable has a marking for pin 1 Ensure that the polarization is correct The
60. s successfully updated your driver software Windows has finished installing the driver software for this device AT91 USB to Serial Converter After a successful driver installation you will find an AT91 USB to Serial Converter in the Device Manager under the ports COM amp LPT Figure 32 www dresden elektronik de Page 28 of 61 User Manual Version 1 5 i N S Software Programming e Figure 32 Device displayed in the device manager a Y Ports COM amp LPT Tg AT91 USB to Serial Converter COMB 6 2 J Link Driver for SEGGER SAM ICE The ARM programmer SAM ICE by Segger needs the J Link driver Follow the install instructions for the JLink Commander in Section 2 6 The J Link drivers are included in the install package After connecting the programmer to the PC the SAM ICE will be automatically recognized as J Link device 6 3 Jungo USB Driver for AVR programmer The AVR programmers JTAGICEmkII AVRDRAGON and AVRISP need the Jungo USB driver which is included in the AVR tools packages like AVR Studio 4 or ATMEL Studio 6 Follow the instructions in Section 2 1 and or 2 3 The connected AVR programmer will be recognized and installed automatically 6 4 Drivers and configuration of OpenOCD Programmer Mostly the available programmers are based on FIDI RS232 USB adapters OpenOCD contains drivers for the most common programmers located in the directory driver The FTDI default drivers are n
61. software option accessible by some kind of standard communication to reactivate the SAM BA boot loader mode from your running application This would typically require changing the GPNVM1 bit to 0 As long as you experiment with this mechanism we recommend updating via the JTAG interface Attention Without this application option the following procedure is the only way to update the firmware of deRFusb sticks All the manufacture supplied data will get lost As the reactivation of the SAM BA boot loader mode is customer dependent it cannot be described here However with SAM BA mode activated follow Section 9 4 1 to execute the firmware update For absolute emergency situations the reactivation of the SAM BA boot loader mode without application support is described in Section 9 4 2 www dresden elektronik de Page 57 of 61 User Manual Version 1 5 i N S Software Programming e 9 4 1 Connecting SAM BA to the USB stick Start sam ba exe Select the COM port for the deRFusb stick to update It can be found in the Device Manager as described in the previous sections AS a second step select the platform which will be rf231usb rd Press Connect with connection and platform selected Figure 63 Figure 63 Connect to the deRFusb ling SAM BA 2 12 Select the connection husBserialcomd Select your board at91sam3s4 ek v link speed Josh a ILink TimeoutMultiplier ki Customize lowlevel Connect
62. ssful driver installation you will find the device under Ports COM amp LPT in the device manager Figure 22 Figure 22 Successfully installed device ll x File Action View Help DECHE Batteries d Computer amp Disk drives Display adapters DYDICD ROM drives 6 Floppy disk controllers H Floppy disk drives dg Human Interface Devices Sy IDE ATA ATAPI controllers gt Keyboards Mice and other pointing devices ES Network adapters Y Ports COM amp LPT EI AT91 USB to Serial Converter COM3 EI Communications Port COM1 Communications Port COM2 UY Printer Port LPT1 sl Processors SCSI and RAID controllers Sound video and game controllers System devices Universal Serial Bus controllers 0 4 eG Ja 4 8 2 08 6 1 2 Driver Installation in Windows Vista and 7 If you plug in the USB stick for the first time Windows will try to install any driver This will usually fail and produces the following message Figure 23 Figure 23 Driver not found in Win7 or Vista r J Device driver software was not successfully installed gt Click here for details 4 S E www dresden elektronik de Page 25 of 61 User Manual Version 1 5 GC Software Programming To install the correct driver please open the Device Manager which can be found under Control Panel gt System gt Device Manager Here you will find an Unknown devic
63. ter and the Internet for the latest driver software for your device unless you ve disabled this feature in your device installation settings gt DIQOVWSE ITV COIIDULE OI GIIVET SOILWAaIlEe Locate and install driver software manually www dresden elektronik de Page 26 of 61 User Manual Version 1 5 ee Software Programming Now click Browse and locate the directory of your SAM BA installation it can be usually found under Program Files This installation directory contains a sub directory drv Figure 27 Figure 27 Browse xa G Update Driver Software Unknown Device Browse for driver software on your computer Search for driver software in this location C Users user Documents v Browse V Include subfolders gt Let me pick from a list of device drivers on my computer This list will show installed driver software compatible with the device and all driver software in the same category as the device Select this directory and press OK This will return to the previous dialog Figure 28 Figure 28 Browse For Folder drv Browse For Folder Select the folder that contains drivers for your hardware Program Files x86 gt di Atmel 4 di ATMEL Corporation sam ba 2 11 gt m applets gt A doc DES gt A examples gt di tel lib Folder drv In the following dialog press Next to start the installation Figure 29 www dresden ele
64. terface is activated To start it unplug the USB stick from the USB port and plug it in again The PC will prompt for a driver on Windows XP or will fail to find a suitable driver for Windows Vista and 7 editions Depending on the operating system follow the steps described in Section 6 1 1 Windows XP or 6 1 2 Windows Vista and 7 editions Note If the USB stick comes with an enclosure remove it carefully with an appropriate tool e g a small screwdriver see Figure 65 Figure 65 Removal of the plastic enclosure 10 Manufacturing data The manufacturing data stored in the internal memories of dresden elektronik AVR and ARM based radio modules and USB sticks are described in the application note Non Volatile Memory of dresden elektronik Radio Modules and USB Sticks available from Fehler Verweisquelle konnte nicht gefunden werden www dresden elektronik de Page 59 of 61 User Manual Version 1 5 ee Software Programming 11 References 1 ATmega128RFA1 8 bit AVR Microcontroller with Low Power 2 4 GHz Transceiver for ZigBee and IEEE802 15 4 Datasheet URL http www atmel com 2 Non Volatile Memory of dresden elektronik Radio Modules and USB Sticks Application Note URL http www dresden elektronik de funktechnik wireless white papers elD dam_frontend_push amp doclID 2126 www dresden elektronik de Page 60 of 61 User Manual Version 1 5 e ee Software Programming dresden elektronik ingenieurtechnik
65. ts Atmel devices Default interface JTAG 20 Pin see Section 4 3 The official site is http www atmel com tools A TMELSAM ICE aspx 3 5 OpenOCD based programmers OpenOCD programmers are designed to interface with ARM based MCUs ARM 7 Cortex M3 There is nothing like a unitary OpenOCD programmer but there are plenty of them The programmers differ in look size price their PC interface USB RS232 as well as implementation of their JTAG connector and optional additional interface A good overview over common programmers can be found under http openocd sourceforge net doc html Debug Adapter Hardware html Default interface n a programmer dependent but JTAG 10 Pin JTAG 20 Pin are common Official site n a programmer dependent 4 Electrical programmer connections The JTAG interfaces of AVR and ARM boards follow a semi standard pin configuration to allow the usage of different programmers For AVR boards the 10 pin connector described in Section 4 1 is the most commonly used for ARM boards the 20 pin connector as described in Section 4 3 Note The described JTAG interface connections are for dresden elektronik devices and may vary slightly from the standard pin configuration Those variations are marked by a blue italic pin description www dresden elektronik de Page 14 of 61 User Manual Version 1 5 i N S Software Programming e Note dresden elektronik extensions are always designed as additional feature
66. ust now be displayed as libusb win32 device Figure 5 Figure 5 LibUSB Win32 Device E Device Manager Sel File Action View Help amp ZS ADMIN 2347F2CF8 w Batteries d Computer Se Disk drives id Display adapters 5 DVD CD ROM drives Floppy disk controllers J Floppy disk drives Yq Human Interface Devices 5 IDE ATA ATAPI controllers Keyboards gen LibLISB Win32 Devices Ges AVRDRAGON z Mice and other pointing devices B Network adapters Ports COM amp LPT SB Processors amp SCSI and RAID controllers 9 Sound video and game controllers System devices Universal Serial Bus controllers A firmware programming example for a radio module is described in Section 7 5 www dresden elektronik de Page 10 of 61 User Manual Version 1 5 ee Software Programming 2 4 2 Using AVRdude together with AVR Studio If the AVRdude and another AVR tool installation will be installed on the same operating system a libusb win32 filter must be established before This will enable a proper functionality of the Jungo USB driver by AVR tools and the libusb win32 driver by AVRdude The libusb win32 package offers the application package itself and the libusb win32 devel filter x x x x exe file It must be downloaded from this link the latest release should be taken http sourceforge net projects libusb win32 files libusb win32 releases After the AVRDRAGON is properly connecte
67. vices Universal Serial Bus controllers 1 1 Start sam ba exe and define your connection and the target board Figure 56 In this case choose USBserial COM3 as connection and rf231usb rd as target board Press CONNECT button 8 9 2 Update procedure Figure 56 Select connection and device ing SAM BA 2 12 Select the connection husBseriallcomd T Select your board jat91sam3s4 ek link speed 095 ILink TimeoutMultiplier Customize lowlevel Connect Exit The main SAM BA window appears Figure 57 Choose your firmware binary file with the Send File Name browse button and press SEND FILE After the successful upload execute the script Boot from Flash GPNVM1 A power on reset of the target will start the new firmware www dresden elektronik de Page 53 of 61 User Manual Version 1 5 ee Software Programming Figure 57 Firmware program process ing SAM BA 2 12 at91sam3s4 ek File Script File Help at91sam3s4 Memory Display Start Address 0x20000000 Refresh Display format Applet traces on DBGU Size in byte s 0x100 C asci C 8 bit 16 bit e 32 bit linFos z apply 0x20000000 0x00000064 0x01010114 0x00000001 0x00418300 e 0x20000010 0x20000018 oOx00000000 0x00000000 0x20000304 0x20000020 oOxz000036C Oxz00003D4 0x00000000 0x00000000 0x20000030 Oxo0000000 0x00000000 oxo0000000 0x00000000 0x20000040 0xO0000000 0xO0000000 0x000
68. w dresden elektronik de Page 19 of 61 User Manual Version 1 5 ee Software Programming deRFnode for AVR e 10 pin and 20 pin JTAG connector e FTDI USB support e Recommended for AVR radio modules Product information https shop dresden elektronik de development boards and kits develooment boards node arm avr html User Manual and Datasheet http www dresden elektronik de funktechnik service downloads documentation deRFnode for ARM e 10 pin and 20 pin JTAG connector e Native USB support e Recommended for ARM7 and Cortex M3 radio modules Product information https shop dresden elektronik de development boards and kits develooment boards node for arm 1 html User Manual and Datasheet http www dresden elektronik de funktechnik service downloads documentation deRFtoRCB Adapter e Small 10 pin JTAG connector e Recommended for AVR radio modules e Converts any pluggable dresden elektronik radio module into a Radio Controller Board RCB form factor Product information https shop dresden elektronik de accessories adapter derftorcb html Datasheet http www dresden elektronik de funktechnik service downloads documentation www dresden elektronik de Page 20 of 61 User Manual Version 1 5 ee Software Programming deRFtoRCB Adapter plugged onto Sensor Terminal Board e 10 pin and small 10 pin JTAG connector e FTDI USB support e Recommended for AVR radio modules
Download Pdf Manuals
Related Search
Related Contents
User's Guide Italian_Nikon Di866 User`s manual_N1109 Rev 1.1 2011 FI Cal Tool 取扱説明書 - スタジオイクイプメント Acesse aqui o manual do usuário Copyright © All rights reserved.
Failed to retrieve file