当前位置:网站首页>Understanding of smt32h7 series DMA and DMAMUX
Understanding of smt32h7 series DMA and DMAMUX
2022-07-05 09:24:00 【Ruoshui thousand points】
DMA and DMAMUX
DMA: nothing CPU The controller that directly carries out data handling under the participation
DMAMUX: establish DMA Request and DMA Mapping relationship between channels , Functions similar to routing . nothing DMAMUX Of MCU,DMA Request and DMA The mapping relationship of channels is fixed , Cannot be modified by software . With DMAMUX Can be DMA Request and DMA Channels are linked by software , Implement custom links .
With STM32H743 For example :
DMAMUX1:DMAMUX1_Channel0-15 Corresponding DMA1_Stream0-7 and DMA2_Stream0-7.
DMAMUX2:DMAMUX2_Channel0-7 Corresponding BDMA_Channel0-7.
See the figure below for details , Understanding is for reference only .

Example of trigger generator
1. For example, external interrupt EXTI Trigger memory to memory / Peripheral DMA request
nothing DMAMUX Under the circumstances : because EXTI There is no such thing as DMA request , but EXTI To trigger DMA Only in EXTI Start in interrupt DMA, Configure memory to memory / Peripheral DMA after , And then again EXTI Start in interrupt DMA.
Yes DMAMUX Under the circumstances : Trigger signal HAL_DMAMUX1_REQ_GEN_EXTI0 And signal generator DMA_REQUEST_GENERATORx Correlation is equivalent to EXTI0 Possess DMA request , And then configure it DMA Transmission channel , Good configuration EXTI0,EXTI0 Can trigger DMA Realization DMA Transmitted . There may be MCU Have done well EXTI Edge signal and DMA Start the Association , Otherwise, I'll be with you EXTI Start in interrupt DMA What's the difference .( guess , Never used )
2. such as GPIO Trigger DMA Request to implement memory to GPIO Data transmission of
nothing DMAMUX Under the circumstances :GPIO There is no such thing as DMA request , To realize memory to GPIO Of DMA The transmission needs to borrow one DMA request , I used TIM_UP Of DMA request ( Of course, other signals can also be used , As long as it can produce DMA Just ask ), And then in DMA In the configuration, according to the memory to peripheral DMA Just configure it , I can use this to output a fixed waveform signal , The signal CLK and TIM The cycle is consistent , If this waveform wants to appear periodically, you can use another timer , Enable in timer interrupt DMA.
It is essentially a peripheral 1-> Memory -> peripherals 2 The transmission of , peripherals 1 Yes DMA request , peripherals 2 No, DMA request , Using peripherals 1 Request to do peripherals 2 Things about .
Yes DMAMUX Under the circumstances : Trigger signal HAL_DMAMUX1_REQ_GEN_LPTIM1_OUT And signal generator DMA_REQUEST_GENERATORx Generated by Association DMA Request to be used as GPIO Of DMA request , Then configure DMA Transmission channel , To configure LPTIM Timer , Start up DMA after ,LPTIM Each time the timer is generated 1 individual DMA request , send out 1 Data . If DMA If it is a circular mode, it will be based on NDTR Circular transmission , If it is normal mode NDTR After the pass DMA Automatically shut down .
Example of synchronous generator
The synchronization signal is mainly used for periodic starting DMA
1. Regular serial port DMA send data
nothing DMAMUX The situation of : There are serial ports DMA request , There is no need to trigger the generator , Request and directly through peripherals DMA Transmission channel Association , But I want to send serial data regularly , You need to start the serial port in a timer interrupt DMA send out .
Yes DMAMUX The situation of : Start with serial port peripherals and DMA Association of transmission channels , Then select the synchronization signal HAL_DMAMUX1_SYNC_LPTIM1_OUT relation DMAMUX, To configure LPTIM Realize the cycle to send a synchronization signal to start DMA.
The synchronization signal is used to start DMA Of , No DMA Request ,DMA The request comes from the serial port .
Focus on understanding :
1. Trigger signal and synchronization signal are fixed 

