当前位置:网站首页>DMA/DMA2D concept
DMA/DMA2D concept
2022-08-06 17:38:00 【Yuule】
目录
(1条消息) 【STM32】 DMA原理,步骤超细详解,一文看懂DMA_Z小旋的博客-CSDN博客_dma stm32
对DMAAn understanding of how requests are made_pangyinglong的博客-CSDN博客_dma请求
【STM32】STM32之深入理解DMA - 知乎 (zhihu.com)
正点原子资料F429资料:提取码: bxkk
DMA
直接存储区访问,DMA控制器独立于内核,概念上与CPU同级.
DMA-系统框图

是否使用DMA的区别
以STM32为例,将ADCTransfer the collected data toSRAM
否:若不使用DMA,MCUTo transmit data to the kernel for transit.as the kernel passesDcode获取AHB存储的外设ADC数据,然后通过Dcode把数据放到SRAM.
是:外设对DMA controller发出请求,controllerreceive requests and trigger jobs fromAHB外设获取ADC数据存储到DMA通道,随后通过AHB总线把ADC数据放入SRAM
DMA工作方式分类
Transmission direction angle
有P2M,M2P,M2M三种传输模式.PPeripheral-specific data registers,MIn particularSRAM/FLASH,external memory etc..
P2M,Transfer peripheral register data to the specified memory space.continuous high frequencyADC采集.
M2P,Transfer the contents of a specific memory area to the data register of the peripheral.
M2M,Move from one store to another.
Transmission behavior angle
Has direct mode、FIFO模式、单次/循环模式、双缓冲区模式.
直接模式,P2M,每完成1times from peripheral toFIFO的数据传输后,The corresponding data is immediately shifted out and stored at the destination address. M2P,Once data flow is enabled,DMAThe first data loading and transportFIFO,Once the peripheral requests data transfer,DMATransfer the loaded value to the target,然后依次循环.预装载的数据大小为PSIZE(外设数据大小).
FIFO模式,可以设置FIFO阈值.以STM32F4为例,1/4The full depth is one word, i.e.4字节.full of4word is16字节.When the data storage reaches the threshold,will be removed.The advantage is lessDMAReduce bus access contention for memory accesses,通过BURSTPacket transmission optimization transmission bandwidth increase performance chip.通过对SRC/DSTThe data for packing or unpacking to adapt to the width of different data access requirements,让DMA的使用更为方便灵活.
STM32带FIFO的DMATransfer application example (stmicroelectronics.cn)
注1:在STM32F4中,若将FIFO阈值设置为4字节,then introducedDMA BURSTTransmission or beat transmission.即4Data is encapsulated into a byte1组/1个burst/1节.在1Section-by-section data transfer,此时DMABus occupancy will not be released or interrupted by the bus arbiter,To ensure the reliable completion of each section of data.
注2:区别于FIFO阈值的burst传输,Transmission can be directly by setting the destination end byte width/半字/字的格式,in the ordinary way1/2/4Bytes of data are transferred directly to the destination.
注3:Double buffer mode enables bidirectional operation.
module design angle
with burst transmission,周期挪用,透明传输模式.
突发传输模式burst mode,停止CPU访问内存.由DMA控制器发一个停止信号给CPU,要求CPUrelinquish access to the data bus.DMA控制器获得总线控制权后,进行数据传输,Interrupt notification when doneCPU.Suitable for high transfer rate devices.
Cycle stealing modecycle stealing mode.当外设I/O设备无DMA请求,CPUNormal access memory.一旦有请求,由I/O设备挪用一个或几个内存周期.较好实现了IO传输,Better use of memory andCPU的效率.
透明传输模式transparent mode,时分复用.Efficient way of working,硬件逻辑复杂.
学习过程中的疑问
1、DMA controller how to get peripheralsDMARequests and how peripherals make them?
DMARequests related registers from peripherals,如数据寄存器,Save the working state of peripherals,In to conform to the conditionsDMA发出请求,Because of the memory asMClient can't send out the request,所以在EN后,data stream will fillFIFO直到.
以STM32的DMA为例,有两种工作模式,i.e. single shot and cyclic mode.单次模式,通过使能DMAENdata replication,until the remaining transfer data is0.循环模式,Not every chip has,Some domestic chips do not have a cyclic configuration function,as agileMM32芯片.National Core'sCCM420xSeries no circulation patterns,However, the multi-block transmission function is realized in another linked list transmission method..
在DMA传输方式中M2M,Can be done without peripheral requests.DMA使能启动DMA通道时,Transmission starts now.且M2MAnd circulation mode cannot be used at the same time.
2、How to know the length of the data transfer?
Usually startsDMAConfigure before transferDMA相关寄存器.
3、DMA的FIFOHow to transfer the next set of data and not after the expiration of the lost data?
STM32F4的DMA有FIFO深度设置.For such as setting depth16 byte,传输数据为20 byte,then the first transmission will transmit16 byte,第二次传输4 byte
DMA2D
STM32 DMA2D技术_This blog has not yet taken off-CSDN博客_dma2d stm32
具有DMA的功能,此外有1颜色填充(寄存器到存储器)、2图像复制(存储器到存储器)、3颜色格式转换(YCbCr转RGB格式等)、4Transparency Blending.
注:12for memory operations,34speed up operations.其中34可以和2一起进行,灵活.
DMA2D框图
DMA2D主要分为FIFO,PFC(Pixel Format Convertor)And the mixer,Here the structure is something likeLCDThe image processing unit structure.

