STM32 serial port printf sends Chinese garbled characters

Publisher:zukeq2009Latest update time:2018-06-10 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. First, make sure that the Keil program is compiled correctly and the program has been debugged. English characters can be sent normally, but Chinese characters are garbled when sent.


2. Use Notepad to open the main.c file (or other main program), click Save As, select ANSI encoding in the lower right corner, and replace the original file.

Keywords:STM32 Reference address:STM32 serial port printf sends Chinese garbled characters

Previous article:Keil redirects printf to serial UART output
Next article:STM32 serial communication printf redirection

Recommended ReadingLatest update time:2024-11-16 13:44

Design of multi-cell lithium battery management system based on STM32
introduction Battery energy saving and pollution are becoming increasingly concerned issues. In the field of traditional batteries, lead-acid batteries and nickel-metal hydride batteries have a series of problems in actual use: such as small specific capacity, unsuitable for fast charging and high current power ge
[Power Management]
Design of multi-cell lithium battery management system based on STM32
STM32 learning 003_STM32F10X clock configuration
1. In STM32, there are 5 clock sources: HSI, HSE, LSI, LSE, PLL. ①HSI is a high-speed internal clock, RC oscillator, with a frequency of 8MHz; ②HSE--High-speed external clock, can be connected to quartz or ceramic resonator, or external clock source, frequency range 4MHz--15MHz. ③LSI--Low speed internal clock, RC osci
[Microcontroller]
STM32 learning 003_STM32F10X clock configuration
The father of STM32 talks about the 2019 product roadmap: cost-effectiveness, AI, and development experience
Recently, at the 2019 STM32 Summit, Daniel Colonna, the father of STM32 and global marketing director of STMicroelectronics' microcontroller division, introduced STM32 product planning and ecological strategy. Daniel's work for decades has been around microcontrollers. He has been the global marketing director of STM
[Microcontroller]
The father of STM32 talks about the 2019 product roadmap: cost-effectiveness, AI, and development experience
Mil's bare metal development application notes based on the STM32MP135 development board, MCU-friendly transition to MPU
Previously, microprocessors (MPUs) and microcontrollers (MCUs) were two distinct devices, with MPUs supporting rich software systems such as Linux and related software stacks, while MCUs would typically focus on bare metal and RTOS. In recent years, as MCUs have become increasingly powerful, the distinc
[Embedded]
Mil's bare metal development application notes based on the STM32MP135 development board, MCU-friendly transition to MPU
How to use ST's library to develop STM32
The chip I use is STM32F103VET and the compiler is IAR ARM V5.5, the debugger is JLINK V8 1, download the ST library, the current version is STM32F10x_StdPeriph_Lib_V3.3.0, unzip it, and then copy the entire Libraries to your working directory. The Project directory is a lot of demonstration codes, you can refer to h
[Microcontroller]
Detailed explanation of the "dead zone" in STM32 PMW calculation
  PWM "dead zone"? Sounds a bit scary? What is PWM "dead zone"? Maybe many people have noticed it. Today, let's popularize PWM "dead zone" for everyone.   Simple explanation of "dead zone"   Usually, the ends of high-power motors, inverters, etc. are H-bridges or 3-phase bridges composed of high-power tubes, IGBTs and
[Microcontroller]
PWM breathing light based on stm32
The hardware involved in this section of the program is relatively simple, mainly to examine the application of the stm32 clock I will not say much about the principles. The reference books are:  "STM32 Library Development Practical Guide" by Liu Huoliang and Yang Sen  "STM32 Development Guide (Library Function Versio
[Microcontroller]
PWM breathing light based on stm32
Design of equal-precision frequency measurement based on STM32 and CPLD
In electronic engineering, resource exploration, instrumentation and other related applications, frequency measurement is one of the most basic and common measurements in electronic measurement technology, and frequency meter is also an indispensable measurement tool for engineering technicians. However, traditional
[Industrial Control]
Design of equal-precision frequency measurement based on STM32 and CPLD
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号