diff --git a/components/esp8266/include/rom/ets_sys.h b/components/esp8266/include/rom/ets_sys.h index b5cbf0a5..9b18e2cb 100644 --- a/components/esp8266/include/rom/ets_sys.h +++ b/components/esp8266/include/rom/ets_sys.h @@ -51,13 +51,9 @@ extern uint32_t WDEV_INTEREST_EVENT; #define ETS_NMI_LOCK() \ do { \ - char m = 10; \ do { \ - REG_WRITE(INT_ENA_WDEV, 0); \ - m = 10; \ - for (; m > 0; m--) {} \ REG_WRITE(INT_ENA_WDEV, WDEV_TSF0_REACH_INT); \ - } while(0); \ + } while(REG_READ(INT_ENA_WDEV) != WDEV_TSF0_REACH_INT); \ } while (0) #define ETS_NMI_UNLOCK() \ @@ -68,13 +64,9 @@ extern uint32_t WDEV_INTEREST_EVENT; #define ETS_INTR_LOCK() do { \ if (NMIIrqIsOn == 0) { \ vPortEnterCritical(); \ - char m = 10; \ do { \ - REG_WRITE(INT_ENA_WDEV, 0); \ - m = 10; \ - for (; m > 0; m--) {} \ REG_WRITE(INT_ENA_WDEV, WDEV_TSF0_REACH_INT); \ - } while(0); \ + } while(REG_READ(INT_ENA_WDEV) != WDEV_TSF0_REACH_INT); \ } \ } while(0) diff --git a/components/esp8266/lib/VERSION b/components/esp8266/lib/VERSION index 5d6ced50..ee242ccd 100644 --- a/components/esp8266/lib/VERSION +++ b/components/esp8266/lib/VERSION @@ -1,10 +1,10 @@ gwen: - core: f0128c3 - net80211: f0128c3 - pp: f0128c3 - wpa: f0128c3 - espnow: f0128c3 - wps: f0128c3 + core: 021ebb5 + net80211: 021ebb5 + pp: 021ebb5 + wpa: 021ebb5 + espnow: 021ebb5 + wps: 021ebb5 smartconfig: 2.8.1 phy: 1055_8 diff --git a/components/esp8266/lib/libcore.a b/components/esp8266/lib/libcore.a index c80c222c..77070d05 100644 Binary files a/components/esp8266/lib/libcore.a and b/components/esp8266/lib/libcore.a differ diff --git a/components/esp8266/lib/libespnow.a b/components/esp8266/lib/libespnow.a index 70d45422..c15803df 100644 Binary files a/components/esp8266/lib/libespnow.a and b/components/esp8266/lib/libespnow.a differ diff --git a/components/esp8266/lib/libnet80211.a b/components/esp8266/lib/libnet80211.a index 864bd23f..ee98444d 100644 Binary files a/components/esp8266/lib/libnet80211.a and b/components/esp8266/lib/libnet80211.a differ diff --git a/components/esp8266/lib/libpp.a b/components/esp8266/lib/libpp.a index a0b1f0c0..3e4a3d6c 100644 Binary files a/components/esp8266/lib/libpp.a and b/components/esp8266/lib/libpp.a differ diff --git a/components/esp8266/lib/libwpa.a b/components/esp8266/lib/libwpa.a index 9b2b2024..19b62dce 100644 Binary files a/components/esp8266/lib/libwpa.a and b/components/esp8266/lib/libwpa.a differ diff --git a/components/esp8266/lib/libwps.a b/components/esp8266/lib/libwps.a index bc3dea07..bc4fc62f 100644 Binary files a/components/esp8266/lib/libwps.a and b/components/esp8266/lib/libwps.a differ diff --git a/components/freertos/port/esp8266/include/freertos/portmacro.h b/components/freertos/port/esp8266/include/freertos/portmacro.h index 23a9a45f..2bb02c4d 100644 --- a/components/freertos/port/esp8266/include/freertos/portmacro.h +++ b/components/freertos/port/esp8266/include/freertos/portmacro.h @@ -88,7 +88,7 @@ typedef unsigned int INT32U; /*-----------------------------------------------------------*/ /* Scheduler utilities. */ -extern void PendSV(char req); +extern void PendSV(int req); //#define portYIELD() vPortYield() #define portYIELD() PendSV(1) diff --git a/components/freertos/port/esp8266/port.c b/components/freertos/port/esp8266/port.c index cae53e84..bbf35ce9 100644 --- a/components/freertos/port/esp8266/port.c +++ b/components/freertos/port/esp8266/port.c @@ -50,8 +50,7 @@ #define PORT_ASSERT(x) do { if (!(x)) {ets_printf("%s %u\n", "rtos_port", __LINE__); while(1){}; }} while (0) extern char NMIIrqIsOn; -static uint8_t HdlMacSig = 0; -static uint8_t SWReq = 0; +static int SWReq = 0; unsigned cpu_sr; @@ -102,7 +101,7 @@ StackType_t *pxPortInitialiseStack(StackType_t *pxTopOfStack, pdTASK_CODE pxCode return (StackType_t *)sp; } -void IRAM_ATTR PendSV(char req) +void IRAM_ATTR PendSV(int req) { if (req == 1) { vPortEnterCritical(); @@ -110,35 +109,18 @@ void IRAM_ATTR PendSV(char req) xthal_set_intset(1 << ETS_SOFT_INUM); vPortExitCritical(); } else if (req == 2) { - HdlMacSig = 1; xthal_set_intset(1 << ETS_SOFT_INUM); } } -void IRAM_ATTR HDL_MAC_SIG_IN_LV1_ISR(void) -{ - PendSV(2); -} - -extern portBASE_TYPE MacIsrSigPostDefHdl(void); - void TASK_SW_ATTR SoftIsrHdl(void* arg) { - ETS_NMI_LOCK(); + extern int MacIsrSigPostDefHdl(void); - portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; - - if (HdlMacSig == 1) { - HdlMacSig = 0; - xHigherPriorityTaskWoken = MacIsrSigPostDefHdl(); - } - - if (xHigherPriorityTaskWoken || (SWReq == 1)) { + if (MacIsrSigPostDefHdl() || (SWReq == 1)) { _xt_timer_int1(); SWReq = 0; } - - ETS_NMI_UNLOCK(); } void esp_increase_tick_cnt(const TickType_t ticks) @@ -243,7 +225,6 @@ void IRAM_ATTR vPortExitCritical(void) void show_critical_info(void) { ets_printf("ShowCritical:%u\n", uxCriticalNesting); - ets_printf("HdlMacSig:%u\n", HdlMacSig); ets_printf("SWReq:%u\n", SWReq); }