mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-22 01:27:11 +08:00
fix(freertos): disable other task before disable nmi
This commit is contained in:
@ -297,9 +297,10 @@ void IRAM_ATTR vPortETSIntrLock(void)
|
||||
if (NMIIrqIsOn == 0) {
|
||||
uint32_t regval = REG_READ(NMI_INT_ENABLE_REG);
|
||||
|
||||
vPortEnterCritical();
|
||||
|
||||
REG_WRITE(NMI_INT_ENABLE_REG, 0);
|
||||
|
||||
vPortEnterCritical();
|
||||
if (!ESP_NMI_IS_CLOSED()) {
|
||||
do {
|
||||
REG_WRITE(INT_ENA_WDEV, WDEV_TSF0_REACH_INT);
|
||||
@ -322,9 +323,10 @@ void IRAM_ATTR vPortETSIntrUnlock(void)
|
||||
|
||||
REG_WRITE(INT_ENA_WDEV, WDEV_INTEREST_EVENT);
|
||||
}
|
||||
vPortExitCritical();
|
||||
|
||||
REG_WRITE(NMI_INT_ENABLE_REG, regval);
|
||||
|
||||
vPortExitCritical();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user