ARM's explanation of PINSEL

Publisher:SerendipityGlowLatest update time:2016-04-27 Source: eefocusKeywords:ARM  PINSEL Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
ARM LPC2131 explanation of PINSEL

Concept: The pin connection module controls the multiplexer through the configuration register to connect the pins to the on-chip peripherals; (P0.1/RXD0/PWM3/EINT0)

Purpose: The purpose of the pin connection module is to configure the pins to the required functions, which can realize independent pin configuration;

Application: The reset values ​​of pin selection registers PINSEL0 and PINSEL1 are both 0x00000000; for specific settings, refer to the configuration table.

  1. PINSEL0 has a total of 32 bits, in groups of 2 (implying a value range of 00 - 11, for example, the four functions P0.1/RXD0/PWM3/EINT0 are selected by 00/01/10/11), from P0.0 to P0.15;
  2. PINSEL0 has a total of 32 bits, in groups of 2 (implying a value range of 00 - 11), from P0.0 to P0.15;
  3. PINSEL1 has 32 bits in total, 2 bits in a group, from P0.16 to P0.31;
  4. PINSEL2 is listed separately because it is special because its use requires access using the "read-modify-write" method.

 

 

Note: Accidental writes to bits 0 to 2 and/or 3 will result in loss of debug and/or trace functionality.

 Bit          Reset Value  Description                                                                                 

1:0        00          Reserved. Users are not allowed to write 1 to it.                                                   

                     When this bit is 0, P1.36:26 is used as GPIO;     P1.26 (with an overline, indicating a low level)

                       When this bit is 1, P1.36:26 is used as a debug port;  TRACE (with an overline, indicating a low level)

                     When this bit is 0, P1.25: 16 is used as GPIO;       P1.20 (with an overline, indicating low level)

                                         When this bit is 1, P1.25:16 is used as a tracking port; TRACESYNC (with an overline, indicating a low level)

31:4                   Reserved                      

 

   Generally, when setting the function of a pin, in order not to affect other pins, the “read-modify-write back” method is used, that is, first read the register value, then perform a logical “and” or “or” operation, and then write it back to this register.

If P0.8 and P0.9 are set to TxD1 and RxD1 functions (P0.8 and P0.9 both correspond to 2 bits, so they should be 17:16 and 19:18)

PINSEL0 = ( PINSEL0 & 0xFFF0FFFF ) | ( 0x05 << 16 ); //Set 2 pins at one time, corresponding values

                   Here 0 corresponds to bits 16-19        // need to refer to the register function table

 

Typically, when PINSEL2 is selected to connect the P1[25:16] pins to GPIO, the settings are as follows:

PINSEL2 = PINSEL2 & ( ~ 0x08 );     //Set the 3rd bit of PINSEL2 selection register 2 to 0


Keywords:ARM  PINSEL Reference address:ARM's explanation of PINSEL

Previous article:Android transplantation on TQ2440 development board
Next article:STM32 learning notes - GPIO port

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

Summary of commonly used ARM instructions
1.How many addressing modes are there for ARM instructions? Give examples to illustrate each. answer: Immediate addressing: MOV R0,#15 Register addressing: ADD R0, R1, R2 Register indirect addressing: LDR R0, Register shift addressing: ADD R0, R1, R2, LSL #1 Base-indexed addressing: LDR R0, Multi-register addressing
[Microcontroller]
Comparing stm32 and arm9 research direction
During the winter break of my sophomore year, I was invited by my teacher to go to Dongguan for an internship for 10 days. Although it was not my first time, the experience this time was very different from the last time. I wanted to write this article after returning from Dongguan, but I have been putting it off unti
[Microcontroller]
Research on SIM card detection system based on ARM
With the development of science and technology in modern society, people have higher and higher requirements for the portability, convenience and efficiency of mobile products. As a special type of smart card, SIM card adopts standard contact IC card and complies with IS07816 standard specification. It follows the c
[Microcontroller]
Research on SIM card detection system based on ARM
Arm and Unity join forces to make 3D everywhere
Arm will work with Unity Technologies to ensure that 3D applications, such as games and entertainment, run smoothly on hardware using Arm architecture. The announcement is part of a larger Total Compute collaborative approach in Arm hardware and software design. Ian Smythe, vice president of marketing for Arm’s clien
[Mobile phone portable]
IAR for ARM series tutorial (I)_Detailed process of creating a new software project
II. Main Points Many people on the Internet asked: "I previously built a project using IAR for ARM V5 or V6. After IED upgraded to V7, when I opened the previous project, a lot of compilation errors appeared?" After the IAR for ARM version upgrade, there are slight differences in the tool chain. These issues will be
[Microcontroller]
IAR for ARM series tutorial (I)_Detailed process of creating a new software project
GNU ARM Assembly--(XIII) Linker script under GNU ARM Assembly
       Before writing the linker script for GNU ARM assembly, it is necessary to look at the ldr instruction, as well as the ldr and adr pseudo-instructions.         ldr instruction:         LDR load word into a register Rd - mem32         ldr pseudo-instruction:         LDR Rd, =constant         LDR load cons
[Microcontroller]
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
Embedded quantitative analysis system based on ARM7 chip S3C44BOX
Gangue is a solid waste discharged during coal mining and coal washing. It is a black-gray rock associated with coal seams during the coal formation process. There are more than 1,500 gangue mountains in the country, with a total volume of more than 3 billion tons, accounting for more than 40% of China's total indus
[Industrial Control]
Embedded quantitative analysis system based on ARM7 chip S3C44BOX
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号