完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
亲爱的论坛读者,
在调试模式下运行时,我一直在PSoC5和5LP系列部件上出现问题。我的问题是,当我有一个tiC ISR系统,每秒100000万次更新计数器。我想调试一个单独的不相关的代码段。所以我会设置一个断点,然后尝试单步通过我要检查的代码。我需要打开的中断才能进入这段代码。计数器计数,然后在计数器达到特定值后执行特定代码。所以我需要调试的代码。我将设置一个断点,代码执行停止。现在我想单步执行下一行代码,单击单步按钮,然后我在ISR中,而不是我想去的地方。好的,我会点击跳出按钮,然后我又回到ISR的开始。回到断点的唯一方法是点击播放按钮。在这一点上,我回到那里,我点击单步按钮,我在ISR再次。我希望部分/调试器有一种方式允许我在中断启用时使用单步模式。当我遇到一个断点时,内部时钟似乎并没有停止,调试器没有在我通过每一行代码时向处理器添加一个固定数量的时钟。C代码的每一条独特代码行都必须与X .ASM指令的Y系统时钟相等,而C是C的特定行中的指令。相反,我得到一个断点,调试器停止并显示我在哪里,但是处理器上的内部时钟继续运行时钟。时钟是从CyOnCH出来的示意区,这是绑在一个ISR。它与主控有同步。我应该使用另一种时钟吗?我知道我也可以关闭我的断点后,手动中断我的断点和重新启用它们,一旦我通过调试,但必须有一个更好的更清洁的方式来工作。 谢谢你的帮助!! 马特 以上来自于百度翻译 以下为原文 Dear Forum readers, I have been having an issue on the Psoc5, and 5lp series parts when running in debug mode. My problem is when I have a system tic isr that goes off at 1000-10000 times per second to update counters. I am wanting to debug a separate unrelated section of code. So ill set a break point and then attempt to single step through the code I want to inspect. I need the interrupts turned on to get into this section of code. Counter counts up and then executes specific code once counters reach a specific value. So I'm in the code I need to debug. I'll set a break point and the code execution stops. Now I want to single step to the next line of code, Click the single step button and then I am in the ISR and not where I want to be. Ok, I'll click the jump out button and then I'm at the beginning of the isr again. The only way to get back to the break point is to click the play button. At this point I'm back where I started and I click the single step button and I'm in the isr again. I am hoping the part/debugger has a way of allowing me to use the single step mode while the interrupts are enabled. It seems like the internal clocks are not stopping when I have hit a break point and the debugger is not adding a fixed number clocks to the processor as I step thru each line of code. Each unique line of c code with x .asm instructions should equal y system clocks based upon the instruction in that specific line of c. Instead I get to a break point and the debugger stops and shows me where I am but the internal clocks on the processor keep running the clocks. The clock is coming from the cy_clock out of the schematic area which is tied to a isr. It does have the sync with master checked. Should I be using another kind of clock? I know I can also turn off the global interrupts manually after I hit my break point and reenable them once I am through debugging, but there has got to be a better cleaner way for this to work. Thanks for the help!! Matt |
|
相关推荐
10个回答
|
|
是的,这个问题以前已经报道过,但恐怕不能得到纠正。
你所看到的行为的原因是硬件依赖的。记住:当到达断点时,只有程序执行停止,硬件仍在运行,可能会产生中断,此时中断服务。 当执行重新开始时(当然),中断处理,当处理完成后返回到断点集。所以看起来好像什么也没有发生过。在等待恢复执行时,产生下一个中断…等等。 因此,当单步执行的最佳方法是禁用中断时,您会找到额外的菜单按钮来进行此作业,因此您不需要在代码中乱七八糟。 快乐迈步 鲍勃 以上来自于百度翻译 以下为原文 Yes, that issue has ben reported before, but I'm afraid it cannot get corrected. The cause of the behaveour you have seen is hardware-dependent. Remember: When reaching a breakpoint, only the program-execution stops, the hardware is still running and may produce interrupts which are not serviced at this time. When execution is resumed at first (of course) the interrupt becomes handled, when done the handler returns - to your breakpoint set. So it looks as if nothing has happened between. While waiting for resuming execution the next interrupt is produced... and so on. So when single-stepping the best would be to disable the interrupts, you find a menu-button extra for this job, so you do not need to mess around in code. Happy stepping Bob |
|
|
|
是的,这是IDE的一个问题,但是我同意柏柏尔可以做的事情不多。在任务栏上添加一个Iutut Deable按钮有助于调试。
以上来自于百度翻译 以下为原文 yes, this is one of the issues of this IDE, but I agree that this is not much Cypress can do. The addition of having a interupt diable button on the task bar is helpful when debugging. |
|
|
|
非常感谢你们!
因此,从我所读到的,这是处理器中的硅级问题,还是处理器中的钩子停止处理器和调试器不使用钩子?底线,这将得到解决柏树在未来是固定的还是问题将是一个较低层次的问题,将不会得到修复?IM猜测这个问题是在所有PSoC部件3’-5’s? 谢谢你 马特 以上来自于百度翻译 以下为原文 Great Thank you Guys! So from what I am reading this is a silicon level issue in the processor or are the hooks in the processor to stop the processor and the debugger does not use the hooks? Bottom line, will this get addressed by Cypress in the future to be fixed or is issue going to be one of the lower level issues that wont get fixed? Im guessing this issue is in all the Psoc parts 3's-5's? Thank you Matt |
|
|
|
谢谢你,鲍伯,
我想我可以通过禁用这些中断来工作,但我肯定这是更干净的。 再次感谢你的帮助!! 马特 以上来自于百度翻译 以下为原文 Thank you Bob, I think I can make it work with this disabling the interrupts, but I sure wich this was cleaner. Thanks again for your help!! Matt |
|
|
|
我正在做路灯自动化项目。也就是说,路灯将取决于LDR,并在晚上11点到早上5点关掉。在打赌中,如果任何车辆通过道路,灯会切换,这里我用PIR传感器检测车辆。我想使用PSoC 5和开发板。
在这里我使用LDR,PIR传感器和RTC,在PSoC,很少有ADC,所以我必须使用MUX,所以指导我,我怎么能做到这一点和编程也 以上来自于百度翻译 以下为原文 i am doing project on street light automation. i.e., the street light will turn on depending upon LDR and switched off during 11PM to 5 AM. In bet this if any vehicle is passed on road, the light will switch, here i am using PIR sensor for of detection of vehicle. I want to use PSoC 5 and development board. in this i am using LDR, PIR sensor and RTC, in PSoC there are few ADC so i have to use mux, so guide me, how can i do this and programming also |
|
|
|
劫持一根4岁的线不是一个好主意。最好是创建一个新的主题。
鲍勃 以上来自于百度翻译 以下为原文 Not a good idea to hijack a 4 year old thread. Would be better to create a new topic. Bob |
|
|
|
我不确定我是否面对PSCO3同样的问题。但我几乎找不到任何方法来中断中断。
我不会像前一位演讲者那样从天空中溜走,这显然是有点困惑。但我认为这符合原始问题。 提前感谢。 以上来自于百度翻译 以下为原文 I'm not sure if I'm facing the same issue with psoc3. But i can't hardly find any option to disable interrupts. I'm not falling out of skys as the previous speaker which is obviously a little bit confused. But I think this does match original issue. Thanks in advance. |
|
|
|
可以禁用调试窗口图标的中断。是它上面有闪光的那个。对于PSoC3、4和5应该相同
鲍勃 以上来自于百度翻译 以下为原文 You can disable interrupts from the debug window icons. Its the one with the flash on it. Should be the same for PSoC3, 4 and 5 Bob |
|
|
|
你说过,这个按钮的标签也能“启用全球中断”吗?如果这个按钮确实提供了必要的功能,我很好。但我认为这有点混乱。这个开关是否只在中断上下文中工作?
以上来自于百度翻译 以下为原文 Having said that you had on mind the label of this button 'Enable global Interrupts' as well? If this button does provide required functionallity, I'm fine with it. But i think it is a little bit confusing. Does this switch work in case in interrupt context only? |
|
|
|
当程序停止时,OU只能激活该开关。除非程序运行到Cynabl全局中断API(宏),否则将不进行进一步的中断处理。我不太清楚PSOC3中的中断处理程序的退出是如何工作的,可能是用ReTI指令恢复中断状态。因此,当程序在中断处理程序中停止时,禁用可能无法正常工作。
出路?切换到更现代的PSoC5,同样的内部资源,但是CPU是相当有能力的!8051内核在1980被引入,并且缺少内部堆栈,这要求编译器生成额外的代码。 鲍勃 以上来自于百度翻译 以下为原文 ou can only activate that switch when the program has stopped. No further interrupts will be processed except when your program runs into a CyEnableGlobalInterrupt API (macro). I am not quite sure how the exit from an interrupt handler in PSoC3 works, probably the interrupt state gets restored with a RETI instruction. So the disabling might not work as expected when the program is stopped in an interrupt handler. Way out? Switch to the more modern PSoC5, same internal resources, but the CPU is quite more capable! The 8051 core was introduced in 1980 and has a lack of internal stack which requires the compiler to generate extra code. Bob |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2106 浏览 1 评论
1853 浏览 1 评论
3671 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1788 浏览 6 评论
1536 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
572浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
424浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
438浏览 2评论
386浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
916浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 11:01 , Processed in 1.248251 second(s), Total 96, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号