登录
首页 » 嵌入式系统 » stm32 串口程序

stm32 串口程序

于 2022-03-15 发布 文件大小:1.42 MB
0 240
下载积分: 2 下载次数: 1

代码说明:

STM32的串口是相当丰富的,功能也很强劲。最多可提供5路串口(MiniSTM32使用的是STM32F103RBT6,具有3个串口),有分数波特率发生器、支持单线光通信和半双工单线通讯、支持LIN、智能卡协议和IrDASIR ENDEC规范(仅串口3支持)、具有DMA等。 串口最基本的设置,就是波特率的设置。STM32的串口使用起来还是蛮简单的,只要你开启了串口时钟,并设置相应IO口的模式,然后配置一下波特率,数据位长度,奇偶校验位等信息,就可以使用了。下面,我们就简单介绍下这几个与串口基本配置直接相关的寄存器。1,串口时钟使能。串口作为STM32的一个外设,其时钟由外设时钟使能寄存器控制,这里我们使用的串口1是在APB2ENR寄存器的第14位。APB2ENR寄存器在之前已经介绍过了,这里不再介绍。只是说明一点,就是除了串口1的时钟使能在APB2ENR寄存器,其他串口的时钟使能位都在APB1ENR。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • This procedure for the experiment board' s overall test program, a comprehens...
    本程序为实验板的总体测试程序,综合测试了整个实验板上的绝大多数功能,下载程序后会依次看到以下5种状态。 1.8个流水灯先会从上到下流动一遍,同时蜂鸣器发声。 2.接着DAC电流指示灯由暗变亮 3.接着前三位数码管显示温度值 4.接着AD数值显示在数码管的前三位 5.接着等待矩阵键盘的按下,按下后相应的数码显示在数码管的后三位上-This procedure for the experiment board" s overall test program, a comprehensive test of the vast majority of the entire experiment on-board features, download the program will in turn see the following five kinds of states. 1.8 water lights will first flow from top to bottom again, at the same time buzzer sound. 2. And then DAC current indicator light changes from the dark 3. And then the top three LED display temperature 4. And then AD values displayed in the top three digital tube 5. And then wait for the keyboard matrix is pressed, press the corresponding post- digital display in the digital control on the latter three
    2023-08-29 01:00:04下载
    积分:1
  • 介绍了如何来构件
    介绍了如何来构件嵌入式系统-introduces how to embedded system components
    2022-01-23 11:13:20下载
    积分:1
  • 一个不错的需求分析实例!希望对大家有帮助
    一个不错的需求分析实例!希望对大家有帮助-A good example of the needs analysis! Hope everyone has to help
    2022-12-23 08:50:02下载
    积分:1
  • NEC实现电机控制的芯片资料,包括步进电机和直流电机都可以控制,资料是中文的。...
    NEC实现电机控制的芯片资料,包括步进电机和直流电机都可以控制,资料是中文的。-NEC to achieve motor control chip, including stepper motors and DC machines can be controlled, the information is in Chinese.
    2022-10-20 03:25:03下载
    积分:1
  • InterBase
    嵌入式InterBase-Embedded InterBase
    2023-04-28 20:30:04下载
    积分:1
  • C8051F500 引导加载程序代码与 CAN 总线
    这是一个示例启动引导程序代码与 C8051F500 MCU 和罐头。使用此代码,您可以更新的固件 CAN 总线。
    2022-07-08 10:14:34下载
    积分:1
  • 的C和C++的电子书
    Programming Embedded Systems in C and C++ EBook
    2022-07-01 10:01:09下载
    积分:1
  • OV7670 + FIFO + Python测试中的应用
    应用背景OV7670是原来手机的摄像头芯片OmniVision公司。本fuyuno樱花建议包括缓冲区缓冲图像数据,加快数据传输。它是(或应该)比UCAM更快因为数据是由一个字节宽的转移并行端口。关键技术去哪弄一个?我发现一个易趣网这里很便宜(约£20),和有序的。几周后它得到了这里。它有一个20路头,我决定使用一些连接到标题的带状电缆。虽然可能不是最好的图片在世界上的摄像头和电缆可以看到下面…
    2022-08-18 11:49:03下载
    积分:1
  • 1702的资料,有助于了解其结构及使用方法。
    1702的资料,有助于了解其结构及使用方法。-1702 data, help to understand its structure and how to use.
    2022-12-09 14:00:03下载
    积分:1
  • 软件开发指南,uClinux到思创S3C44B0黄金开发板的移植。...
    嵌入式系统软件开发指南,uClinux到思创S3C44B0黄金开发板的移植。-Embedded System Software Development Guide, uClinux to think Chong S3C44B0 gold development board transplant.
    2023-04-16 03:45:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载