Hello,
I'm working with a STM32F407 controller board.
 
Right now, I want to trigger a DMA transfer with one of the internal timers (TIM1).
 
The DMA transfer should read one gpio port and put it into the memory.
 
The timer is configured in PWM mode and should trigger the DMA transfer
 
on "update" (counter value is reset to 0) and on "compare" (output pin is toggled). 
 
I haven't tested this configuration right now, but as far as I read in the manual
 
both events (update and compare) should be able to start the DMA transfer.

My question is, what's the delay between requesting the DMA transfer

 
with the timer and reading the data from the port?
 
This is important for me, because the PWM signal of the timer clocks an external ADC
 
and the DMA transfer should copy the external ADC data into the internal memory.
 
The ADC data is available 6ns after the rising edge of the clock.
 
So, the DMA transfer must not start earlier than 6ns after getting triggered (6ns is one cpu clock).

Is there a good application note of how to setup a timer triggered DMA transfer?

Thanks a lot,
Andreas

 
It's probably rather indeterminate, the internal clock edge is going to occur ahead of anything exiting the package.
 
The delay between the clock, and DMA transfer, is going to depend on things
 
like bus contention, channel contention, pending writes, prefetches, slow accessed to peripheral buses, etc.

For tighter edge to transfer timings look at the FSMC or DCMI interfaces.

Input signals are also resynchronized, so different clocking speeds

 
will result in beating/modulation as they cross domains.
 
 
Thanks for your reply. DMA transfers seem to depend on a lot of conditions. 
It is intended to clock the CCD sensor and the ADCs with about 20 MHz.
 
This would result in at least to bytes from the ADCs every clock cycle (40MByte/s or 320MBit/s).
Would that transfer rate be possible with the DMA controller?

I will have a look at  FSMC and DCMI interfaces.

BTW, is it possible to give a upper bound for the delay between DMA request and transfer?

 
In my application the DMA transfer (copy one word to internal memory) must be completed within 25ns.
 
My gut says the potential latency is a lot higher than 25ns, a flash line access is of the order of 35 ns.
 
An APB access, in the order of 4 APB cycles, at whatever clock rate that's set too.
 
It would take a lot of time/effort to quantify.

You'd need a FIFO to manage latency and throughput.

 
You're looking for a more "Direct" memory access.

Timer triggered DMA transfer - Delay between requesting the DMA transfer的更多相关文章

  1. Data transfer from GPIO port to RAM buffer using DMA upon receiving a trigger signal on the timer capture input channel.

    Data transfer from GPIO port to RAM buffer using DMA upon receiving a trigger signal on the timer ca ...

  2. Timer-triggered memory-to-memory DMA transfer demonstrator

    http://www.efton.sk/STM32/bt.c // Timer-triggered memory-to-memory DMA transfer demonstrator for STM ...

  3. STM32 GPIO fast data transfer with DMA

    AN2548 -- 使用 STM32F101xx 和 STM32F103xx 的 DMA 控制器 DMA控制器 DMA是AMBA的先进高性能总线(AHB)上的设备,它有2个AHB端口: 一个是从端口, ...

  4. 利用ZYNQ SOC快速打开算法验证通路(4)——AXI DMA使用解析及环路测试

    一.AXI DMA介绍 本篇博文讲述AXI DMA的一些使用总结,硬件IP子系统搭建与SDK C代码封装参考米联客ZYNQ教程.若想让ZYNQ的PS与PL两部分高速数据传输,需要利用PS的HP(高性能 ...

  5. ASM:《X86汇编语言-从实模式到保护模式》越计卷:实模式下对DMA和Sound Blaster声卡的控制

    说实话越计卷作者用了16页(我还是删过的),来讲怎么控制声卡,其实真正归纳起来就那么几点. ★PART1:直接存储访问 1. 总线控制设备(bus master) 在硬件技术不发达的早期,处理器是最重 ...

  6. DMA Stream/Channel Outputting via GPIOC[0..7]

    Ok, so quickly mashing up another example using a different TIM, DMA Stream/Channel for illustration ...

  7. 第21章 DMA—直接存储区访问

    本章参考资料:<STM32F76xxx参考手册>DMA控制器章节. 学习本章时,配合<STM32F76xxx参考手册>DMA控制器章节一起阅读,效果会更佳,特别是涉及到寄存器说 ...

  8. 22、DMA驱动程序框架

    一.使用DMA的优点及DMA支持的请求源(请求源是启动DMA传输的事件,可以认为是触发.它可以是软件,也可以是中断,或者外部事件) 1.DMA优点是其进行数据传输时不需要CPU的干涉,可以大大提高CP ...

  9. 双轴按键摇杆控制器控制TFTLCD(使用ADC1双通道DMA传输)

    实验使用如下所示的双轴按键摇杆控制器,来控制TFTLCD上显示的直线.首先介绍一下双轴按键摇杆控制器.原理:十字摇杆为一个双向的10K电阻器,随着摇杆方向不同,抽头的阻值随着变化.本模块使用5V供电( ...

随机推荐

  1. 【转】把Git Repository建到U盘上去

    CHENYILONG Blog 把Git Repository建到U盘上去 转 把Git Repository建到U盘上去 Git很火.原因有三: 它是大神Linus Torvalds的作品,天然地具 ...

  2. [BZOJ 1013][JSOI 2008] 球形空间产生器sphere 题解(高斯消元)

    [BZOJ 1013][JSOI 2008] 球形空间产生器sphere Description 有一个球形空间产生器能够在n维空间中产生一个坚硬的球体.现在,你被困在了这个n维球体中,你只知道球 面 ...

  3. JS中字符串那些事~

    1:字符串 JS中的任何数据类型都可以当作对象来看.所以string既是基本数据类型,又是对象. 2:声明字符串 var sStr = ‘字符串’;(常用) var oStr = new String ...

  4. springMVC:将controller中数据传递到jsp页面

    1> 将方法的返回值该为ModelAndView在返回时,将数据存储在ModelAndView对象中如: newModelAndView("/WEBINF/jsp/showData.j ...

  5. .NetCore 中扩展ExceptionLess 实现链式方法添加操作日志

    在使用ExceptionLess添加日志的时候,发现还是有一些写法上的个人觉得不爽的地方,比如添加Info日志 ExceptionlessClient.Default.CreateLog(source ...

  6. window下的窗口事件-js

    window.onfocus = function(){ // 窗口获取焦点事件}; window.onblur= function(){ // 窗口失去焦点事件};有弊端,亲测. 所以我还有一个更好 ...

  7. 【AtCoder】ARC091

    C - Flip,Flip, and Flip...... 只有一个这一个是反面 只有一行那么除了两边以外都是反面 否则输出\((N - 2)*(M - 2)\) #include <bits/ ...

  8. pip 安装包提速

    豆瓣源 pip3 install 第三方库名 -i https://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com

  9. linux学习笔记-11.正则表达式

    1.cut截取以:分割保留第七段 grep hadoop /etc/passwd | cut -d: -f7 2.排序 du | sort -n 3.查询不包含hadoop的 grep -v hado ...

  10. 网络爬虫中Fiddler抓取PC端网页数据包与手机端APP数据包

    1 引言 在编写网络爬虫时,第一步(也是极为关键一步)就是对网络的请求(request)和回复(response)进行分析,寻找其中的规律,然后才能通过网络爬虫进行模拟.浏览器大多也自带有调试工具可以 ...