About the use of PA15 pin as normal IO in STM32

Publisher:彭勇Latest update time:2018-08-27 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

I was working on a project recently, and when debugging, I found that the PA15 pin could only output a high level of 3.3V regardless of whether it was configured as output high, low, or input.

Premise: Currently, there are two methods for STM hardware debugging, JTAG and SW. At present, I personally think that the best method is SW, because it only occupies two IO ports, PA13 and PA14. JTAG occupies three more IO ports, PB3, PB4, and PA15, which is a waste of resources.

I use SW, but STM will enable both SW and JTAG by default. That is to say, by default, PA13, PA14, PB3, PB4, and PA15 cannot be used as ordinary IO. 
Because I don't use JTAG, in order to make PB3, PB4, and PA15 ordinary IO, the following configuration must be performed: 

*RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO,ENABLE)*;//Enable port multiplexing clock 
*GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable,ENABLE);*//Disable JTAG 

These two sentences are ok, and the above three pins can be used as normal IO in the future.


Reference address:About the use of PA15 pin as normal IO in STM32

Previous article:Stm32 IO port configuration and use
Next article:About the problem of incorrect serial port baud rate when using 8M crystal oscillator on STM32F107RCT6

Recommended ReadingLatest update time:2024-11-16 11:52

Queues and stacks based on STM32
Use ESP8266 to receive data transmitted from the cloud. The data sent from the cloud may be several groups of data sent at the same time, and the lower computer can only process them one by one. Therefore, it is necessary to establish a buffer array to receive cloud data and then process them one by one -- queue. queu
[Microcontroller]
Queues and stacks based on STM32
STM32 Quadrature Encoder Programming
As shown in the figure, each TIMER of STM32 has an orthogonal encoder input interface. TI1 and TI2 are input filtered, and edge detection generates TI1FP1. TI2FP2 is connected to the encoder module. By configuring the working mode of the encoder, the encoder can be counted forward/reverse. As shown in the figure
[Microcontroller]
STM32 Quadrature Encoder Programming
Solution to the problem that the stm32 microcontroller cannot download the program after entering the sleep (STOP) mode
By using the sleep mode of the stm32 microcontroller, the microcontroller can be put into sleep intermittently to achieve low power consumption. It often fails to wake up after entering sleep mode, resulting in the next program not being able to be burned in. The usual solution is: the general development board or mic
[Microcontroller]
Solution to the problem that the stm32 microcontroller cannot download the program after entering the sleep (STOP) mode
stm32 FSMC-External SRAM IS62WV51216
Pin Definition  FSMC configuration steps 1. Enable the corresponding pin GPIO clock  2. Configure the GPIO pin mode  3. Enable the FSMC clock  4. FSMC initialization  5. Memory block enable Example  #define Bank1_SRAM3_ADDR ((u32)(0x68000000)) //First address 0x60000000, each block 0x40000000 void SRAM_gp
[Microcontroller]
stm32 FSMC-External SRAM IS62WV51216
Internal FLASH principle of STM32
Different models of STM32 have different FLASH capacities, the smallest is only 16K bytes, and the largest is 1024K bytes. The chip used in the STM32F1 development board on the market is the STM32F103 series, and its FLASH capacity is generally 512K bytes, which is a large-capacity chip. The Flash module organization
[Microcontroller]
Internal FLASH principle of STM32
UC_COS ported to STM32
1 Transplant the LCD screen based on the LCD screen lighting (17) in the peripherals section 1 Download the GUI and unzip it to the root directory of the project Picture 1 2 Add all the folders in the GUI to the project file. Picture 2 3 Add the files in each folder in the GUI to the project.     1 When adding Confi
[Microcontroller]
UC_COS ported to STM32
STM32 watchdog IWDG WWDG
Independent Watchdog IWDG   Window Watchdog WWDG  For a general watchdog, the program can refresh the watchdog at any time before it generates a reset, but this has a hidden danger. It is possible that the program runs wildly and then runs back to the normal place, or the program that runs wild happens to execute the
[Microcontroller]
Motor control method based on STM32 microcontroller
  The advent of frequency converters and advanced motor control methods have made three-phase brushless motors (AC induction motors or permanent magnet synchronous motors) once a huge success in speed control applications. These high-performance motor drivers were mainly used in factory automation systems and robots.
[Microcontroller]
Motor control method based on STM32 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号