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. mongoexport导出csv中文乱码

    在用mongoexport导出csv文件时,发现数据库中的中文在excel中都显示为乱码,用notepad打开则正常. 解决办法: 在notepad中,将编码格式改为UTF-8,保存,再用excel打 ...

  2. redhat本地yum源配置

    /dev/sr0是光驱的设备名,/dev/cdrom代表光驱 /dev/sr0 与/dev/cdrom /dev/cdrom 只是一个到sr0的符号链接 mount /dev/sr0   /mnt   ...

  3. 从xtrabackup备份恢复单表【转】

    目前对MySQL比较流行的备份方式有两种,一种上是使用自带的mysqldump,另一种是xtrabackup,对于数据时大的环境,普遍使用了xtrabackup+binlog进行全量或者增量备份,那么 ...

  4. linux通过sendmail发送邮件

    安装sendmail: [root@li676-235 ~]# yum install sendmail 安装好后执行. [root@li676-235 ~]# /etc/init.d/sendmai ...

  5. InteliJ IDEA 简单使用:配置项目所需jdk

    1:配置项目所需jdk: File->Project Structure 弹出如下界面: 首先选中SDKs,会出现下图界面:点击“+”标志弹出Add New SDK 然后选择JDK,会弹出路径框 ...

  6. Ubuntu+Nginx+uWSGI+Flask应用

    Ubuntu 18.04,Nginx 1.14.0,uWSGI 2.0.17.1,Flask 1.0.2,Python 3.6.5, 多日未更新博客,就是在忙着把自己的Flask应用在Ubuntu上运 ...

  7. iOS仿安卓手势解锁

    界面是一个九宫格的布局.九宫格实现思路. 先确定有多少列 cloum = 3; 计算出每列之间的距离 计算为: CGFloat margin = (当前View的宽度 - 列数 * 按钮的宽度) / ...

  8. Java编程的逻辑 (27) - 剖析包装类 (中)

    ​本系列文章经补充和完善,已修订整理成书<Java编程的逻辑>,由机械工业出版社华章分社出版,于2018年1月上市热销,读者好评如潮!各大网店和书店有售,欢迎购买,京东自营链接:http: ...

  9. MySQL JOIN原理

    先看一下实验的两张表: 表comments,总行数28856 表comments_for,总行数57,comments_id是有索引的,ID列为主键. 以上两张表是我们测试的基础,然后看一下索引,co ...

  10. asserts文件存到外部SD卡里

    package com.example.wang.testapp3; import android.content.res.AssetManager; import android.graphics. ...