The jatg port of stm32 is configured as a normal io port

Publisher:自由梦想Latest update time:2016-06-02 Source: eefocusKeywords:stm32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
When using stm32, spi3 and jtag ports overlap. If you want to use spi3 or use the jtag port as a normal io port, you can refer to the following configuration:

1. Use the spi3 interface and refer to the tutorial by Mr. Lu Youliang [BP19_Network PING Experiment]. This code implements this function.

2. The jtag port of stm32 can be configured to SWD mode, which can free up three interfaces without affecting the download and debugging of the program. For how to configure it to SWD mode, please refer to the previous blog. 

     Configuring the STM32 JTAG download pins: JTDO, JTDI, and JTCK as ordinary IO ports is actually the same as configuring them as spi3, except that spi3 also needs to turn on the spi clock. Here, just change it to turn on the io port clock. The two most critical instructions are:
      1. Turn on the multiplexed clock: RCC_APB2PeriphClockCmd (RCC_APB2Periph_AFIO, EANBLE);
      2. Call the remapping function: GPIO_PinRemapConfig (GPIO_Remap_SWJ_JTAGDisable, ENABLE); // Turn off jtag and turn on swd

Keywords:stm32 Reference address:The jatg port of stm32 is configured as a normal io port

Previous article:A brief description of pull-up and pull-down inputs of STM32 IO ports
Next article:stm32 io port configuration and use

Latest Microcontroller Articles
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号