GithubHelp home page GithubHelp logo

idrnyu / stm32-uart-dma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prry/stm32-uart-dma

0.0 0.0 0.0 45.09 MB

STM32串口DMA模式发送&接收实现,高速串口通信(1.5Mbps)不丢数据

C++ 0.11% Python 0.01% C 95.76% Assembly 4.03% PowerShell 0.01% HTML 0.07% CMake 0.02% Batchfile 0.01%

stm32-uart-dma's Introduction

STM32高速串口通信DMA收发实现


测试平台

平台 主频 BSP库 串口
STM32F030C8T6 48MHz 标准库 UART1、UART2
STM32F103ZET6 72MHz 标准库 UART1、UART2
STM32H743XIH6 400MHz HAL/LL库 UART5
STM32F407VCT6 168MHz HAL/LL库 UART1

实现功能

  • 收/发环形缓冲区
  • 不定长度接收处理
  • 高速(1.5Mbps)通信不丢数据

关键实现

DMA发送模式

  • 线程循环查询发送环形缓冲区数据,然后启动MDA传输

  • DMA传输完成中断,连续发送

  • 定时器中断周期发送


DMA接收模式

  • DMA缓存半满中断(如CPU硬件支持,可使用DMA双缓存机制)
  • DMA缓存传输完成中断
  • 串口空闲中断实现

其他

更详细的描述过程参考文章一个严谨的STM32串口DMA发送&接收(1.5Mbps波特率)机制

stm32-uart-dma's People

Contributors

prry avatar yoyoyes1983 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.