完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,对不起,我知道这里有类似的问题,他们帮助了,但我仍然无法解决我的问题。我正在使用:MPLAB X IDE V3.61编译器:XC16-V1.31 DSPIC33 EV64 MG102电源电压到DSPIC:4.6V以下是在代码运行之前的消息:连接到MPLAB ICD 3…当前加载FIFW在ICD 3固件套件版本….01.4818固件类型….DSPIC33 e/24ETARGET电压检测目标设备DSPIC33 EV64 GM102发现。设备ID修订4107设备擦除…编程…以下内存区域(S)将被编程:程序存储器:开始地址=0x0,结束地址=0x15FFP编程/验证在代码开始运行时完全结束,但过了一段时间后,代码停止运行,目标停止,没有设置断点。该折叠消息显示:“目标由于用户代码中的软件断点而停止”,但是,没有启用断点,并且在编译之后也没有警告。所以,在这个问题发生后,我使用了一个处理程序来检查和查看寄存器的内容。下面是处理程序的代码:以这种方式,程序不再停止,并停留在OyDebug中断的循环中。因此,我能够暂停调试并尝试分析寄存器。我分析了,但不明白代码为什么会有这种行为。我在这里附有SFRS(特殊功能寄存器)、配置位和文件寄存器的文件。请,如果有人了解正在发生的事情,请帮帮我,我不知道该怎么办。
FielyReavest.txt(76.60 KB)-下载166次SFRs.txt(46.15 KB)-下载69次 以上来自于百度翻译 以下为原文 Hello, Sorry, I know that there are similar questions here, they helped, but I still can't solve my problem. I'm using: MPLAB X IDE v3.61 Compiler: xc16-v1.31 dsPIC33EV64MG102 Supply Voltage to the dsPIC: 4.6V Following is the message before the code runs: Connecting to MPLAB ICD 3... At the begining the code runs, but, after a while, some seconds, the code stops running, the target halted with no breakpoint set. The folowing message appears: "Target halted due to Software Breakpoint in user code " But, there is no breakpoint enabled and there is no warning after the compilation too. So, I used a handler to try to undertand and see the content of the registers after this problem happens. Following is the code to the handler: void __attribute__ ( (interrupt, no_auto_psv) ) _DefaultInterrupt( void ) { while( 1 ); } In this way the program did not stop any more and stay in the loop of the _DefaultInterrupt. So, I was able to pause the debug and try to analyse the registers. I analized, but did not understand why the code is having this behavior. I attached here the files with the SFRs( Special Function Registers ), the Configuration Bits and the File Registers. Please, if someone understand what is happening, please help me, I don't know what to do anymore. With my bests regards, Daniel. Attachment(s) Configuration_Bits.txt (46.15 KB) - downloaded 93 times File_Registers.txt (76.60 KB) - downloaded 166 times SFRs.txt (46.15 KB) - downloaded 69 times |
|
相关推荐
8个回答
|
|
有趣的是你的观点,但是,这是什么中断,这么长的时间发生?定时中断发生了,我测试了,我做了一个方波只是为了测试它。波在无限循环中产生,直到代码停止运行。我怀疑ADC,也许它的ISR声明是不正确的…但是如果是问题,在编译后应该显示警告。我明天看,然后把结果公布在这里。
以上来自于百度翻译 以下为原文 Interesting your point of view, but, which interruption it is this, that take so long to happens? Timer interruption happens, I tested, I made a square wave just to test it. The wave is generated in a infinite loop until the code stops runing. I'm suspecting of ADC, maybe its ISR declaration is not correct... but if it was the problem, a warning should be displayed after compilation... I will see it tomorrow and post the result here. |
|
|
|
是的,我肯定,我做到了。我甚至创建了一个新项目,但是问题仍然存在。
以上来自于百度翻译 以下为原文 Yes, I'm sure, I did it. I even created a new project, but the problem persists |
|
|
|
是的,我肯定,我做到了。我甚至创建了一个新项目,但是问题仍然存在。
以上来自于百度翻译 以下为原文 Yes, I'm sure, I did it. I even created a new project, but the problem persists |
|
|
|
当您在默认处理程序中结束时,检查所有中断是否启用。看看是否有什么不应该的。然后找出它是在哪里启用的。如果你没有设置它。在它上放置一个数据断点,看看什么是什么。
以上来自于百度翻译 以下为原文 When you end in in the default handler check all the interrupt enables. See if there are any on that should not be. Then find out where it gets enabled. If you do not set it. Put a data break point on it and what to see what does. |
|
|
|
嗨,为什么SFR的所有显示为0x000后位置PC?这使得更难检查原因。然而,SFR的内存视图似乎可以。我看到一些类似的信息:ItCON3(在0x08C4)=0x8000。这将是DMT/Dead man计时器陷阱发生。
以上来自于百度翻译 以下为原文 hi, why the SFR's are all shown as 0x0000 after position PC? This makes it even more difficult to check for the reason. However, the memory view of the SFR's seem to be OK. I see something like: INTCON3 (at 0x08C4)=0x8000. This would be DMT / Deadman Timer Trap occured |
|
|
|
问题不是中断不会发生。问题是中断发生在你不处理的地方(没有ISR)。
以上来自于百度翻译 以下为原文 The problem is not that the interrupts do not happen. The problem is that an interrupt happens which you don't handle (don't have an ISR for). |
|
|
|
非常感谢!这是问题所在,因此,我在配置文件中设置了以下行:{ PrimaMaul-COMPIG DMTEN=0,之后,我禁用了DMT中断dMTCONBITS.ON=0;并且我的问题得到解决。再次,非常感谢!!
以上来自于百度翻译 以下为原文 Thank you Very Much !! This was the problem, so, I put the following line at the configuration file: #pragma config DMTEN = 0 And after that I disabled the DMT interruption DMTCONbits.ON = 0; And my problem was solved. Again, thank you very much!! |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
5160 浏览 9 评论
1998 浏览 8 评论
1927 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3170 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2225 浏览 5 评论
727浏览 1评论
612浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
501浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
626浏览 0评论
524浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 06:56 , Processed in 1.386055 second(s), Total 92, Slave 75 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号