STM32Fxx JTAG/SWD multiplexing function remapping

Publisher:advancement3Latest update time:2018-06-15 Source: eefocusKeywords:STM32Fxx Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Problem Description:

During the laboratory tuning process, I encountered a problem: In order to facilitate program downloading every time, the team members often plugged Jlink into the board, but during the tuning process, they found that sometimes the program would die inexplicably, while the same program would not have this problem if Jlink was unplugged. And PB3 and PB4 are both set as output ports, and the output is high level. When measured with a multimeter, PB4 is high, but PB3 is not high level. When looking at the register values ​​in MDK, PB3 and PB4 are both high? Why are the register values ​​different from the actual values?


After careful research, we found the crux of the problem:


After checking the manual, I found that after reset, PB3 of the JTAG interface was set to floating (if the pin is floating, the level read from the port is uncertain), so the level read back is also uncertain.


PA13-PA14-PA15-PB3-PB4-PB5 of STM32 are mainly used for JTAG debugging, so by default they are in JTAG mode after startup. These pins are used as ordinary I/O ports in the project program, but the I/O mode configuration is not initialized. Therefore, when JTAG is not needed and the GPIO port needs to be fully utilized, JTAG needs to be turned off and set to GPIO mode.

http://blog.csdn.net/wg1194024093/article/details/54849686

STM32 commonly used pins redefine peripherals

http://blog.sina.com.cn/s/blog_a07a3f180101e6ow.html

The difference between the method of setting JTAG pins as normal IO ports in STM32f1 and the method in STM32f4

http://blog.csdn.net/wangyinyun1/article/details/48239725


Keywords:STM32Fxx Reference address:STM32Fxx JTAG/SWD multiplexing function remapping

Previous article:stm32 timer remapping
Next article:STM32-How to use pin multiplexing function to output PWM

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

STM32F series JTAG port remapped to normal GPIO
First, after the STM32F10x series MCU is reset, PA13/14/15 & PB3/4 are configured as JTAG functions by default. Sometimes, in order to make full use of the MCU I/O port resources, we will set these ports as normal I/O ports. The specific method is as follows: in GPIO_Configuration(); // Configure the GPIO port used: G
[Microcontroller]
How to deal with STM32F103 failing to program when SWD/JTAG function is turned off
Phenomenon: 1. SWD or JTAG cannot connect 2. The following error occurs during FLASH ARM programming     - Erasing affected sectors ...     - ERROR: RAM check failed @ address 0x20000000.     - ERROR: Write: 0x03020100 07060504     - ERROR: Read: 0x00000000 00000000     - ERROR: (0 bytes of RAM have been checked
[Microcontroller]
ARM H-JTAG Server Programming Process
ARM program download method (1) Detection and debugging objectives: Connect the board to the emulator and power it on, open H-JTAG Server, click   the button in the toolbar to detect the debugging target, and if the target board is detected, the target chip model will be displayed (this is the chip we are currently
[Microcontroller]
ARM H-JTAG Server Programming Process
Pi Ziheng Embedded: ARM Cortex-M Debugging (1) - 4-wire protocol standard (JTAG)
  After finishing the series of articles "Those Things About ARM Cortex-M Files" , Pi Ziheng took a short break, but he couldn't stop giving lectures, so he couldn't help but start a new series of articles, called "Those Things About ARM Cortex-M Debugging". This article is the first in this series. Welcome all embedd
[Microcontroller]
Pi Ziheng Embedded: ARM Cortex-M Debugging (1) - 4-wire protocol standard (JTAG)
In-depth study of SWD debugging and REMAP debugging in STM32
First, let me talk about the phenomenon of the problem. If you have this phenomenon, you can read this blog post by the blogger. After downloading the program once, the second download will prompt "no target connect". You can only continue to download the program by pressing and holding the reset key. First, there
[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号