完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我想用DMA来控制一些GPIO的状态。软件应将数组的条目写入PGPDO [0]寄存器。在那种情况下,我写了一个小的演示程序。 outputArray是uint16_t,包含256个元素。每个元素代表8个GPIO引脚的状态。软件应将这些元素循环写入PGPDO [0]寄存器,但它不起作用。配置看起来像这样: 当我希望DMA传输尽可能快地连续运行时,有人能告诉我在配置中需要更改的内容吗? 最好的祝福, 帕特里克 以上来自于谷歌翻译 以下为原文 Hello, I would like to use DMA to control the states of some GPIOs. The software should write the entries of an array to the PGPDO[0] register. For that case, I wrote a small demo program. The outputArray is uint16_t and contains 256 elements. Each element stands for a state of 8 GPIO pins. The software should write these elements circular to the PGPDO[0] register, but it doesn´t work. The configuration looks like that:
Can anybody tell me what I have to change in my configuration when I want the DMA transfer to run continuously as fast as possible? Best regards, Patrik |
|
相关推荐
1个回答
|
|
你好,
我发现了这个问题。我认为这是错误的通道配置和DMA_MUX配置的组合。以下代码使我可以将数组元素连续传输到PGPDO端口。 DAC2Table包含128个16位元素。 我还能够使用PIT和触发功能触发数组元素的传输。不过,我在理解如何将DMA与其他模块一起使用时又遇到了一些问题。 从参考手册中获取详细信息真的很难,而且我没有找到关于这个主题的SPC56EL的任何应用笔记。 在DMA_MUX部分,我看到了使用eTimer模块作为DMA源的可能性。表173显示了eTimer_0的两个源 - Channel0和Channel1。但是,这是什么意思?什么样的请求将eTimer连接到DMA?它们是关于捕获和比较寄存器的吗?我如何将eTimer与DMA结合使用? 我想要做的是在eTimer生成比较事件时触发数组元素的传输。 eTimer应该从比较加载寄存器重新加载新的比较值,然后由DMA更新。 最好的祝福, 帕特里克 以上来自于谷歌翻译 以下为原文 Hello, I have found the problem. I think it was a combination of wrong channel config and DMA_MUX config. The following code gives me a continuous transfer of the array elements to the PGPDO port. The DAC2Table contains 128 16bit elemements.
I was also able to trigger the transfer of an array element using PIT and the triggered functionality. Nevertheless, I have again some problems in understanding how to use DMA with other modules. It is really hard to get detailed information out of the reference manual and I didn´t found any application notes for the SPC56EL regarding this topic. In DMA_MUX section, I saw the possibility to use the eTimer module as DMA source. Table 173 shows two sources for eTimer_0 - Channel0 and Channel1. But what does this mean? What kind of request connects the eTimer to DMA? Are they regarding to the capture and compare registers? And how do I use the eTimer in combination with DMA? What I want to do is to trigger the transfer of an array element when the eTimer produces a compare event. The eTimer should reload the load the new compare value from the compare load register, which should then be updated by DMA. Best regards, Patrik |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2634 浏览 1 评论
3208 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1783 浏览 1 评论
3609 浏览 6 评论
5987 浏览 21 评论
939浏览 4评论
1315浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
582浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1302浏览 3评论
1358浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 19:55 , Processed in 1.105601 second(s), Total 78, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号