完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有一个项目,我试图使用一个中断触发PWM控制板上的LED配置和输出的结果。我已经附上我的项目作为一个zip,并希望得到一些建议,对我做的不正确。这里要查看的主要文件是MIN、MCM0P.C和LITCHealth.C(我不怀疑头文件是我的问题的来源)。
我已经咨询了一些PSoC 6的经验,我收到的反馈是这个代码应该很好。我的问题是,在运行代码后,LED根本不闪烁。 我在这里漏掉什么东西吗?任何和所有的建议将不胜感激! 邮政编码 6.9兆字节 以上来自于百度翻译 以下为原文 I have a project where I am trying to use an interrupt-triggered PWM which controls the configuration of the onboard LED and output the results. I have attached my project as a .zip and was hoping for some advice as to what I am doing incorrectly? The main files to look at here are main_cm0p.c and LightControl.c (I don't suspect that the header files are the source of my issues) I have consulted others with some PSoC 6 experience, and the feedback I received was that this code should work fine. My issue is that after running the code, the LED does not even flash at all. Am I missing something here? Any and all advice would be greatly appreciated!
|
|
相关推荐
6个回答
|
|
光定时器组件的中断源未配置为溢出/下溢。
鲍勃 以上来自于百度翻译 以下为原文 The interrupt source of the LightTimer component is not configured for Overflow/Underflow. Bob |
|
|
|
我配置了中断源,用于溢出/下溢,没有任何变化。 以上来自于百度翻译 以下为原文 I configured the interrupt source for Overflow/Underflow, nothing changed. |
|
|
|
你禁用光计时器,我找不到你再次启用它的地方。 鲍勃 以上来自于百度翻译 以下为原文 You disable the lighttimer and I cannot find a place where you enable it again. Bob |
|
|
|
我的道歉,应该有一行代码下面的线190在光控制。 LimTimeListSistar(); 然而,补充说,这仍然不能解决这个问题。 以上来自于百度翻译 以下为原文 My apologies, there should be a line of code underneath line 190 in LightControl.c: LightTimer_Start(); However, adding that still does not solve the issue |
|
|
|
你肯定190号线会到达吗???? 鲍勃 以上来自于百度翻译 以下为原文 Are you sure that line 190 will ever be reached??? Bob |
|
|
|
我已经调试了这个项目,发现以下问题:
在LimeTime'中没有选择“中断源”,这会导致LtimTimeHunter从不触发。 -线α178(LightControl .c):如果(循环=0和&和;NeNyOrrult≫0)从未达到,则导致PWM A/B/C从未启动。 注释行:ListOutPuthAtSeCuBase0(0)和ListOutPutsBuxStCuBrase0(0)和ListOutPcCuStCabaseR0(0) 在光控制In()中,然后RGB LED被点亮。 请检查您的代码逻辑并做出相应的修改。 以上来自于百度翻译 以下为原文 I have debugged this project, and found below issue: --'Interrupt Source' in LightTimer is not selected, this causes LightTimerHandler never triggered. --line#178(LightControl.c): if(cycles == 0 && new_cycles > 0) never reached, this cause PWM A/B/C never started. --comment lines :LightOutputA_SetCompare0(0) & LightOutputB_SetCompare0(0) & LightOutputC_SetCompare0(0) in LightControl_Init(), and then RGB LED is lighted. Please check your code logic and make proper modifying accordingly. |
|
|
|
只有小组成员才能发言,加入小组>>
727个成员聚集在这个小组
加入小组1939 浏览 1 评论
1686 浏览 1 评论
3453 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1612 浏览 6 评论
1407 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-7-2 14:12 , Processed in 0.902222 second(s), Total 86, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191