ESP8266 NMI中断是否被后台屏蔽?

Buyer
Posts: 2
Joined: Thu Apr 26, 2018 7:40 pm

ESP8266 NMI中断是否被后台屏蔽?

Postby Buyer » Thu Apr 26, 2018 7:51 pm

我们现在用NMI中断做一个信号,但发现在后台运行时,中断发生的频率会不准,似乎是被系统后台其它任务影响了。
请问具体应该怎么改?才能让NMI成为最高优先级?

如果我们用循环做delay,不回到系统后台,NMI就不会被影响,但会影响接收TCP数据

void ICACHE_FLASH_ATTR myt_init(void)
{
#define NMI_SOURCE_SEL_REG 0x3ff00000
WRITE_PERI_REG(NMI_SOURCE_SEL_REG, (READ_PERI_REG(NMI_SOURCE_SEL_REG)&~0x1F)|(0x1+0x7*2) );

NmiTimSetFunc(mytpwm_tim1_intr_handler);

RTC_REG_WRITE(FRC1_CTRL_ADDRESS, FRC1_CTRL_DIV_V | FRC1_ENABLE_TIMER | TM_EDGE_INT);

RTC_REG_WRITE(FRC1_LOAD_ADDRESS, FRC1_TOTAL_LOADV);

TM1_EDGE_INT_ENABLE();
ETS_FRC1_INTR_ENABLE();

}

Who is online

Users browsing this forum: Google [Bot] and 6 guests