How to change the clk fuses and change power mode on AVR Xplained Mini mEDBG command line interface 1 Upgrade the mEDBG firmware on the AVR Xplained Mini to latest revision. 1. If you have an Atmel Studio release 6.2.1502 or later Download the “medbgdebugger” package from Atmel spaces and follow the instructions http://spaces.atmel.com/gf/project/avr_xp_mini/frs/ 2. Start Atmel Studio 3. Connect the AVR Xplained Mini to the computer. 4. In Atmel Studio, select Tools – Device programming (Ctrl – Shift – P) 5. In the Device Programming window, select Tool to mEDBG and click Apply, Studio will now ask you if you want to upgrade. 2 General Preparations The mEDBG has a command line interface which can be accessed with the script in the mEDBG_script.zip file. 1. Download and unzip the mEDBG_script.zip file 2. Install Python (https://www.python.org/) 13NOV2014/TB 3 Disable AVR fuse filter The mEDBG does not initially allow users to program the clk related fuses in the target. This is done to avoid problems with the debugger when target and mEDBG is not in clk sync. This filter can be disabled – note If any other cpu clk than the external clk supplied by the mEDBG is used the debugWIRE is not guaranteed to work. 1. Edit stuff.py to issue the command c.set_suffer(0xFE). 2. Open a command window in the directory where stuff.py is located. (Browse to folder rightclick on folder with shift pressed and select “Open command window here”). 3. Connect the AVR Xplained Mini. 4. Run tuff.py (c:\Python27\python stuff.py). 5. The script will print selected tool and display SUFFER setting. 6. Recycle power (disconnect/connect the board) for the change to take effect. 7. Edit stuff.py to issue the command c.set_suffer(0xFF) to reset to factory setting. 13NOV2014/TB 4 Enable mEDBG power save mode In order to save power when the AVR Xplained Mini is running on battery the mEDBG can be set to run on 1MHz, which also will be the external clk to the target. The CDC COM port can be connected at 9600/N81 in this mode. 1. Edit stuff.py to issue the command c.set_suffer(0xFD). 2. Open a command window in the directory where stuff.py is located. (Browse to folder right-click on folder with shift pressed and select “Open command window here”). 3. Connect the AVR Xplained Mini. 4. Run tuff.py (c:\Python27\python stuff.py). 5. The script will print selected tool and display SUFFER setting. 6. Recycle power (disconnect/connect the board) for the change to take effect. 7. Edit stuff.py to issue the command c.set_suffer(0xFF) to reset to factory setting. 13NOV2014/TB
© Copyright 2024 ExpyDoc