Microchip
直播中

黄颖

8年用户 176经验值
私信 关注
[问答]

如果INTCON.PEIE=1,MiWi堆栈将无限循环

如果你不需要花很多时间调试它,我希望你能有任何见解。我有一个MC TS的案例。我没有收到来自MC摘要的确认和决议:我使用MIWI演示工具包(DM182016-1)和MLA V2017Y03Y06的代码来开发MiWi网格。我加载了SW,让演示板按原样工作。我修改了我自己的PanCo和EngDead板的代码。我可以成功地在ED和PANCO之间传输数据。然后,当我在PANCO代码的Syc中加上“ItNo.Peee=1”时,MiWi堆栈将无限地循环大约5分钟到2HRS。用“InCON.Peee=1”,数据在PanCo和ED.之间传输OK,这个问题将发生在5分钟到2小时之后。调试表明,在一次故障中,主机被卡住,如果(MippuxUnaseTalk(ListSoist.Boad,NULL,FALSE)=TRUE)和空隙中断HISISR(无效),我添加了“ItNCON.PEI= 1”;对于MIWI Demo KIT PANCO板的代码,同样的问题发生了。这意味着低优先级中断不能用MiWi启用。栈。

以上来自于百度翻译


      以下为原文

    I post this so if you don't have to spend much time debugging it, and hope to hear from you if you have any insight. I have a case with MC TS on this. I have not received confirmation and resolution from MC.

Summary:
I'm using MiWi Demo kit (DM182016-1) and code from MLA v2017_03_06 to develop a MiWi mesh. I loaded the sw and got the demo boards working as-is. I modified the code for my own PanCo and EndDevice boards. I can transfer data between my ED and PanCo successfully. Then when I added "INTCON.PEIE = 1;" in system.c of PanCo code, MiWi stack will get in a loop infinitely about 5 minutes to 2hrs later.

With "INTCON.PEIE = 1;", data were transferred OK between PanCo and ED. The issue would occur about 5 minutes to 2hrs later. Debugging shows that in one failure, host is stuck in if(MiApp_UnicastAddress(lastSource.bytes,NULL,false)==true) and void interrupt HighISR(void)

I added "INTCON.PEIE = 1;" to the code for MiWI-Demo-kit PanCo board, the same issue occurred.

This means low-priority interrupt can't be enable with MiWi stack.

回帖(17)

杨玲

2019-3-1 11:27:59
设置PEIE对中断优先级没有任何影响,除非IPEN也被设置。你没有提到伊本,所以不清楚你在做什么。我本来希望PEIE已经被设置在演示软件中,因为大多数应用程序使用中断都需要它。

以上来自于百度翻译


      以下为原文

    Setting PEIE does not have any effect on interrupt priorities unless IPEN is also set.  You didn't mention IPEN so it's unclear what you're doing.  I would have expected PEIE to already be set in the demo software, since most applications using interrupts require it.
举报

王耀昱

2019-3-1 11:35:23
我有iPon设置。演示板的代码不使用低优先级的ITO。它只使用高ITO,高ISR.()。

以上来自于百度翻译


      以下为原文

    I have IPEN set.
The code for the demo board does not use low-prio intr. It uses only high intr, HighISR().
举报

王焕树

2019-3-1 11:45:47
然后,听起来你是在启用一个低优先级中断源,但是没有正确地对它进行维护。

以上来自于百度翻译


      以下为原文

    Then it sounds like you are enabling a low priority interrupt source, but not servicing it properly.
What else have you changed in terms of enabling individual interrupts?
 
举报

王耀昱

2019-3-1 12:00:12
用“ItNo.Peee=1”,数据在PanCo和ED.之间传输OK,这个问题将在5分钟到2小时后发生。通过MIWI协议传输数据OK。此外,UART在接收时使用低PRI中断。这里的关键是一切都很好(MIWI数据传输和UART接收),但大约5分钟到2小时后,发生故障。到目前为止,我看到了板空闲时的失败(没有MIWI数据XFER,没有UART活动)。在调试期间,我也看到了当In CONNE.PEI= 1时的失败,并且没有为低PRI中断配置任何资源。MMC ORIG代码的演示板(没有配置为低PRI内联的资源)在我添加一行代码“InCON.Peee=1”时失败了。MC已经审查了我的代码,无法识别出什么是错误的,并且无法解释为什么“ItNo.Peee=1”会引起问题。

以上来自于百度翻译


      以下为原文

    With "INTCON.PEIE = 1;", data were transferred OK between PanCo and ED. The issue would occur about 5 minutes to 2hrs later.  
Data were transferred OK via MiWi protocol. Also, the UART is using low-pri interrupt on receive. The key here is that everything works fine (MiWi data transferring and UART receiving), but then about 5min to 2 hours later, the failure occurs. So far, I have seen the failure when the boards are in idle (no MiWi data xfer, no UART activities).
 
During debugging, I also see the failure when INTCON.PEIE = 1, and NOT ANY resource are configured for low-pri interrupt. The demo board with MC orig code (no resource configured for low-pri intr) fails the same way when I just add this one line of code "INTCON.PEIE = 1;"
MC has reviewed my code and could not identify what's wrong, and couldn't explain why "INTCON.PEIE = 1" would cause a problem.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分