完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
你好:
如何配置我的项目中的DMA?因为我想禁用 DMA传输一旦完成传输所需数据,我就设置一个 在我的.c进程中,DMADONYUG标志,但是当我构建进程时,我看不见 项目名称中的DMADNONG标志,禁用我的调试 处理? 以上来自于百度翻译 以下为原文 hello: How to configurate the DMA in my project? because i want to disable the DMA transmission once it finishes transferring the desired data,and i set a DMADone_flag in my main.c process,but when i build the process,i can't see the DMADone_flag in project name.mapdocument which disable my debug processing? |
|
相关推荐
9个回答
|
|
|
|
|
|
|
|
|
|
在前一篇文章中指出的应用注意应该有帮助。
以上来自于百度翻译 以下为原文 The app note that is pointed out in the previous post should help. |
|
|
|
亲爱的:
我知道应用注释在柏树的网站,我也研究了笔记引导我的设计!但我的问题是 dmadone_flag,我跟着工具DMA向导设置我的DMA组成部分,它在cysch配置。 文件,不幸的是,我没有得到正确的结果!期待老年工程师帮助我, 最好的问候! 多点触摸 2.2兆字节 以上来自于百度翻译 以下为原文 Dear: I konw the app notes in cypress website, and i also studied the notes to guide my design ! But my problem is the DMADone_flag, i followed the Tools-DMA Wizard to set my DMA component and also configured it in the .cysch document, and unfortunately, i could not get proper result! Expecting seniors engineer to help me, Best regards!
|
|
|
|
问题是出租人超出了范围。
您的标志只具有本地范围为主,并且在ISR1、C和ISRXDMAYOND.C中用相同的名称重新定义这些名称,这些名称与Ma.C中的名称相同,但它们不相同。 我认为您希望使用DMA标志作为全局。 所以,俞必须在两个旗号之前移动宣言。 前任 *** UTIN DMANOND FLAG1,DMADONY-FLAG2; 空主程序() { … } *** 也 声明 ExtutnIn 8DMADOONG旗, 和 外部Unt8 DMADONEαFLAG2; 和 删除ISR例程内的声明 R 在软件程序开始的时候。 *** 希望这有帮助 空主程序() 以上来自于百度翻译 以下为原文 The problem is the vaiables are out of scope. Your flags are only having local scope to main, and you re-declar those vaiable with the same name in ISR_1,c and ISR_DMA_done.c, those have the same name as that in main.c but they are not the SAME vaiable. I think you want to use the DMA flags as global So yuou have to move the declaration of the two flags before main.c EX ******* uint8 DMADone_flag1,DMADone_flag2; void main() { .... } ****** also declare extern uint8 DMADone_flag, and extern uint8 DMADone_flag2; AND remove those declaring inside the isr routines r at the begining of the software routines. **** Hope this help void main() |
|
|
|
查看代码——在代码中不设置DMADONSOL标志(既不1也不2)。我现在不能看你的硬件草图——你把ISR连接到DMA“NRQ”信号了吗?然后在ISR中设置标志。在您的主函数中,在启动DMataSfER之后,需要在一个循环内等待标志重新设置。
以上来自于百度翻译 以下为原文 Looking at the code - you don't set the DMADone_flag (neither 1 nor 2) in your code. I cannot look at your hardware sketch right now - did you connect an ISR to the DMA 'nrq' signal? Then just set the flags in your ISR. In your main function, you need to wait within a loop for the flags to be set again, after you have started the DMA transfer. |
|
|
|
抱歉打字
*** 也 声明 ExtutnIn 8DMADOONG旗, 和 外部Unt8 DMADONEαFLAG2; 在软件的外部,在模块的顶部 和 删除ISR例程内的声明 *** 以上来自于百度翻译 以下为原文 Sorry for the typos ***** also declare extern uint8 DMADone_flag, and extern uint8 DMADone_flag2; outside the software routines.at the top of the module AND remove those declaring inside the isr routines **************** |
|
|
|
在C语言中变量的基本操作是很容易理解的:变量被分配的时候都需要和破坏,当他们不再使用:
变量声明在任何函数的是一个所谓的全局变量,visiblke(skope)从声明点对整个程序。 变量声明在函数内部(main()是功能哦!)一种是所谓的局部变量,不仅是只在函数声明的地方可见,变量不存在只有在功能和破坏函数结束时。(这可能在8051实现C、不同但只有做代码效率,应该对编程风格的影响最小) 当一个全局变量是在函数声明的是,只有局部变量可以访问“隐藏”全球变种。 这是一个很好的(关键)的C语言在这里http://publications.gbdirect.co.uk/c_book/手册而经常帮助我。 希望这能澄清一些事情。 拥有美式X-MAS,希望你的代码永不失败 鲍勃 以上来自于百度翻译 以下为原文 The basic handling of variables in C are easy to understand: variables are allocated when they are needed and destroyed, when they are not used any more: A variable declared outside of any function is a so-called global variable and is visiblke (skope) from the point of declaration on throughout the program. A variable declared inside a function (main() is a function as well!) is a so-called local variable and not only is visible from the point of declaration within the function only, the variable does exist only within this function and is destroyed when the function ends. (This may differ in 8051-implementations of C, but only has to do with code-efficienty and should have minimal effects on programming-style) When a global variable is re-declared in a function, only the local variabe can be accessed so "hiding" the global var. There is a good (and critical) handbook for C-language here http://publications.gbdirect.co.uk/c_book/ which rather often helps me out. Hope this clarifys something. Have a merry x-mas and may your code never fail Bob |
|
|
|
谢谢你的回答,我可以通过你的建议解决这个问题!斯迈利
Andhope,祝你新年快乐。 以上来自于百度翻译 以下为原文 Thanks for you kindly reply,and i can solve the problem by you suggestion! smiley And hope you have a happy new year |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2071 浏览 1 评论
1827 浏览 1 评论
3642 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1762 浏览 6 评论
1513 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
511浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
362浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
410浏览 2评论
357浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
860浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 05:05 , Processed in 1.040987 second(s), Total 65, Slave 58 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号