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

stm32 串口程序

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

代码说明:

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

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

发表评论

0 个回复

  • Using Lightweight IP with the Nios II Processor_nios2_lwip_tutorial,This tutoria...
    Using Lightweight IP with the Nios II Processor_nios2_lwip_tutorial,This tutorial familiarizes you with the lightweight IP (lwIP) TCP/IP software component included in your Nios II development kit.
    2022-09-24 11:45:03下载
    积分:1
  • AVR code to Read/write its own Flash/EEprom
    该程序允许具有引导加载程序功能的AVR读取/写入自己的Flash/EEprom。要进入编程模式,计算应用程序,如果不正确,则进入编程模式。否则,将从应用程序区域中的$0000“重置”向量执行正常执行。
    2023-09-04 15:25:03下载
    积分:1
  • dot
    lcd12864点阵液晶屏的测试代码,付有模块的说明文档。-dot-matrix LCD screen lcd12864 test code, payment modules have documentation.
    2022-04-07 15:37:51下载
    积分:1
  • code based on the experimental arm is S3C2410 Timer experiment. Run ok
    arm基础实验代码,是 s3c2410的定时器实验。运行ok-code based on the experimental arm is S3C2410 Timer experiment. Run ok
    2022-05-24 08:10:16下载
    积分:1
  • 利用I2C协议的EEPROM
    EEPROM using I2C Protocol-EEPROM using I2C Protocol..
    2022-08-08 01:02:05下载
    积分:1
  • motor speed by pwm this depon on that the pwm has t on and t off and t ther is a...
    motor speed by pwm this depon on that the pwm has t on and t off and t ther is a duty cycle that = ton / t this vary the average voltage across the motor-motor speed by pwm this depon on that the pwm has t on and t off and t ther is a duty cycle that = ton/t this vary the average voltage across the motor
    2023-03-29 21:50:03下载
    积分:1
  • DSP SCI modbus
    MODBUS代码,希望对各位有所帮助,共同进步-MODBUS code you want to help each other circulated in order to have progress
    2022-02-02 12:44:30下载
    积分:1
  • fat16 in compact flash
    fat16 in compact flash
    2022-07-25 13:24:19下载
    积分:1
  • 蓝牙LE嗅探器的API
    应用背景这是一个Windows版本的Sniffer应用API可用于蓝牙LE,它可以成为一个监听装置,API是使用标准的面向对象的方法,有一个很好的和干净的API。该代码可以是最小的努力和用于研发项目的跨平台。关键技术蓝牙轻版可以用于许多基于物联网的应用,具有很大的潜力,因为它的低功耗和良好的安全性。无论是物联网系统的主动和被动元件,它可以发挥好的作用,以便为一个复杂的物联网软件的情况下,要做
    2022-03-02 21:01:10下载
    积分:1
  • c51液晶程序,很好用的
    c51液晶程序,很好用的--Program for C51 LCD.
    2022-03-28 22:55:18下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载