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. [转]CMake cache

    CMakeCache.txt 可以将其想象成一个配置文件(在Unix环境下,我们可以认为它等价于传递给configure的参数). CMakeLists.txt 中通过 set(... CACHE . ...

  2. IE 11 使用 flexbox 垂直居中 bug

    不要使用 min-height 改为 height 即可 caniuse: https://caniuse.com/#search=flexbox

  3. 第八集:魔法阵 NTT求循环卷积

    题目来源:http://www.fjutacm.com/Problem.jsp?pid=3283 题意:给两串长度为n的数组a和b,视为环,a和b可以在任意位置开始互相匹配得到这个函数的值,求这个函数 ...

  4. PCA和白化练习之处理二维数据

    在很多情况下,我们要处理的数据的维度很高,需要提取主要的特征进行分析这就是PCA(主成分分析),白化是为了减少各个特征之间的冗余,因为在许多自然数据中,各个特征之间往往存在着一种关联,为了减少特征之间 ...

  5. linux中Shell标准输出错误 >/dev/null 2>&1 分析【转】

    Shell中可能经常能看到:>/dev/null  2>&1 eg:sudo kill -9 `ps -elf |grep -v grep|grep $1|awk '{print ...

  6. 通过 EXPLAIN 分析低效 SQL 的执行计划

    每个列的简单解释如下:  select_type:表示 SELECT 的类型,常见的取值有 SIMPLE(简单表,即不使用表连接 或者子查询).PRIMARY(主查询,即外层的查询).UNION(U ...

  7. Django Rest Framework-APIView源码分析

    class APIView(View): # The following policies may be set at either globally, or per-view. renderer_c ...

  8. 使用crontab命令添加计划任务

    Ubuntu 16.04, 计划任务 就是 有(时间)计划地执行(做)任务,有计划 包括 定时执行(在哪些时间点执行任务).按照周期执行(每隔多少时间执行任务). 那么,什么是任务呢?就是 自己想要干 ...

  9. JavaEE 学习框架

    JavaSE JavaWeb基础 ssh+hibernate+spring ssm+spring+mybatis 项目1 电商项目(项目二)

  10. LeetCode(19):删除链表的倒数第N个节点

    Medium! 题目描述: 给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点. 示例: 给定一个链表: 1->2->3->4->5, 和 n = 2. 当删除了 ...