2. Understand trigger signals HAL_DMAMUX1_REQ_GEN_LPTIM1_OUT and HAL_DMAMUX1_SYNC_LPTIM1_OUT The difference applied in the two projects .
The trigger signal is equivalent to DMA Request signal , The synchronization signal is equivalent to DMA Start signal .
Trigger signals are mostly used for peripherals 1-> Memory -> peripherals 2 The type of , Synchronization signals are mostly used in memory -> Periodic startup in peripheral DMA The situation of .
In trigger signal HAL_DMAMUX1_REQ_GEN_LPTIM1_OUT Next , Each trigger signal causes a DMA request , And one timer DMA Only one request can be transmitted DMA Data blocks .
In the synchronization signal HAL_DMAMUX1_SYNC_LPTIM1_OUT Next , One synchronization signal starts once DMA,DMA The data of the set length will be transmitted , Instead of a single block .
Just understand , Not too much validation .
边栏推荐
- Codeforces Round #648 (Div. 2) D. Solve The Maze
- 【阅读笔记】图对比学习 GNN+CL
- L'information et l'entropie, tout ce que vous voulez savoir est ici.
- Solution to the problem of the 10th Programming Competition (synchronized competition) of Harbin University of technology "Colin Minglun Cup"
- np.allclose
- Thermometer based on STM32 single chip microcomputer (with face detection)
- [reading notes] Figure comparative learning gnn+cl
- Nips2021 | new SOTA for node classification beyond graphcl, gnn+ comparative learning
- Unity SKFramework框架(二十三)、MiniMap 小地图工具
- [beauty of algebra] solution method of linear equations ax=0
猜你喜欢

一文详解图对比学习(GNN+CL)的一般流程和最新研究趋势
![[code practice] [stereo matching series] Classic ad census: (4) cross domain cost aggregation](/img/d8/7291a5b14160600ba73810e6dd1eb5.jpg)
[code practice] [stereo matching series] Classic ad census: (4) cross domain cost aggregation
![[beauty of algebra] singular value decomposition (SVD) and its application to linear least squares solution ax=b](/img/ee/8e07e2dd89bed63ff44400fe1864a9.jpg)
[beauty of algebra] singular value decomposition (SVD) and its application to linear least squares solution ax=b
![[ctfhub] Title cookie:hello guest only admin can get flag. (cookie spoofing, authentication, forgery)](/img/78/d9d1a66fc239e7c62de1fce426d30d.jpg)
[ctfhub] Title cookie:hello guest only admin can get flag. (cookie spoofing, authentication, forgery)

c语言指针深入理解

nodejs_ 01_ fs. readFile

嗨 FUN 一夏,与 StarRocks 一起玩转 SQL Planner!

图神经网络+对比学习,下一步去哪?

Huber Loss

C language - input array two-dimensional array a from the keyboard, and put 3 in a × 5. The elements in the third column of the matrix are moved to the left to the 0 column, and the element rows in ea
随机推荐
阿里云发送短信验证码
交通运输部、教育部:广泛开展水上交通安全宣传和防溺水安全提醒
Solution to the problems of the 17th Zhejiang University City College Program Design Competition (synchronized competition)
VS Code问题:长行的长度可通过 “editor.maxTokenizationLineLength“ 进行配置
Codeworks round 681 (Div. 2) supplement
Information and entropy, all you want to know is here
Introduction Guide to stereo vision (5): dual camera calibration [no more collection, I charge ~]
Nips2021 | new SOTA for node classification beyond graphcl, gnn+ comparative learning
C language - input array two-dimensional array a from the keyboard, and put 3 in a × 5. The elements in the third column of the matrix are moved to the left to the 0 column, and the element rows in ea
nodejs_ fs. writeFile
Kotlin introductory notes (VII) data class and singleton class
Introduction Guide to stereo vision (2): key matrix (essential matrix, basic matrix, homography matrix)
Applet (use of NPM package)
Greendao reported an error in qigsaw, could not init daoconfig
Introduction Guide to stereo vision (6): level constraints and polar correction of fusiello method
Codeforces Round #648 (Div. 2) D. Solve The Maze
【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
Unity SKFramework框架(二十四)、Avatar Controller 第三人称控制
Rebuild my 3D world [open source] [serialization-2]
[ctfhub] Title cookie:hello guest only admin can get flag. (cookie spoofing, authentication, forgery)