Skip to content

Commit 9707868

Browse files
committed
fix(esp8266): Link critical function to IRAM
NMI calling function contains of "enter/exit critical"
1 parent dd54592 commit 9707868

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/esp8266/source/esp_wifi_os_adapter.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "esp_libc.h"
1818
#include "esp_system.h"
19+
#include "esp_attr.h"
1920
#include "esp_wifi_os_adapter.h"
2021

2122
#include "freertos/FreeRTOS.h"
@@ -30,14 +31,14 @@
3031
#include "esp_newlib.h"
3132
#endif
3233

33-
static uint32_t enter_critical_wrapper(void)
34+
static uint32_t IRAM_ATTR enter_critical_wrapper(void)
3435
{
3536
taskENTER_CRITICAL();
3637

3738
return 0;
3839
}
3940

40-
static void exit_critical_wrapper(uint32_t tmp)
41+
static void IRAM_ATTR exit_critical_wrapper(uint32_t tmp)
4142
{
4243
taskEXIT_CRITICAL();
4344
}

0 commit comments

Comments
 (0)