单片机/MCU论坛
直播中

贾飞世

7年用户 1770经验值
私信 关注

TC275屏蔽掉GPIO_DEMO函数后while循环不在执行怎么解决?

int core0_main (void){    __enable ();    /*     * !!WATCHDOG0 AND SAFETY WATCHDOG ARE DISABLED HERE!!     * Enable the watchdog in the demo if it is required and also service the watchdog periodically     * */    IfxScuWdt_disableCpuWatchdog (IfxScuWdt_getCpuWatchdogPassword ());    IfxScuWdt_disableSafetyWatchdog (IfxScuWdt_getSafetyWatchdogPassword ());    GPIO_Demo_init();    while (1)    {            GPIO_Demo();            babywen ++;            if(babywen > 10000000)                    babywen = 0;    }    return (1);}屏蔽掉GPIO_DEMO(IO翻转)函数后while循环不在执行(依据是变量观测未发生变化),不屏蔽的时候一切正常                                                                                                                                                                                                                                                              

回帖(1)

李海

2024-2-19 11:28:33
用这个函数来做等待吧,感觉像是编译器优化掉了    while (1)    {                IfxStm_waitTicks( MODULE_STM0, 10000000);    }          
举报

更多回帖

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