基于STM32的多串口并行传输系统设计
DOI:
作者:
作者单位:

武汉纺织大学 数学与计算机学院,湖北大学

作者简介:

通讯作者:

中图分类号:

基金项目:

湖北省自然科学(2015CFB721)


Design of Multi-channel UART Parallel Transmission System based on STM32
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    针对工程控制系统中多串口并发通信的需求,设计了一种以STM32F429为核心的多串口并行传输系统。该系统充分利用了处理器内部的8个串口和网络接口资源,串口利用DMA方式在缓存中循环接收,解决了并发接收时查询或中断接收方式可能导致的数据帧丢失以及处理器时间占用较多的问题;针对不同的协议帧,采用了超时判断的方式,避免了一旦串口接收数据长度不正确后导致的后续接收问题;网络传输采用了lwIP协议栈。该设计实现了同时采集7路读卡信息,并通过1路串口或网络向上位机上传数据的功能,测试表明多串口并发传输无数据帧丢失现象。该系统无外接串口扩充电路,减小了整个电路的体积,提高了系统的可靠性和稳定性。

    Abstract:

    In order to meet the needs of multi-channel UART parallel communication in engineering application, this paper designed a multi-channel UART parallel transmission system based on STM32F429. The system makes full use of the eight UARTs and network interfaces inside the processor, DMA is used to receive UART data in a circular buffer, and this solves the problem of data frame loss and processor occupation time caused by querying or interrupting mode in concurrent reception. For different protocol frames, the method of timeout judgement is adopted to avoid subsequent reception problems once the UART receives incorrect data length. The lwIP protocol stack is used for network transmission. The design realizes the simultaneous acquisition seven channels card number and uploads data to the host computer through an UART or a network port, the test shows that there is no data frame loss during the transmission of the system. The system has no external UART circuit, which reduces the volume of the whole circuit and improves the reliability and stability of the system.

    参考文献
    相似文献
    引证文献
引用本文

陈旭辉,杨红云.基于STM32的多串口并行传输系统设计计算机测量与控制[J].,2019,27(1):166-170.

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2018-06-09
  • 最后修改日期:2018-07-04
  • 录用日期:2018-07-04
  • 在线发布日期: 2019-01-25
  • 出版日期: