5.9. Setting fuses and lock bits

Warning: Modifying an AVR’s fuses can leave it an unusable state. In particular, if you select an invalid clock setting, then the AVR’s clock will not work and you won’t be able to program it. You should make sure you know what you are doing and be very careful when setting the fuses!

The Pololu USB AVR Programmer v2.x supports reading and writing an AVR’s fuses and lock bits.

If you have Windows, the safest and easiest way to set the fuse bits is to use Atmel Studio’s graphical user interface for it, which can be found in the “Fuses” and “Lock bits” section of the “Device Programming” dialog. In case “Auto read” is turned off, click the “Read” button to read your device’s settings. Then make any changes you want to make and click “Program”.

The fuses and lock bits can also be set using AVRDUDE. Here is an example command:

avrdude -c stk500v2 -P COM6 -p m32u4 -U lock:w:0xHH:m \
  -U efuse:w:0xHH:m -U hfuse:w:0xHH:m -U lfuse:w:0xHH:m

To make the command above work, you would need to replace each H with a hexadecimal digit. Refer to the your AVR’s datasheet to figure out the right values for each configuration byte.

You’ll also need to change “COM6” to the actual name of the programmer’s programming port, which you can find by running pavr2cmd --prog-port or by following the instructions in Section 4.5.

Related Products

Pololu USB AVR Programmer v2
Pololu USB AVR Programmer v2.1
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors