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.
- 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;
- PINSEL0 has a total of 32 bits, in groups of 2 (implying a value range of 00 - 11), from P0.0 to P0.15;
- PINSEL1 has 32 bits in total, 2 bits in a group, from P0.16 to P0.31;
- 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.
1:0
31:4
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
Typically, when PINSEL2 is selected to connect the P1[25:16] pins to GPIO, the settings are as follows:
PINSEL2 = PINSEL2 & ( ~ 0x08 );
Previous article:Android transplantation on TQ2440 development board
Next article:STM32 learning notes - GPIO port
Recommended ReadingLatest update time:2024-11-16 22:50
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- High salary + recruiting medical device embedded (single-chip microcomputer) software engineers
- Industrial serial port screen solution: Application of large color screen in range hood industry (large color serial port screen solution)
- To ensure CCM under light load of the switching Buck power supply, the inductance is not tens of uH no matter how you calculate it! ! ! Please answer
- 【BearPi-HM Micro】Part 1: Unboxing
- HC05 Bluetooth module debugging documentation with buttons
- Water temperature sensor
- Infineon Position2Go Development Kit Review - skypinglee
- Schematic diagram of a quadrature oscillator
- Please tell me about the PB pin of GD32E230C
- Qorvo UWB Solution Receives Apple U1 Interoperability Certification