完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨,你好!
我们正在经历一个非常奇怪的问题PSOC3。该装置似乎成功地去睡觉,然后醒来时,接收指定的GPIO脉冲。ISR连接到引脚然后火灾和成功执行(我们可以看到这一切在调试器)。在退出中断服务程序,程序进入一个未知的状态。我们发现,事实上,程序卡在里面的一个开关函数的情况下在主回路。的情况下,它会粘在虽然不是预期的情况。事实上,当我看到开关变量在调试器不相等的情况下,程序进入。我已经提供了我的一些代码和我的硬件设置帮助说明。我也指出,程序计数器跳竟然。 CypScase220312TXT.ZIP 844字节 以上来自于百度翻译 以下为原文 Hi again, We are experiencing a very strange problem with the PSoC3. The device appears to successfully go to sleep and then wake up when it receives a pulse on a designated GPIO. The ISR connected to that pin then fires and executes successfully (we can see all of this in the debugger). On exiting the ISR though, the program enters an unknown state. We have discovered that the program in fact gets stuck in a function inside a switch-case in the main loop. The case that it gets stuck in though is not the expected case. In fact when I view the switch variable in the debugger it is not equal to the case that the program has entered. I have provided some of my code and my hardware setup to help illustrate. I have also pointed out where the program counter jumps to unexpectedly.
|
|
相关推荐
3个回答
|
|
|
嗨,克里斯汀,
1)ISR中的任何一个都操纵变量“状态”的值吗? 2)在与PICU中断相关的ISR中做了什么?恢复ISR中的时钟似乎更直观。 3)当设备处于休眠模式时,关闭IMO。因此,在调试模式下运行该设备是不可能的。请验证芯片功能是否正常运行(如果不在“调试”模式下运行)。 以上来自于百度翻译 以下为原文 Hi kristen, 1) Does any of the ISR manipulate the value of the variable "state"? 2) What is done in the ISR associated with the PICU interrupt? Restoring the clocks in that ISR seems more intuitive. 3) When the device is in Sleep mode, the IMO is turned off. So, running the device in Debug mode is not possible while in sleep. Please verify if the chip functionality is as expected when it is run normally (without running in "Debug" mode). |
|
|
|
|
|
我看了一下附件的代码。虽然在这一点上我找不到确切的问题,但我建议你尝试以下几点。
我看到您在使用CypSaveCuxScript()API保存时钟后启用ISR并调用while循环。建议CyPmSleep()在节电后不久,不要做任何其他功能,因为所有的费时时钟都关闭,可能会导致不理想的结果。当部件醒来时,也会恢复时钟。 CyPultStasuSUE()不是必需的,因为部分没有从CTW事件中醒来。 尝试将所有组件唤醒API都放在中断例程之外(在主C中恢复时钟后立即写入) 从而利用ISR常规只有明确中断状态位/设置标志等。 如果可能的话,你可以将项目在这里让我可以重新审视其走错在哪里? 谢谢, SRIM 以上来自于百度翻译 以下为原文 I had a glance at the attached code. Although I could not find the exact issue at this point, I would suggest you to try the following things. I see that you are enabling the ISR and calling a while loop after saving clocks using CyPmSaveClocks() API. It is advisable to call CyPmSleep( ) soon after saving clocks and not to do any other functions as all the pheripheral clocks are off and could result in undesirable results. Also restore clocks as soon as the part wakes up. CyPmReadStatus() is not necessary as the part is not waking from a CTW event. Try keeping all component wake-up APIs outside the interrupt routine (writing soon after the restore clocks in main.c) and thereby using ISR rotine only to clear interrup status bits/ setting flag etc.. If possible, can you attach the project here so that I can relook where exactly its goin wrong? Thanks, SRIM |
|
|
|
|
|
我建议你把你的项目上传到这里,这样我们就可以完整地看到你的照片了。我们可以怀疑很少的事情,但我们不能没有根本原因没有你的完整项目。
以上来自于百度翻译 以下为原文 I would suggest you to upload your project here, so that we get a complete poicture of your picture. We can suspect few things but we can not zero in on the root cause without your complete project. |
|
|
|
|
只有小组成员才能发言,加入小组>>
786个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7088 浏览 0 评论
2477 浏览 1 评论
2166 浏览 1 评论
4031 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2074 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7567浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6114浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
742浏览 2评论
710浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
7962浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 12:44 , Processed in 0.634464 second(s), Total 76, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1413