MCU decryption is simply to erase the encryption lock bit in the MCU. Due to the unreasonable design of the erase operation timing of the AT89C series microcontroller. Makes it possible to erase the cryptographic lock bits first before erasing the on-chip program.
The timing sequence of the erase operation of the AT89C series microcontroller is: erase start----》Erase operation hardware initialization (10 microseconds)----》Erase encryption lock bit (50----200 microseconds)-- -》Erase the data in the on-chip program memory (10 milliseconds)-----》Erase ends. If a program is used to monitor the erasing process, once the encryption lock bit is erased, the erasing operation will be terminated and further erasing of the on-chip program memory will be stopped. The encrypted microcontroller will become an unencrypted microcontroller. On-chip programs can be read out via the bus.
There are two unbreakable encryption methods for the AT89C series microcontroller.
1. An encryption method that permanently destroys the encryption bits of the microcontroller. Referred to as OTP encryption mode.
2. An encryption method that permanently destroys the data bus of the microcontroller. Referred to as burn bus encryption mode. AT89C series microcontroller OTP encryption mode principle This programming encryption algorithm burns the encryption lock bit (breaks down the silicon chip in the chip) without damaging other parts and does not occupy any resources of the microcontroller. After the encryption lock bit is burned out, it no longer has the erasure feature. 89C51/52/55 has 3 encryption bits to further increase the reliability of encryption. Once encrypted in OTP mode, the encryption bits in the microcontroller and the data in the program memory cannot be erased again. The 89C51/52/55 microcontroller seems to have become a one-time programmed OTP microcontroller.
If the length of the user program is greater than the capacity of the 89C51 microcontroller's on-chip memory, the OPT mode can also be used for encryption.
The specific methods are as follows:
1. Expand a large-capacity program memory as usual, such as 27C512 (64K).
2. Arrange the key program parts in the first 4K of the program.
3. Write the entire program to 27C512, and then fill the first 4K of 27C512 with 0s.
4. Solidify the first 4K of the program into AT89C51 and use OPT mode for encryption.
5. Connect the EA pin of the microcontroller to high level. In this way, the first 4K of the program runs inside the microcontroller, and the last 60K runs outside the chip. Pirates cannot read the first 4K of a program, and even knowing the last 60K is useless.
The principle of AT89C series microcontroller bus encryption mode is that the program code in the microcontroller will eventually be read through the data bus. If one of the lines of the data bus that guides the microcontroller is permanently damaged, the decryptor will not be able to erase the encryption bit even if it erases the encryption bit. Read the correct code of the program on the chip. The data bus of 89C1051/2051 is P1 port. The bus mode burns out the P1.0 port of 89C2051. The original program codes are 02H, 01H, and 00H. The read data is 03H, 01H, 00H. The lowest bit is always 1, and the read program code is obviously the wrong code. This encryption mode is used to encrypt the 89C1051/2051 microcontroller. The disadvantage is that it takes up the resources of the microcontroller. Developers and designers only need to reserve the export line P1.0 when designing the microcontroller hardware system, and then they can use the bus burning mode to encrypt the microcontroller in the future.
Previous article:An introduction to the pin functions of the external structure of the microcontroller and an overview of the usage information
Next article:89C51 microcontroller structure block diagram
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- ESP8266 SDK Documentation Programming Manual
- [Help] Issues with replacing domestically produced switch chips!!!
- Who knows about BMS protection delay?
- Ride: Which country will be the ultimate winner in 5G? Reply to this post and give points
- How to clearly mark chip pins with multiple functions in the schematic library?
- The charging current of IP5306 is 2.1A. Will it explode if it charges a 3.7-4.2V, 1000mAH, 1C lithium battery?
- TMS320F28369D Review Summary
- 【EETALK】What do you think about Apple starting to research GaN chargers?
- Hangshun chip-based on HK32F030F4P6-word version
- STM32L476 MCU N52832 Bluetooth 25LQ128 BMI160 acceleration + gyro sensor board