LPC2100 series ARM7 microcontroller encryption ARM chip

Publisher:SparkStar22Latest update time:2010-09-18 Keywords:LPC2100  ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Encryption principle description

The LPC2100 series ARM7 microcontroller is the world's first ARM chip that can be encrypted. The method of encrypting it is to set the specified data at the specified address through the user program. PHILIPS stipulates that for the LPC2100 chip (except LPC2106/2105/2104), when the data at the FLASH address 0x000001FC on the chip is 0x87654321, the chip is encrypted. After the encryption is set, the JTAG debugging interface is invalid, and the ISP function only provides the functions of reading ID and erasing the entire chip. Note: Download the program with encryption settings to the internal FLASH of the chip, and the encryption will take effect after the next system reset.

2. Encryption program implementation

In order to implement encryption settings, users must ensure that data 0x87654321 is defined at 0x000001FC. Let's first analyze the program structure with encryption settings, as shown in Figure 1. Address 0x000000~0x00000020 is the exception vector table. If the LDR instruction jump is used in the vector table, each exception service entry address can be defined between 0x00000020~0x00000040; after the exception vector table and before the 0x000001FC address, this small space can be used to write some initialization code or FIQ interrupt handler; then use NOP instructions to fill until the 0x000001FC address, define data 0x87654321 at this address, and the user's other program code follows.

Exception Vector Table

Partial initialization code

or

FIQ interrupt handling

NOP

NOP

DCD 0x87654321

User Code

The implementation of the encryption program is in the startup code Startup.s file of LPC2100, as shown in Listing 1. The program first uses the IF pseudo-instruction to determine whether the EN_CRP global variable has been defined. If it has been declared, the code in Listing 1 (2) to (8) is compiled to perform encryption settings. Note: The EN_CRP global variable can be predefined in the assembler or declared using GBLA/GBLL at the beginning of the file.

Program Listing 1 (2) is used to determine whether the current code address exceeds 0x000001FC. If it exceeds, the INFO pseudo-instruction is used to display an error message, see Program Listing 1 (3). Program Listing 1 (5) to (7) are used to fill NOP instructions until 0x000001FC. Program Listing 1 (8) is to define data 0x87654321 at the address 0x000001FC to implement encryption settings.

0x00000000

0x00000020

0x000001FC

Program Listing 1 LPC2100 encryption program implementation code;

Exception Vector Table

IF

EF: EN_CRP (1)

IF . >= 0x1fc (2)

INFO 1,"nThe data at 0x000001fc must be 0x87654321.nPlease delete some source before this line." (3)

ENDIF (4)

CrpData WHILE . < 0x1fc (5)

NOP (6)

WEND (7)

CrpData1 DCD 0x87654321 (8)

ENDIF (9)

3. Encryptable targets in project templates

When a project created using the LPC2100-specific project template uses the RelInFLASH target, a program with encryption settings will be generated.

For the Thumb Executable Image for UCOSII (for lpc21xx) project template, when the ThumbRelInFLASH target is selected, a program with encryption settings will be generated.

Keywords:LPC2100  ARM Reference address:LPC2100 series ARM7 microcontroller encryption ARM chip

Previous article:Design of X86 decoding SOC architecture based on ARM embedded platform
Next article:Dynamic Configuration of Interrupt Vector Table in ARM Embedded System

Recommended ReadingLatest update time:2024-11-16 22:45

Arm Technology (China)'s solemn statement on "Arm's media statement"
Arm Technology (China) Co., Ltd. also issued a solemn statement regarding the " Arm Company Media Statement " today. The specific contents are as follows:   1. The "Arm Media Statement" released by Arm and Hopu Investments to the media contains completely groundless accusations against Mr. Wu Xiong'ang, the legal re
[Semiconductor design/manufacturing]
Arm Technology (China)'s solemn statement on
Fuel cell engine main controller based on ARM9 and MPC56x
With the increasing demand for clean energy, fuel cell engines and their applications in automotive power systems are becoming increasingly important. Fuel cells directly convert isothermal chemical energy into electrical energy based on electrochemical principles. Since they are not limited by the thermal engine
[Industrial Control]
Fuel cell engine main controller based on ARM9 and MPC56x
Comprehensive application of single-chip technology of ARM, FPGA and programmable analog circuit design
    If there really were typical or common embedded system applications, the product catalogs of mainstream semiconductor companies would be much thinner. Designers now not only have to choose from a variety of processor architectures (most embedded system designs are centered around processor cores), but also have an
[Microcontroller]
Comprehensive application of single-chip technology of ARM, FPGA and programmable analog circuit design
Qualcomm countersued ARM: using litigation as a bargaining chip to violate the agreement is nonsense
According to reports, Qualcomm countersued ARM on October 27, saying that ARM had no legal basis for accusing Qualcomm of violating the licensing agreement and trademark.    Qualcomm wants a federal judge in Delaware to find that it did not violate ARM's licensing contract as part of Qualcomm's $1.4 billion acquisitio
[Semiconductor design/manufacturing]
ARM7 VS Cortex-M3
To use a low-cost 32-bit processor, developers face two choices: processors based on the Cortex-M3 core or the ARM7TDMI core. How to make a choice? What are the selection criteria? This article mainly introduces some characteristics of the ARM Cortex-M3 core microcontroller that are different from the ARM7 to help you
[Microcontroller]
High-efficiency embedded ARM program development
In applications with high computational complexity such as multimedia and communications, embedded system programs often require special design to meet the requirements of many constraints such as manufacturing costs, power consumption, performance, and real-time performance. This requires designers to have a set of p
[Microcontroller]
High-efficiency embedded ARM program development
What does Arm's open instruction set mean for the future development of IoT?
Translated from - staceyoniot and news releases   Arm, a semiconductor intellectual property (IP) provider, is well-known in the industry. It has developed the underlying architecture used by almost all mobile phone processors in the world. Now, Arm has further opened up the architecture for customized needs. Arm said
[Internet of Things]
What does Arm's open instruction set mean for the future development of IoT?
Porting between ARM SDT assembly format and GNU assembly format
Question: How to port the assembly code in ARM SDT environment to GCC compilation environment? Answer: When porting assembly code from ARM SDT to GCC for ARM compiler, the following modifications are often required: 1. Comment lines use “#” or “/* ... */” instead of “;” 2. Pseudo operator replacement: INCLUDE
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • 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)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号