当前位置:网站首页>Solve the problem that gd32f207 serial port can receive but send 00
Solve the problem that gd32f207 serial port can receive but send 00
2022-07-24 19:49:00 【OMGMac】
Share one you are developing GD32F207 A problem encountered due to negligence during serial port , After configuring the serial port , Check the serial port sending and receiving through the serial port assistant , It is found that the serial port can receive, but each time after receiving, the serial port assistant will receive a 00( That is to say, the serial port sent me a 00), Here I think this 00 It should be the phenomenon of unsuccessful sending , Because I have encountered unsuccessful configuration before , When using some serial assistant tools, you will also receive 00 The phenomenon , That means there is a problem with sending ( May be TX Incorrect pin configuration , Or sending is not enabled , It is also possible that there is a problem with the sending interrupt function ).
Later, I found that the problem was my own TX There is a problem with the mode of pin configuration , I started with GPIO_MODE_OUT_PP
gpio_init(GPIOB, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_10); // Misconfiguration
But because the serial port is multiplexed , So we should use "GPIO_MODE_AF_PP" Pattern .
gpio_init(GPIOB, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_10); // Configured correctly
After modifying it, the serial port transmission is successfully realized .
therefore , If a little friend also encounters such a problem , You can also check whether there is a problem with the configuration or whether the corresponding interrupt or enable is on , There may also be a problem with the writing of the interrupt function .
My level is limited , The above information is for reference only , If there are mistakes and irregularities , Your advice are most welcome .
Besides, it's not easy to create , Don't copy , If it helps you, I hope you can like it , thank you ~
边栏推荐
- Elastomer simulation (elasticity)
- Sword finger offer 53 - I. find the number I in the sorted array
- Introduction to WDK development 1- basic environment construction and the first driver (VS2010)
- Modelarts, Pangu big model, ModelBox... Detailed explanation of Huawei cloud AI development production line
- How to select software dongle
- Meshlab & PCL ISS key points
- Xiaomi 12s ultra products are so powerful, but foreigners can't buy Lei Jun: first concentrate on the Chinese market
- Lights of thousands of families in the year of xinchou
- Read the registry through the ATL library clegkey (simple and convenient)
- 01 | opening words: teach you to build a blog website hand in hand
猜你喜欢
![2019 Hangdian multi school first 6581 vacation [thinking]](/img/38/5a74d3ef346d6801f9da8fd3a4b23a.png)
2019 Hangdian multi school first 6581 vacation [thinking]

LSTM and Gru of RNN_ Attention mechanism

Meshlab&PCL ISS关键点

Machine learning_ Data processing and model evaluation

【校招面经】8道指针面试真题,快来检测自己掌握了几道。

Lights of thousands of families in the year of xinchou

Original reverse compensation and size end

Introduction to WDK development 1- basic environment construction and the first driver (VS2010)

原反补及大小端
![[German flavor] safety: how to provide more protection for pedestrians](/img/7c/12e60cc00ccfd0842be2bf404e9c5a.jpg)
[German flavor] safety: how to provide more protection for pedestrians
随机推荐
Prevent static decompilation, dynamic debugging and plug-in
Leetcode652 finding duplicate subtrees
Meshlab & PCL ISS key points
Ask a question: is there an error msg = ora-04036: instance usage when using CDC to monitor oracle
Sword finger offer 50. the first character that appears only once
MySQL8.0学习记录20 - Trigger
Day 5 (array)
This visual analysis library makes it easy for you to play with data science!
Literature reading: gopose 3D human pose estimation using WiFi
Summary of articles in 2020
Taokeeper environment setup
Channel state information (CSI) conjugate multiplication denoising method
Detailed explanation of DHCP distribution address of routing / layer 3 switch [Huawei ENSP]
[untitled]
Clion configuring WSL tool chain
Sword finger offer 42. maximum sum of continuous subarrays
Analysis and Simulation of strlen function
Redis basic knowledge, application scenarios, cluster installation
Hidden Markov model HMM
Please ask a question. Follow the quick start method. After creating the table, the Flink SQL queries and displays the table structure, but there is an error when it exceeds the limit. What should we