Necessary operations for using the serial port of STM32

Publisher:nu23Latest update time:2018-12-11 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere



As can be seen from the figure, the main functions of these two pins are used as ordinary IO ports, and are used as serial port 1 in multiplexing mode.


Therefore, the multiplexing function clock must be turned on during power-on initialization.


RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO,ENABLE);


Keywords:STM32 Reference address:Necessary operations for using the serial port of STM32

Previous article:stm32 calculates the size of the compiled program and determines the starting position of data storage
Next article:Necessary operations for stm32 to use swd download

Recommended ReadingLatest update time:2024-11-16 15:39

STM32 drives wireless NRF24L01 to complete serial port data transmission
2401 A simple 2.4G RF module with SPI interface costs 20¥ on Taobao, and 17¥ for DIY, which is considered cheap.  This version of the stable fix http://ntn314.blog.163.com/blog/static/16174358420106211118944/ The interface CMOS level 3.3V STM32 can be directly connected. IRQ low level interrupt is generated when
[Microcontroller]
STM32 drives wireless NRF24L01 to complete serial port data transmission
Use stm32 to generate triangle wave and sine wave
        I'm preparing for an electronic competition recently, so I've been studying how to use 32 to generate a waveform with controllable frequency.       The functions of 32 are still very powerful. F4 has a main frequency of 168MHZ and the clock frequency can reach 84MHZ. For generating waveforms, if you only wan
[Microcontroller]
Use stm32 to generate triangle wave and sine wave
Simulated serial port based on STM32 series (non-blocking)
STM32 microcontrollers generally have at least 3 serial ports and at most 5 serial ports, but for my project, 5 hardware serial ports are not enough. As for the reason why it is not enough, well, it is because the project is customized later, and any serial port cannot be saved. There is no way, I can only think of
[Microcontroller]
Simulated serial port based on STM32 series (non-blocking)
[Experiment 4] Independent watchdog experiment
1. Experimental Purpose 1) Understand independent watchdogs; 2) Learn to use independent watchdogs; 3) Feed the dog through WK_UP, and then prompt the reset state through DS0. 2. Introduction to STM32 independent watchdog The microcontroller system may run away due to external interference, resulting in an infinit
[Microcontroller]
stm32 PWM input mode measuring pulse speed and duty cycle
1. Conceptual understanding PWM input capture mode is a special case of input capture mode. 1. Each timer has four input capture channels IC1, IC2, IC3, and IC4. IC1 and IC2 form a group, and IC3 and IC4 form a group. And the corresponding relationship between the pins and registers can be set. 2. Two ICx signals are
[Microcontroller]
STM32 Novice Growth Record---GPIO Usage
span style="font-size:14px;" /span   span style="font-size:14px;" #include "stm32f10x_lib.h"   #include "stm32f10x.h"      GPIO_InitTypeDef GPIO_InitStructure; //Define GPIO macro operation structure      void Delay(__IO uint32_t nCount) //__IO macro definition volatile   {     for(; nCount != 0; nCount--); 
[Microcontroller]
STM32 Novice Growth Record---GPIO Usage
STM32 IIC Detailed Explanation: STM32 IIC Slave Mode (Interrupt Mode to Send and Receive Data)
1. Introduction to IIC This part of the content will be used in the second section of the code. For IIC, the slave cannot actively send data, and the start conditions are all generated by the host.  1.1、Host sends data process   1) When the host detects that the bus is in the "idle state" (that is, the SDA and S
[Microcontroller]
Design of a portable carbon dioxide monitor based on STM32
    The detection methods of CO2 concentration can be roughly divided into chemical methods and physical methods. The detection methods of CO2 concentration include titration, thermal catalysis, gas sensing, and electrochemical methods. These methods are chemical methods, which generally have problems such as high pric
[Medical Electronics]
Design of a portable carbon dioxide monitor based on STM32
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号