AVR MCU fuse and unlock

Publisher:bemaiiLatest update time:2020-04-01 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The fuse configuration of AVR microcontrollers is a place where AVR microcontroller beginners can easily make mistakes. In fact, as long as you pay attention to some matters, you can try to avoid the microcontroller from being locked. Even if the microcontroller is locked, you can use some methods to unlock it. This article describes some problems that occurred in the fuse configuration when I first came into contact with AVR microcontrollers.


1. The fuse position of AVR microcontroller is a unique feature, which can control the system clock, JTAG debugging, watchdog, chip encryption, etc. Figure 1 is the progisp software. For beginners who are not familiar with the fuse position, you can first remove the programming fuse check at 2, so that when programming, the fuse position will not be programmed, and the factory default settings of the microcontroller can be used. Click 1 to enter the fuse position configuration interface.

Three minutes to tell you: AVR microcontroller fuse and unlock

figure 1


Figure 2 shows the bit configuration method. Each bit here cannot be clicked at will, especially the low-bit fuse that controls the clock. Generally speaking, it is not safe to configure the bit directly. You must make sure that it is the fuse configuration you want. If you accidentally move one of the fuse bits, you can restore the fuse configuration by reading or defaulting. This way, it is safer after downloading the program.

Three minutes to tell you: AVR microcontroller fuse and unlock

Figure 2 Bit configuration


Figure 3 is the wizard mode, which has text instructions. Checking the box means making a selection, such as enabling the JTAG interface and enabling ISP programming. It is recommended not to touch these two. If both ISP programming and JTAG interface are turned off at the same time, the program cannot be downloaded. The most important thing is the configuration of the clock. Figure 4 shows that the newly purchased development board is generally equipped with a crystal oscillator. At this time, do not touch the clock selection casually. If there is an external crystal oscillator on the board, but you choose the internal RC oscillator, this will directly lock the microcontroller. Similarly, if an external crystal oscillator is selected, but there is no external crystal oscillator installed, the microcontroller will also be locked. Therefore, when configuring the clock, be sure to determine the clock mode.

Three minutes to tell you: AVR microcontroller fuse and unlock

Figure 3 Wizard mode

Three minutes to tell you: AVR microcontroller fuse and unlock

Figure 4 Clock


After confirming the fuse bit configuration, you can download the program. You may need to download the program multiple times when debugging. After the fuse is configured correctly for the first time, you can remove the fuse programming just in case.

2. How to unlock the MCU after it is locked

After the microcontroller is locked, there are generally several ways to unlock it.

The first one is a high-voltage programmer. Here you need to buy a high-voltage parallel programmer. Generally, beginners don’t have this thing.

The second method, if you have played with a 51 microcontroller before or have friends around you who have a 51 microcontroller, you can use the 51 microcontroller to unlock it, power the 51 microcontroller to make it work, bring out the ALE pin of the 51 microcontroller, and insert it into the XTAL1 pin of the AVR microcontroller crystal oscillator, click Auto in the progisp software, then the AVR microcontroller will be unlocked, and then you can configure the correct fuse position (this method has been successfully tested).

The third method is to use an active crystal oscillator. If you have an active crystal oscillator at hand, this is the most convenient way to unlock. Figure 5, the small dot is below, connect according to the diagram, connect OUT to XTAL1, and program under progisp to unlock directly. (Test successful)

Three minutes to tell you: AVR microcontroller fuse and unlock

Figure 5 Active crystal oscillator


In addition, square waves of more than 1M can be generated through an oscilloscope, and square waves can be generated through other microcontrollers. These methods have not been tried yet.

Three minutes to tell you: AVR microcontroller fuse and unlock

Figure 6


Supplement: Be sure to select the chip correctly, otherwise there will be an ID recognition error. If this happens, do not choose Yes, choose No, and then check the chip signal and line connection.

Reference address:AVR MCU fuse and unlock

Previous article:An experience of AVR fuse burning and recovery - detailed analysis and solution
Next article:atmega328p set fuse bit, atmega328p flash

Latest Microcontroller Articles
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
    Since development under LINUX is still quite troublesome, is there a more convenient and simple development method under WINDOWS? The answer is yes. Of course, it is not a development tool like ADS, because it ...
  • Learn ARM development(15)
    When using GCC to develop ARM, you will definitely encounter compiler problems. For example, you will encounter various warnings and errors when compiling C code. For example, I encountered several warnings yesterday, so let's take a look at what these warnings are ...
  • Learn ARM development(16)
  • Learn ARM development(17)
  • Learn ARM development(18)
  • Embedded system debugging simulation tool
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号