PIC仿真出现问题,求助!!!

2020-02-09 11:37发布

写了个程序框架,想仿真一下,结果出现了个问题。
程序大体如下:
#include<pic.h>
#include"system.h"
#include"sharearea.h"
__CONFIG (FCMDIS & IESOEN & UNPROTECT & BORDIS & PWRTDIS & WDTDIS & XT);


void v_SystemInit_f(void);



void main(void)
{
    v_SystemInit_f();
    while(1)
    {
        NOP();

    }
   
}

void v_SystemInit_f(void)
{
    v_PortInit_f();
    v_InterruptInit_f();

}

void interrupt ISR(void)
{
    Uchar8 Count0,Count1,Count2;
    INTE = 0;
    for(Count0=0;Count0<10;Count0++)
    {
        
        NOP();   
    }
   
    INTE = 1;
}


仿真时出现的问题是:CORE-E0002: Stack under flow error occurred from instruction at 0x000013。怎么回事?弄了半天搞不懂
如果把外部中断去掉,就没出现问题了。
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
4条回答
yyzhong
2020-02-09 17:01
把它改成这样还是不行。
void interrupt ISR(void)
{
    if(INTE && INTF)
    {
    Uchar8 Count0,Count1,Count2;
    INTE = 0;
    INTF = 0;
    for(Count0=0;Count0<10;Count0++)
    {
         
        NOP();     
    }
     
    INTE = 1;
    }
}

一周热门 更多>