FIFO: 64*32大小的缓冲区.FG/BG FIFOSeparately used to buffer the foreground layer&Background layer data.AHBThe master device generally points toSDRAM,使用SDRAM的部分空间作为显存.
OUT FIFO输出经过PFCThe resulting pixel after conversion.
PFC:FG/BG PFC是两个像素格式转换器,将FIFOConvert the data source format to word(32bits)格式,ARGB8888.picture α 表示透明度,经过PFC扩展成 8 bits格式.CLUT(Color Lookup Table),使用256*32空间缓存256种颜色,颜色格式ARGB8888或RGB888.
OUT PFCChange the pixel format from32bitsConvert to the specified output format,可在OPFCCR->CM[2:0]字段定义.
混合器:mixed in pairs SRC像素,Calculate the resulting pixels.

注:商向下取整.
DMA2D应用方式
具体可见《STM32F4xx中文参考手册-扩展章节》P11.3.11DMA2D配置
寄存器到存储器
Used to fill user-defined areas with predefined colors.
存储器到存储器
Does not perform any image data conversion.前景层FIFO充当缓冲区,从SRCStorage unit transfer to the target storage unit.
存储器到存储器&PFC
对SRCdata perform pixel format conversion and store the result inDST存储单元.
存储器到存储器&PFC&混合
将从FG/BG FIFO获取两个SRC图像,通过相应的PFC转换成32bitsMix according to the mixer formula,and write the resulting pixel encoding of the outputDST存储单元.
边栏推荐
- win7强制恢复出厂设置 win7怎么格式化电脑恢复出厂设置
- bluetooth peripheral device can not find the driver how to do bluetooth peripheral device no driver
- 基于 OPLG 从 0 到 1 构建统一可观测平台实践
- 国内首个聚焦制造行业的BI白皮书来了!
- win7后缀名隐藏了怎么打开 win7文件怎么显示后缀名
- 键盘突然失灵怎么回事灯还亮着 键盘失灵但是灯是亮的
- 优秀的软件测试工程师是怎样练成的?
- 笔记本win11怎么退回win10(适用联想、华为、小米、戴尔)
- 2020最新office产品密钥永久激活码_office激活密钥永久key免费(附激活方法)
- 百度搜索排名:三板斧,有哪些?
猜你喜欢

王学岗——————H265实现低延时投屏,从零实现高清无损投屏

Flyway error source code analysis - Validate failed: Migrations have failed validation

win7蓝牙怎么开启 电脑蓝牙在哪里打开win7

Commonly used CMD commands

电容器选型指南-电子元器件选型指导系列

王学岗——钉钉视频会议实战,从零手写音视频会议项目

系统提示无法保存打印机设置0x000006d9怎么解决(win7win10通用)

Live-Charts在WPF中的使用

Windows 7 input method is missing how to adjust out Windows 7 input method icon is missing

win7怎么打开无线投屏功能 win7投屏到电视机
随机推荐
2022年华数杯资料汇总
为什么企业不愿意升级ERP系统
C专家编程 第7章 对内存的思考 7.7 总线错误
win7无线网络列表显示不出来 win7网络连接图标不见了怎么办
php ini sets session expiration time
win7升级win10数据会丢失吗 win7升级win10怎么备份数据
【JS 逆向百例】某网站加速乐 Cookie 混淆逆向详解
`英语` 2022/8/3
电脑蓝屏的修复方法 电脑蓝屏退不出去怎么办
IPv6 实用教程
win7旗舰版强行删除开机密码 win7开机密码忘了怎么解除
What does the 0x0000001a blue screen code mean? How to solve the 0x0000001a blue screen code
2022 华数杯 C 题 插层熔喷非织造材料的性能控制研究
Windows 7 how to set the screen do not close dormant Windows 7 dormancy function
win7无法进入系统和安全模式 win7系统崩溃进不了安全模式
bonjour是什么软件 bonjour可以卸载吗
【client-go】源码分析目录
二极管选型指南
PCB做SET连片,转批量时发现利用率非常低,有遇到过吗?
Will win7 upgrade win10 data loss?